Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
docs: cut the SDK and Spaces reference to one page per module (CUA-1863) (#5468)
Francesco Bonacci7ab9c1709cf5
diff --git a/docs/content/docs/cua-cli/reference/mcp-tools.mdx b/docs/content/docs/cua-cli/reference/mcp-tools.mdxindex c5ece2fe79..fd74daef01 100644--- a/docs/content/docs/cua-cli/reference/mcp-tools.mdx+++ b/docs/content/docs/cua-cli/reference/mcp-tools.mdx@@ -22,55 +22,55 @@ These tools are the [Spaces contract](/spaces/reference), with the same names an### Space lifecycle-Full entries: [Space lifecycle](/spaces/reference/lifecycle).+Full entries: [Space lifecycle](/spaces/reference/spaces#space-lifecycle).| Tool | Description || --- | --- |-| <span id="add_space"></span>[`add_space`](/spaces/reference/lifecycle#add_space) | Add an existing machine as a Space by address and token. |-| <span id="remove_space"></span>[`remove_space`](/spaces/reference/lifecycle#remove_space) | Forget a registered Space without touching it. |-| <span id="list_spaces"></span>[`list_spaces`](/spaces/reference/lifecycle#list_spaces) | List the Spaces this connection can see. |-| <span id="create_space"></span>[`create_space`](/spaces/reference/lifecycle#create_space) | Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud. |-| <span id="delete_space"></span>[`delete_space`](/spaces/reference/lifecycle#delete_space) | Delete a Space's sandbox and forget it. |-| <span id="stop_space"></span>[`stop_space`](/spaces/reference/lifecycle#stop_space) | Turn a Space off: suspend it (memory kept) or stop it (disk kept). |-| <span id="start_space"></span>[`start_space`](/spaces/reference/lifecycle#start_space) | Turn a Space back on: resume or boot it. |+| <span id="add_space"></span>[`add_space`](/spaces/reference/spaces#add_space) | Add an existing machine as a Space by address and token. |+| <span id="remove_space"></span>[`remove_space`](/spaces/reference/spaces#remove_space) | Forget a registered Space without touching it. |+| <span id="list_spaces"></span>[`list_spaces`](/spaces/reference/spaces#list_spaces) | List the Spaces this connection can see. |+| <span id="create_space"></span>[`create_space`](/spaces/reference/spaces#create_space) | Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud. |+| <span id="delete_space"></span>[`delete_space`](/spaces/reference/spaces#delete_space) | Delete a Space's sandbox and forget it. |+| <span id="stop_space"></span>[`stop_space`](/spaces/reference/spaces#stop_space) | Turn a Space off: suspend it (memory kept) or stop it (disk kept). |+| <span id="start_space"></span>[`start_space`](/spaces/reference/spaces#start_space) | Turn a Space back on: resume or boot it. |### Commands and files-Full entries: [Commands and files](/spaces/reference/commands-and-files).+Full entries: [Commands and files](/spaces/reference/spaces#commands-and-files).| Tool | Description || --- | --- |-| <span id="space_bash"></span>[`space_bash`](/spaces/reference/commands-and-files#space_bash) | Run a shell command inside the Space. |-| <span id="space_write"></span>[`space_write`](/spaces/reference/commands-and-files#space_write) | Write literal text to a path inside the Space. |-| <span id="upload"></span>[`upload`](/spaces/reference/commands-and-files#upload) | Send a local file or folder into the Space. |-| <span id="send_file"></span>[`send_file`](/spaces/reference/commands-and-files#send_file) | Send a host file or folder into the Space's Downloads, verified by sha256 on arrival. |-| <span id="download"></span>[`download`](/spaces/reference/commands-and-files#download) | Fetch a file or folder out of the Space. |+| <span id="space_bash"></span>[`space_bash`](/spaces/reference/spaces#space_bash) | Run a shell command inside the Space. |+| <span id="space_write"></span>[`space_write`](/spaces/reference/spaces#space_write) | Write literal text to a path inside the Space. |+| <span id="upload"></span>[`upload`](/spaces/reference/spaces#upload) | Send a local file or folder into the Space. |+| <span id="send_file"></span>[`send_file`](/spaces/reference/spaces#send_file) | Send a host file or folder into the Space's Downloads, verified by sha256 on arrival. |+| <span id="download"></span>[`download`](/spaces/reference/spaces#download) | Fetch a file or folder out of the Space. |### Streams and display-Full entries: [Streams and display](/spaces/reference/streams-and-display).+Full entries: [Streams and display](/spaces/reference/spaces#streams-and-display).| Tool | Description || --- | --- |-| <span id="stream_endpoint"></span>[`stream_endpoint`](/spaces/reference/streams-and-display#stream_endpoint) | Return a ticketed media endpoint for the Space's desktop or one window. |-| <span id="list_space_windows"></span>[`list_space_windows`](/spaces/reference/streams-and-display#list_space_windows) | List the windows open inside the Space. |-| <span id="stream_space_window"></span>[`stream_space_window`](/spaces/reference/streams-and-display#stream_space_window) | Draw one Space window on the operator's desktop. |-| <span id="show_space_pip"></span>[`show_space_pip`](/spaces/reference/streams-and-display#show_space_pip) | Pin the Space as picture-in-picture on the operator's desktop. |-| <span id="hide_space_pip"></span>[`hide_space_pip`](/spaces/reference/streams-and-display#hide_space_pip) | Unpin the picture-in-picture window. |-| <span id="open_space_viewer"></span>[`open_space_viewer`](/spaces/reference/streams-and-display#open_space_viewer) | Open the full Space viewer on the operator's desktop. |+| <span id="stream_endpoint"></span>[`stream_endpoint`](/spaces/reference/spaces#stream_endpoint) | Return a ticketed media endpoint for the Space's desktop or one window. |+| <span id="list_space_windows"></span>[`list_space_windows`](/spaces/reference/spaces#list_space_windows) | List the windows open inside the Space. |+| <span id="stream_space_window"></span>[`stream_space_window`](/spaces/reference/spaces#stream_space_window) | Draw one Space window on the operator's desktop. |+| <span id="show_space_pip"></span>[`show_space_pip`](/spaces/reference/spaces#show_space_pip) | Pin the Space as picture-in-picture on the operator's desktop. |+| <span id="hide_space_pip"></span>[`hide_space_pip`](/spaces/reference/spaces#hide_space_pip) | Unpin the picture-in-picture window. |+| <span id="open_space_viewer"></span>[`open_space_viewer`](/spaces/reference/spaces#open_space_viewer) | Open the full Space viewer on the operator's desktop. |### Services-Full entries: [Services](/spaces/reference/services).+Full entries: [Services](/spaces/reference/spaces#services).| Tool | Description || --- | --- |-| <span id="list_tools"></span>[`list_tools`](/spaces/reference/services#list_tools) | List the MCP services and tools reachable inside the Space. |-| <span id="call_tool"></span>[`call_tool`](/spaces/reference/services#call_tool) | Call a service tool inside the Space. |+| <span id="list_tools"></span>[`list_tools`](/spaces/reference/spaces#list_tools) | List the MCP services and tools reachable inside the Space. |+| <span id="call_tool"></span>[`call_tool`](/spaces/reference/spaces#call_tool) | Call a service tool inside the Space. |### Agents-Full entries: [Agents](/spaces/reference/agents).+Full entries: [Agents](/spaces/reference/agents#agents).| Tool | Description || --- | --- |@@ -85,110 +85,110 @@ Full entries: [Agents](/spaces/reference/agents).### Persistent agents-Full entries: [Persistent agents](/spaces/reference/persistent-agents).+Full entries: [Persistent agents](/spaces/reference/agents#persistent-agents).| Tool | Description || --- | --- |-| <span id="persistent_agent_create"></span>[`persistent_agent_create`](/spaces/reference/persistent-agents#persistent_agent_create) | Create a named agent whose memory outlives its Space. |-| <span id="persistent_agent_list"></span>[`persistent_agent_list`](/spaces/reference/persistent-agents#persistent_agent_list) | List persistent agents. |-| <span id="persistent_agent_remove"></span>[`persistent_agent_remove`](/spaces/reference/persistent-agents#persistent_agent_remove) | Forget a persistent agent. |-| <span id="persistent_agent_send"></span>[`persistent_agent_send`](/spaces/reference/persistent-agents#persistent_agent_send) | Give a persistent agent a turn. |-| <span id="persistent_agent_save"></span>[`persistent_agent_save`](/spaces/reference/persistent-agents#persistent_agent_save) | Save a persistent agent's home now. |-| <span id="agent_pause"></span>[`agent_pause`](/spaces/reference/persistent-agents#agent_pause) | Pause a persistent agent: its run, its routines and its Space. |-| <span id="agent_resume"></span>[`agent_resume`](/spaces/reference/persistent-agents#agent_resume) | Resume a paused persistent agent. |-| <span id="routine_add"></span>[`routine_add`](/spaces/reference/persistent-agents#routine_add) | Schedule a recurring turn for a persistent agent. |-| <span id="routine_list"></span>[`routine_list`](/spaces/reference/persistent-agents#routine_list) | List routines. |-| <span id="routine_remove"></span>[`routine_remove`](/spaces/reference/persistent-agents#routine_remove) | Delete a routine. |-| <span id="routine_set_enabled"></span>[`routine_set_enabled`](/spaces/reference/persistent-agents#routine_set_enabled) | Turn a routine on or off. |-| <span id="notify_user"></span>[`notify_user`](/spaces/reference/persistent-agents#notify_user) | Tell the user something in the Cua app. |-| <span id="notifications_list"></span>[`notifications_list`](/spaces/reference/persistent-agents#notifications_list) | Read the notifications feed. |-| <span id="notifications_ack"></span>[`notifications_ack`](/spaces/reference/persistent-agents#notifications_ack) | Mark notifications read. |-| <span id="computer_access_grant"></span>[`computer_access_grant`](/spaces/reference/persistent-agents#computer_access_grant) | Let a persistent agent use one of the user's computers. |-| <span id="computer_access_revoke"></span>[`computer_access_revoke`](/spaces/reference/persistent-agents#computer_access_revoke) | Take back a persistent agent's access to a computer. |-| <span id="computer_access_list"></span>[`computer_access_list`](/spaces/reference/persistent-agents#computer_access_list) | List per-agent computer access. |+| <span id="persistent_agent_create"></span>[`persistent_agent_create`](/spaces/reference/agents#persistent_agent_create) | Create a named agent whose memory outlives its Space. |+| <span id="persistent_agent_list"></span>[`persistent_agent_list`](/spaces/reference/agents#persistent_agent_list) | List persistent agents. |+| <span id="persistent_agent_remove"></span>[`persistent_agent_remove`](/spaces/reference/agents#persistent_agent_remove) | Forget a persistent agent. |+| <span id="persistent_agent_send"></span>[`persistent_agent_send`](/spaces/reference/agents#persistent_agent_send) | Give a persistent agent a turn. |+| <span id="persistent_agent_save"></span>[`persistent_agent_save`](/spaces/reference/agents#persistent_agent_save) | Save a persistent agent's home now. |+| <span id="agent_pause"></span>[`agent_pause`](/spaces/reference/agents#agent_pause) | Pause a persistent agent: its run, its routines and its Space. |+| <span id="agent_resume"></span>[`agent_resume`](/spaces/reference/agents#agent_resume) | Resume a paused persistent agent. |+| <span id="routine_add"></span>[`routine_add`](/spaces/reference/agents#routine_add) | Schedule a recurring turn for a persistent agent. |+| <span id="routine_list"></span>[`routine_list`](/spaces/reference/agents#routine_list) | List routines. |+| <span id="routine_remove"></span>[`routine_remove`](/spaces/reference/agents#routine_remove) | Delete a routine. |+| <span id="routine_set_enabled"></span>[`routine_set_enabled`](/spaces/reference/agents#routine_set_enabled) | Turn a routine on or off. |+| <span id="notify_user"></span>[`notify_user`](/spaces/reference/agents#notify_user) | Tell the user something in the Cua app. |+| <span id="notifications_list"></span>[`notifications_list`](/spaces/reference/agents#notifications_list) | Read the notifications feed. |+| <span id="notifications_ack"></span>[`notifications_ack`](/spaces/reference/agents#notifications_ack) | Mark notifications read. |+| <span id="computer_access_grant"></span>[`computer_access_grant`](/spaces/reference/agents#computer_access_grant) | Let a persistent agent use one of the user's computers. |+| <span id="computer_access_revoke"></span>[`computer_access_revoke`](/spaces/reference/agents#computer_access_revoke) | Take back a persistent agent's access to a computer. |+| <span id="computer_access_list"></span>[`computer_access_list`](/spaces/reference/agents#computer_access_list) | List per-agent computer access. |### Session teleport-Full entries: [Session teleport](/spaces/reference/teleport).+Full entries: [Session teleport](/spaces/reference/agents#session-teleport).| Tool | Description || --- | --- |-| <span id="teleport_manifest"></span>[`teleport_manifest`](/spaces/reference/teleport#teleport_manifest) | Describe what a session teleport would move. |-| <span id="teleport_app"></span>[`teleport_app`](/spaces/reference/teleport#teleport_app) | Move an app session into the Space. |+| <span id="teleport_manifest"></span>[`teleport_manifest`](/spaces/reference/agents#teleport_manifest) | Describe what a session teleport would move. |+| <span id="teleport_app"></span>[`teleport_app`](/spaces/reference/agents#teleport_app) | Move an app session into the Space. |### Keyvault-Full entries: [Keyvault](/spaces/reference/keyvault).+Full entries: [Keyvault](/spaces/reference/agents#keyvault).| Tool | Description || --- | --- |-| <span id="request_site_login"></span>[`request_site_login`](/spaces/reference/keyvault#request_site_login) | Sign in to a site in the Space with the user's saved password. |+| <span id="request_site_login"></span>[`request_site_login`](/spaces/reference/agents#request_site_login) | Sign in to a site in the Space with the user's saved password. |### Hotspot-Full entries: [Hotspot](/spaces/reference/hotspot).+Full entries: [Hotspot](/spaces/reference/spaces#hotspot).| Tool | Description || --- | --- |-| <span id="hotspot_start"></span>[`hotspot_start`](/spaces/reference/hotspot#hotspot_start) | Start sharing this machine's network with a Space. |-| <span id="hotspot_stop"></span>[`hotspot_stop`](/spaces/reference/hotspot#hotspot_stop) | Stop sharing this machine's network. |-| <span id="hotspot_status"></span>[`hotspot_status`](/spaces/reference/hotspot#hotspot_status) | Report which Spaces are sharing this machine's network, with counters. |+| <span id="hotspot_start"></span>[`hotspot_start`](/spaces/reference/spaces#hotspot_start) | Start sharing this machine's network with a Space. |+| <span id="hotspot_stop"></span>[`hotspot_stop`](/spaces/reference/spaces#hotspot_stop) | Stop sharing this machine's network. |+| <span id="hotspot_status"></span>[`hotspot_status`](/spaces/reference/spaces#hotspot_status) | Report which Spaces are sharing this machine's network, with counters. |### Cua Volume-Full entries: [Cua Volume](/spaces/reference/volume).+Full entries: [Cua Volume](/spaces/reference/agents#cua-volume).| Tool | Description || --- | --- |-| <span id="volume_ls"></span>[`volume_ls`](/spaces/reference/volume#volume_ls) | List a folder of the Cua Volume. |-| <span id="volume_read"></span>[`volume_read`](/spaces/reference/volume#volume_read) | Read a file from the Cua Volume. |-| <span id="volume_write"></span>[`volume_write`](/spaces/reference/volume#volume_write) | Write a file to the Cua Volume. |-| <span id="volume_delete"></span>[`volume_delete`](/spaces/reference/volume#volume_delete) | Delete a file from the Cua Volume. |-| <span id="volume_history"></span>[`volume_history`](/spaces/reference/volume#volume_history) | List a Cua Volume file's versions. |-| <span id="volume_restore"></span>[`volume_restore`](/spaces/reference/volume#volume_restore) | Restore an old version of a Cua Volume file. |-| <span id="volume_grant"></span>[`volume_grant`](/spaces/reference/volume#volume_grant) | Grant an agent or Space more Cua Volume access. |-| <span id="volume_revoke"></span>[`volume_revoke`](/spaces/reference/volume#volume_revoke) | Revoke a Cua Volume grant. |-| <span id="volume_grants"></span>[`volume_grants`](/spaces/reference/volume#volume_grants) | List Cua Volume grants. |-| <span id="volume_request_access"></span>[`volume_request_access`](/spaces/reference/volume#volume_request_access) | Ask the user for more Cua Volume access. |-| <span id="volume_requests"></span>[`volume_requests`](/spaces/reference/volume#volume_requests) | List Cua Volume access requests waiting for the user. |-| <span id="volume_approve"></span>[`volume_approve`](/spaces/reference/volume#volume_approve) | Approve a Cua Volume access request. |-| <span id="volume_deny"></span>[`volume_deny`](/spaces/reference/volume#volume_deny) | Decline a Cua Volume access request. |-| <span id="volume_audit"></span>[`volume_audit`](/spaces/reference/volume#volume_audit) | Read the Cua Volume audit log. |-| <span id="volume_storage"></span>[`volume_storage`](/spaces/reference/volume#volume_storage) | Show where the Cua Volume keeps its bytes. |-| <span id="volume_storage_set"></span>[`volume_storage_set`](/spaces/reference/volume#volume_storage_set) | Test or change where the Cua Volume keeps its bytes. |-| <span id="volume_mount_status"></span>[`volume_mount_status`](/spaces/reference/volume#volume_mount_status) | Show whether the Cua Volume is mounted as a volume. |-| <span id="volume_mount"></span>[`volume_mount`](/spaces/reference/volume#volume_mount) | Mount the Cua Volume as a volume. |-| <span id="volume_unmount"></span>[`volume_unmount`](/spaces/reference/volume#volume_unmount) | Unmount the Cua Volume volume. |-| <span id="volume_sync_status"></span>[`volume_sync_status`](/spaces/reference/volume#volume_sync_status) | Show the Cua Volume's sync state across devices. |-| <span id="volume_sync_events"></span>[`volume_sync_events`](/spaces/reference/volume#volume_sync_events) | Wait for Cua Volume sync events. |-| <span id="volume_sync_resolve"></span>[`volume_sync_resolve`](/spaces/reference/volume#volume_sync_resolve) | Mark a Cua Volume sync conflict as seen. |-| <span id="volume_cache_stats"></span>[`volume_cache_stats`](/spaces/reference/volume#volume_cache_stats) | Show the Cua Volume block cache. |-| <span id="volume_cache_set"></span>[`volume_cache_set`](/spaces/reference/volume#volume_cache_set) | Set the Cua Volume block cache's size cap. |-| <span id="volume_cache_clear"></span>[`volume_cache_clear`](/spaces/reference/volume#volume_cache_clear) | Clear the Cua Volume block cache. |+| <span id="volume_ls"></span>[`volume_ls`](/spaces/reference/agents#volume_ls) | List a folder of the Cua Volume. |+| <span id="volume_read"></span>[`volume_read`](/spaces/reference/agents#volume_read) | Read a file from the Cua Volume. |+| <span id="volume_write"></span>[`volume_write`](/spaces/reference/agents#volume_write) | Write a file to the Cua Volume. |+| <span id="volume_delete"></span>[`volume_delete`](/spaces/reference/agents#volume_delete) | Delete a file from the Cua Volume. |+| <span id="volume_history"></span>[`volume_history`](/spaces/reference/agents#volume_history) | List a Cua Volume file's versions. |+| <span id="volume_restore"></span>[`volume_restore`](/spaces/reference/agents#volume_restore) | Restore an old version of a Cua Volume file. |+| <span id="volume_grant"></span>[`volume_grant`](/spaces/reference/agents#volume_grant) | Grant an agent or Space more Cua Volume access. |+| <span id="volume_revoke"></span>[`volume_revoke`](/spaces/reference/agents#volume_revoke) | Revoke a Cua Volume grant. |+| <span id="volume_grants"></span>[`volume_grants`](/spaces/reference/agents#volume_grants) | List Cua Volume grants. |+| <span id="volume_request_access"></span>[`volume_request_access`](/spaces/reference/agents#volume_request_access) | Ask the user for more Cua Volume access. |+| <span id="volume_requests"></span>[`volume_requests`](/spaces/reference/agents#volume_requests) | List Cua Volume access requests waiting for the user. |+| <span id="volume_approve"></span>[`volume_approve`](/spaces/reference/agents#volume_approve) | Approve a Cua Volume access request. |+| <span id="volume_deny"></span>[`volume_deny`](/spaces/reference/agents#volume_deny) | Decline a Cua Volume access request. |+| <span id="volume_audit"></span>[`volume_audit`](/spaces/reference/agents#volume_audit) | Read the Cua Volume audit log. |+| <span id="volume_storage"></span>[`volume_storage`](/spaces/reference/agents#volume_storage) | Show where the Cua Volume keeps its bytes. |+| <span id="volume_storage_set"></span>[`volume_storage_set`](/spaces/reference/agents#volume_storage_set) | Test or change where the Cua Volume keeps its bytes. |+| <span id="volume_mount_status"></span>[`volume_mount_status`](/spaces/reference/agents#volume_mount_status) | Show whether the Cua Volume is mounted as a volume. |+| <span id="volume_mount"></span>[`volume_mount`](/spaces/reference/agents#volume_mount) | Mount the Cua Volume as a volume. |+| <span id="volume_unmount"></span>[`volume_unmount`](/spaces/reference/agents#volume_unmount) | Unmount the Cua Volume volume. |+| <span id="volume_sync_status"></span>[`volume_sync_status`](/spaces/reference/agents#volume_sync_status) | Show the Cua Volume's sync state across devices. |+| <span id="volume_sync_events"></span>[`volume_sync_events`](/spaces/reference/agents#volume_sync_events) | Wait for Cua Volume sync events. |+| <span id="volume_sync_resolve"></span>[`volume_sync_resolve`](/spaces/reference/agents#volume_sync_resolve) | Mark a Cua Volume sync conflict as seen. |+| <span id="volume_cache_stats"></span>[`volume_cache_stats`](/spaces/reference/agents#volume_cache_stats) | Show the Cua Volume block cache. |+| <span id="volume_cache_set"></span>[`volume_cache_set`](/spaces/reference/agents#volume_cache_set) | Set the Cua Volume block cache's size cap. |+| <span id="volume_cache_clear"></span>[`volume_cache_clear`](/spaces/reference/agents#volume_cache_clear) | Clear the Cua Volume block cache. |### Sharing-Full entries: [Sharing](/spaces/reference/sharing).+Full entries: [Sharing](/spaces/reference/spaces#sharing).| Tool | Description || --- | --- |-| <span id="share_space"></span>[`share_space`](/spaces/reference/sharing#share_space) | Let another cua.ai account watch or edit a Space. |-| <span id="unshare_space"></span>[`unshare_space`](/spaces/reference/sharing#unshare_space) | Stop sharing a Space with an account, or with everyone. |-| <span id="space_shares"></span>[`space_shares`](/spaces/reference/sharing#space_shares) | List who a Space is shared with. |-| <span id="relay_register_space"></span>[`relay_register_space`](/spaces/reference/sharing#relay_register_space) | Publish a Space on the relay for the account's other devices. |-| <span id="relay_unregister_space"></span>[`relay_unregister_space`](/spaces/reference/sharing#relay_unregister_space) | Take a Space off the relay. |+| <span id="share_space"></span>[`share_space`](/spaces/reference/spaces#share_space) | Let another cua.ai account watch or edit a Space. |+| <span id="unshare_space"></span>[`unshare_space`](/spaces/reference/spaces#unshare_space) | Stop sharing a Space with an account, or with everyone. |+| <span id="space_shares"></span>[`space_shares`](/spaces/reference/spaces#space_shares) | List who a Space is shared with. |+| <span id="relay_register_space"></span>[`relay_register_space`](/spaces/reference/spaces#relay_register_space) | Publish a Space on the relay for the account's other devices. |+| <span id="relay_unregister_space"></span>[`relay_unregister_space`](/spaces/reference/spaces#relay_unregister_space) | Take a Space off the relay. |### Your cloud-Full entries: [Your cloud](/spaces/reference/cloud).+Full entries: [Your cloud](/spaces/reference/spaces#your-cloud).| Tool | Description || --- | --- |-| <span id="cloud_status"></span>[`cloud_status`](/spaces/reference/cloud#cloud_status) | List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. |-| <span id="cloud_connect"></span>[`cloud_connect`](/spaces/reference/cloud#cloud_connect) | Connect a cloud account Spaces can be created in. |-| <span id="cloud_test"></span>[`cloud_test`](/spaces/reference/cloud#cloud_test) | Check a cloud account without creating anything. |-| <span id="cloud_disconnect"></span>[`cloud_disconnect`](/spaces/reference/cloud#cloud_disconnect) | Forget a connected cloud account. |-| <span id="cloud_sweep"></span>[`cloud_sweep`](/spaces/reference/cloud#cloud_sweep) | Find and delete what Cua left in your clouds. |+| <span id="cloud_status"></span>[`cloud_status`](/spaces/reference/spaces#cloud_status) | List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. |+| <span id="cloud_connect"></span>[`cloud_connect`](/spaces/reference/spaces#cloud_connect) | Connect a cloud account Spaces can be created in. |+| <span id="cloud_test"></span>[`cloud_test`](/spaces/reference/spaces#cloud_test) | Check a cloud account without creating anything. |+| <span id="cloud_disconnect"></span>[`cloud_disconnect`](/spaces/reference/spaces#cloud_disconnect) | Forget a connected cloud account. |+| <span id="cloud_sweep"></span>[`cloud_sweep`](/spaces/reference/spaces#cloud_sweep) | Find and delete what Cua left in your clouds. |## Image toolsdiff --git a/docs/content/docs/cua-sdk/guides/local-runtimes.mdx b/docs/content/docs/cua-sdk/guides/local-runtimes.mdxindex a7e3c86d3e..bb20d833c1 100644--- a/docs/content/docs/cua-sdk/guides/local-runtimes.mdx+++ b/docs/content/docs/cua-sdk/guides/local-runtimes.mdx@@ -188,7 +188,7 @@ cua spaces delete relay:cloud-0123456789abcdef --forceAgents use the same `create_space` tool with `on="aws"`, and `cloud_status`,`cloud_test`, `cloud_connect` and `cloud_sweep` from the-[Spaces contract](/spaces/reference/cloud).+[Spaces contract](/spaces/reference/spaces#your-cloud).### What Cua createsdiff --git a/docs/content/docs/cua-sdk/reference/agent-setup.mdx b/docs/content/docs/cua-sdk/reference/agent-setup.mdxdeleted file mode 100644index 7322269397..0000000000--- a/docs/content/docs/cua-sdk/reference/agent-setup.mdx+++ /dev/null@@ -1,585 +0,0 @@-----title: "Agent setup"-description: "Detect coding agents, install cua skills and configure their MCP servers."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--`cua.agent_setup()` onboards coding agents on this machine: skills and MCP configuration.--## `AgentSetup`--Agent onboarding for this machine's user.--Returned by [`Cua.agent_setup`](/cua-sdk/reference/cua#cua).--| Method | Description |-| --- | --- |-| [`configure_mcp`](#agentsetupconfigure_mcp) | Configures the MCP server (default: `cua mcp`, `cua` resolved on PATH) for `agents`. |-| [`install_skills`](#agentsetupinstall_skills) | Installs `skills` (empty: all bundled) for `agents`. |-| [`remove`](#agentsetupremove) | Removes what cua added for `agents` (skills and/or MCP). |-| [`select`](#agentsetupselect) | Resolves `all` (installed agents), `none` or `claude,codex` to ids. |-| [`set_onboarding_declined`](#agentsetupset_onboarding_declined) | Saves or clears the "never" answer (`~/.cua/config`). |-| [`setup_cua_driver`](#agentsetupsetup_cua_driver) | Background computer-use for `agents`: the bundled `cua-driver` skill (`skills`) and the `cua-driver mcp` server (`mcp`), launching `command` (default: the installed cua-driver). |-| [`update`](#agentsetupupdate) | Refreshes installed cua skills and re-points managed MCP entries. |--| Accessor | Returns | Description |-| --- | --- | --- |-| `detect()` | [`Vec<AgentInfo>`](#agentinfo-record) | Every supported agent, installed or not (read-only). |-| `onboarding_declined()` | `bool` | Whether the user said "never" to agent onboarding. |-| `skills()` | [`Vec<BundledSkill>`](#bundledskill-record) | The skills bundled with this SDK. |-| `status()` | [`Vec<AgentInfo>`](#agentinfo-record) | Same as `detect`, named for status displays. |--### `AgentSetup.configure_mcp`--Configures the MCP server (default: `cua mcp`, `cua` resolved on-PATH) for `agents`.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def configure_mcp(self, agents: List[str], server: Optional[AgentMcpServer]) -> List[AgentSetupOutcome]-```--</Tab>-<Tab value="TypeScript">--```ts-configureMcp(agents: Array<string>, server: AgentMcpServer | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>-```--</Tab>-<Tab value="Swift">--```swift-func configureMcp(agents: [String], server: AgentMcpServer?) async throws -> [AgentSetupOutcome]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun configureMcp(agents: List<String>, server: AgentMcpServer?): List<AgentSetupOutcome>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn configure_mcp(&self, agents: Vec<String>, server: Option<AgentMcpServer>) -> Result<Vec<AgentSetupOutcome>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `agents` | `Vec<String>` | required |-| `server` | [`Option<AgentMcpServer>`](#agentmcpserver-record) | required |--**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AgentSetup.install_skills`--Installs `skills` (empty: all bundled) for `agents`. Folders cua did-not write are skipped unless `force`.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def install_skills(self, agents: List[str], skills: List[str], force: bool) -> List[AgentSetupOutcome]-```--</Tab>-<Tab value="TypeScript">--```ts-installSkills(agents: Array<string>, skills: Array<string>, force: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>-```--</Tab>-<Tab value="Swift">--```swift-func installSkills(agents: [String], skills: [String], force: Bool) async throws -> [AgentSetupOutcome]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun installSkills(agents: List<String>, skills: List<String>, force: Boolean): List<AgentSetupOutcome>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn install_skills(&self, agents: Vec<String>, skills: Vec<String>, force: bool) -> Result<Vec<AgentSetupOutcome>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `agents` | `Vec<String>` | required |-| `skills` | `Vec<String>` | required |-| `force` | `bool` | required |--**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AgentSetup.remove`--Removes what cua added for `agents` (skills and/or MCP).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def remove(self, agents: List[str], skills: bool, mcp: bool) -> List[AgentSetupOutcome]-```--</Tab>-<Tab value="TypeScript">--```ts-remove(agents: Array<string>, skills: boolean, mcp: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>-```--</Tab>-<Tab value="Swift">--```swift-func remove(agents: [String], skills: Bool, mcp: Bool) async throws -> [AgentSetupOutcome]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun remove(agents: List<String>, skills: Boolean, mcp: Boolean): List<AgentSetupOutcome>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn remove(&self, agents: Vec<String>, skills: bool, mcp: bool) -> Result<Vec<AgentSetupOutcome>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `agents` | `Vec<String>` | required |-| `skills` | `bool` | required |-| `mcp` | `bool` | required |--**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AgentSetup.select`--Resolves `all` (installed agents), `none` or `claude,codex` to ids.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def select(self, selection: str) -> List[str]-```--</Tab>-<Tab value="TypeScript">--```ts-select(selection: string): Array<string>-```--</Tab>-<Tab value="Swift">--```swift-func select(selection: String) throws -> [String]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun select(selection: String): List<String>-```--</Tab>-<Tab value="Rust">--```rust-pub fn select(&self, selection: String) -> Result<Vec<String>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `selection` | `String` | required |--**Returns** `Vec<String>` · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AgentSetup.set_onboarding_declined`--Saves or clears the "never" answer (`~/.cua/config`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def set_onboarding_declined(self, declined: bool) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-setOnboardingDeclined(declined: boolean): void-```--</Tab>-<Tab value="Swift">--```swift-func setOnboardingDeclined(declined: Bool) throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun setOnboardingDeclined(declined: Boolean)-```--</Tab>-<Tab value="Rust">--```rust-pub fn set_onboarding_declined(&self, declined: bool) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `declined` | `bool` | required |--**Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AgentSetup.setup_cua_driver`--Background computer-use for `agents`: the bundled `cua-driver` skill-(`skills`) and the `cua-driver mcp` server (`mcp`), launching-`command` (default: the installed cua-driver). The same step as-`cua agents setup --cua-driver` and the installers' `cua-driver` item.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def setup_cua_driver(self, agents: List[str], command: Optional[str], skills: bool, mcp: bool) -> List[AgentSetupOutcome]-```--</Tab>-<Tab value="TypeScript">--```ts-setupCuaDriver(agents: Array<string>, command: string | undefined, skills: boolean, mcp: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>-```--</Tab>-<Tab value="Swift">--```swift-func setupCuaDriver(agents: [String], command: String?, skills: Bool, mcp: Bool) async throws -> [AgentSetupOutcome]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun setupCuaDriver(agents: List<String>, command: String?, skills: Boolean, mcp: Boolean): List<AgentSetupOutcome>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn setup_cua_driver(&self, agents: Vec<String>, command: Option<String>, skills: bool, mcp: bool) -> Result<Vec<AgentSetupOutcome>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `agents` | `Vec<String>` | required |-| `command` | `Option<String>` | required |-| `skills` | `bool` | required |-| `mcp` | `bool` | required |--**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AgentSetup.update`--Refreshes installed cua skills and re-points managed MCP entries.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def update(self, server: Optional[AgentMcpServer]) -> List[AgentSetupOutcome]-```--</Tab>-<Tab value="TypeScript">--```ts-update(server: AgentMcpServer | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>-```--</Tab>-<Tab value="Swift">--```swift-func update(server: AgentMcpServer?) async throws -> [AgentSetupOutcome]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun update(server: AgentMcpServer?): List<AgentSetupOutcome>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn update(&self, server: Option<AgentMcpServer>) -> Result<Vec<AgentSetupOutcome>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `server` | [`Option<AgentMcpServer>`](#agentmcpserver-record) | required |--**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `AgentInfo` record--One AI coding agent and what cua configured for it.--Returned by [`AgentSetup.detect`](#agentsetup), [`AgentSetup.status`](#agentsetup).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Registry id (`claude-code`, `codex`, `cursor`, ...). |-| `name` | `String` | | Display name. |-| `installed` | `bool` | | Whether it looks installed. |-| `evidence` | `Vec<String>` | | What gave it away (`bin:<path>`, `path:<dir>`, `app:<bundle>`). |-| `skills_dir` / `skillsDir` | `Option<String>` | | User skills directory, when the agent supports Agent Skills. |-| `mcp_config` / `mcpConfig` | `Option<String>` | | User MCP config file, when the agent supports MCP. |-| `mcp_format` / `mcpFormat` | `Option<String>` | | `json`, `toml` or `yaml`. |-| `cua_configured` / `cuaConfigured` | `bool` | | A `cua` MCP server launching a cua binary is configured. |-| `cua_managed` / `cuaManaged` | `bool` | | That entry is the one cua wrote. |-| `cua_driver_configured` / `cuaDriverConfigured` | `bool` | | A `cua-driver` MCP server (background computer-use) is configured. |-| `skills_installed` / `skillsInstalled` | `Vec<String>` | | Bundled skills present in the skills directory. |-| `skills_outdated` / `skillsOutdated` | `Vec<String>` | | Installed bundled skills that differ from this SDK's copy. |-| `error` | `Option<String>` | | Problem reading the MCP config (for example a malformed file). |-| `unverified` | `Option<String>` | | What could not be verified from the agent's official docs. |--## `AgentMcpServer` record--The MCP server to register.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | `"cua"` | Server name (`cua`). |-| `command` | `String` | | Launch command (an absolute `cua` path is best: GUI agents often lack the shell PATH). |-| `args` | `Vec<String>` | | Arguments (`["mcp"]`). |-| `env` | `HashMap<String, String>` | | Extra environment. |--## `AgentSetupOutcome` record--One target's outcome.--Returned by [`AgentSetup.configure_mcp`](#agentsetupconfigure_mcp), [`AgentSetup.install_skills`](#agentsetupinstall_skills), [`AgentSetup.remove`](#agentsetupremove), [`AgentSetup.setup_cua_driver`](#agentsetupsetup_cua_driver), [`AgentSetup.update`](#agentsetupupdate).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `agents` | `Vec<String>` | | Agents served by this target. |-| `target` | [`AgentSetupTarget`](#agentsetuptarget-enum) | | Kind. |-| `item` | `String` | | Skill or server name. |-| `path` | `String` | | Skill folder or config file. |-| `change` | [`AgentSetupChange`](#agentsetupchange-enum) | | Result. |-| `detail` | `String` | | Explanation. |-| `backup` | `Option<String>` | | Backup taken before this write. |--## `BundledSkill` record--A skill bundled with the SDK.--Returned by [`AgentSetup.skills`](#agentsetup).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | Name. |-| `description` | `String` | | Description. |-| `version` | `String` | | Version. |-| `files` | `u32` | | Number of files. |--## `AgentSetupChange` enum--What happened to one target.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-AgentSetupChange.CREATED-AgentSetupChange.UPDATED-AgentSetupChange.UNCHANGED-AgentSetupChange.REMOVED-AgentSetupChange.SKIPPED-AgentSetupChange.FAILED-```--</Tab>-<Tab value="TypeScript">--```ts-AgentSetupChange.Created-AgentSetupChange.Updated-AgentSetupChange.Unchanged-AgentSetupChange.Removed-AgentSetupChange.Skipped-AgentSetupChange.Failed-```--</Tab>-<Tab value="Swift">--```swift-.created-.updated-.unchanged-.removed-.skipped-.failed-```--</Tab>-<Tab value="Kotlin">--```kotlin-AgentSetupChange.CREATED-AgentSetupChange.UPDATED-AgentSetupChange.UNCHANGED-AgentSetupChange.REMOVED-AgentSetupChange.SKIPPED-AgentSetupChange.FAILED-```--</Tab>-<Tab value="Rust">--```rust-AgentSetupChange::Created-AgentSetupChange::Updated-AgentSetupChange::Unchanged-AgentSetupChange::Removed-AgentSetupChange::Skipped-AgentSetupChange::Failed-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Created` | Written where nothing was. |-| `Updated` | Replaced or edited. |-| `Unchanged` | Already as wanted. |-| `Removed` | Removed (or the previous entry restored). |-| `Skipped` | Deliberately left alone (see detail). |-| `Failed` | Failed (see detail); the target was left untouched. |--## `AgentSetupTarget` enum--What an operation touched.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-AgentSetupTarget.SKILL-AgentSetupTarget.MCP-```--</Tab>-<Tab value="TypeScript">--```ts-AgentSetupTarget.Skill-AgentSetupTarget.Mcp-```--</Tab>-<Tab value="Swift">--```swift-.skill-.mcp-```--</Tab>-<Tab value="Kotlin">--```kotlin-AgentSetupTarget.SKILL-AgentSetupTarget.MCP-```--</Tab>-<Tab value="Rust">--```rust-AgentSetupTarget::Skill-AgentSetupTarget::Mcp-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Skill` | A skill folder. |-| `Mcp` | An MCP config entry. |diff --git a/docs/content/docs/cua-sdk/reference/agents.mdx b/docs/content/docs/cua-sdk/reference/agents.mdxindex 91bdb02488..22abb6b3fb 100644--- a/docs/content/docs/cua-sdk/reference/agents.mdx+++ b/docs/content/docs/cua-sdk/reference/agents.mdx@@ -1,6 +1,6 @@----title: "Coding agents"-description: "Run coding agents (Claude Code, Codex, Gemini CLI, OpenCode, ...) inside any sandbox."+title: "Coding agents and setup"+description: "Run coding agents (Claude Code, Codex, Gemini CLI, OpenCode, ...) inside any sandbox, and set them up on this machine."---{/*@@ -1209,3 +1209,577 @@ pub fn agent_event_category(kind: String) -> String| `kind` | `String` | required |**Returns** `String`++## Agent setup++`cua.agent_setup()` onboards coding agents on this machine: skills and MCP configuration.++## `AgentSetup`++Agent onboarding for this machine's user.++Returned by [`Cua.agent_setup`](/cua-sdk/reference/cua#cua).++| Method | Description |+| --- | --- |+| [`configure_mcp`](#agentsetupconfigure_mcp) | Configures the MCP server (default: `cua mcp`, `cua` resolved on PATH) for `agents`. |+| [`install_skills`](#agentsetupinstall_skills) | Installs `skills` (empty: all bundled) for `agents`. |+| [`remove`](#agentsetupremove) | Removes what cua added for `agents` (skills and/or MCP). |+| [`select`](#agentsetupselect) | Resolves `all` (installed agents), `none` or `claude,codex` to ids. |+| [`set_onboarding_declined`](#agentsetupset_onboarding_declined) | Saves or clears the "never" answer (`~/.cua/config`). |+| [`setup_cua_driver`](#agentsetupsetup_cua_driver) | Background computer-use for `agents`: the bundled `cua-driver` skill (`skills`) and the `cua-driver mcp` server (`mcp`), launching `command` (default: the installed cua-driver). |+| [`update`](#agentsetupupdate) | Refreshes installed cua skills and re-points managed MCP entries. |++| Accessor | Returns | Description |+| --- | --- | --- |+| `detect()` | [`Vec<AgentInfo>`](#agentinfo-record) | Every supported agent, installed or not (read-only). |+| `onboarding_declined()` | `bool` | Whether the user said "never" to agent onboarding. |+| `skills()` | [`Vec<BundledSkill>`](#bundledskill-record) | The skills bundled with this SDK. |+| `status()` | [`Vec<AgentInfo>`](#agentinfo-record) | Same as `detect`, named for status displays. |++### `AgentSetup.configure_mcp`++Configures the MCP server (default: `cua mcp`, `cua` resolved on+PATH) for `agents`.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def configure_mcp(self, agents: List[str], server: Optional[AgentMcpServer]) -> List[AgentSetupOutcome]+```++</Tab>+<Tab value="TypeScript">++```ts+configureMcp(agents: Array<string>, server: AgentMcpServer | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>+```++</Tab>+<Tab value="Swift">++```swift+func configureMcp(agents: [String], server: AgentMcpServer?) async throws -> [AgentSetupOutcome]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun configureMcp(agents: List<String>, server: AgentMcpServer?): List<AgentSetupOutcome>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn configure_mcp(&self, agents: Vec<String>, server: Option<AgentMcpServer>) -> Result<Vec<AgentSetupOutcome>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `agents` | `Vec<String>` | required |+| `server` | [`Option<AgentMcpServer>`](#agentmcpserver-record) | required |++**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `AgentSetup.install_skills`++Installs `skills` (empty: all bundled) for `agents`. Folders cua did+not write are skipped unless `force`.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def install_skills(self, agents: List[str], skills: List[str], force: bool) -> List[AgentSetupOutcome]+```++</Tab>+<Tab value="TypeScript">++```ts+installSkills(agents: Array<string>, skills: Array<string>, force: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>+```++</Tab>+<Tab value="Swift">++```swift+func installSkills(agents: [String], skills: [String], force: Bool) async throws -> [AgentSetupOutcome]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun installSkills(agents: List<String>, skills: List<String>, force: Boolean): List<AgentSetupOutcome>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn install_skills(&self, agents: Vec<String>, skills: Vec<String>, force: bool) -> Result<Vec<AgentSetupOutcome>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `agents` | `Vec<String>` | required |+| `skills` | `Vec<String>` | required |+| `force` | `bool` | required |++**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `AgentSetup.remove`++Removes what cua added for `agents` (skills and/or MCP).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def remove(self, agents: List[str], skills: bool, mcp: bool) -> List[AgentSetupOutcome]+```++</Tab>+<Tab value="TypeScript">++```ts+remove(agents: Array<string>, skills: boolean, mcp: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>+```++</Tab>+<Tab value="Swift">++```swift+func remove(agents: [String], skills: Bool, mcp: Bool) async throws -> [AgentSetupOutcome]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun remove(agents: List<String>, skills: Boolean, mcp: Boolean): List<AgentSetupOutcome>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn remove(&self, agents: Vec<String>, skills: bool, mcp: bool) -> Result<Vec<AgentSetupOutcome>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `agents` | `Vec<String>` | required |+| `skills` | `bool` | required |+| `mcp` | `bool` | required |++**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `AgentSetup.select`++Resolves `all` (installed agents), `none` or `claude,codex` to ids.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def select(self, selection: str) -> List[str]+```++</Tab>+<Tab value="TypeScript">++```ts+select(selection: string): Array<string>+```++</Tab>+<Tab value="Swift">++```swift+func select(selection: String) throws -> [String]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun select(selection: String): List<String>+```++</Tab>+<Tab value="Rust">++```rust+pub fn select(&self, selection: String) -> Result<Vec<String>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `selection` | `String` | required |++**Returns** `Vec<String>` · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `AgentSetup.set_onboarding_declined`++Saves or clears the "never" answer (`~/.cua/config`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def set_onboarding_declined(self, declined: bool) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+setOnboardingDeclined(declined: boolean): void+```++</Tab>+<Tab value="Swift">++```swift+func setOnboardingDeclined(declined: Bool) throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun setOnboardingDeclined(declined: Boolean)+```++</Tab>+<Tab value="Rust">++```rust+pub fn set_onboarding_declined(&self, declined: bool) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `declined` | `bool` | required |++**Raises** [`CuaError`](/cua-sdk/reference/errors)++### `AgentSetup.setup_cua_driver`++Background computer-use for `agents`: the bundled `cua-driver` skill+(`skills`) and the `cua-driver mcp` server (`mcp`), launching+`command` (default: the installed cua-driver). The same step as+`cua agents setup --cua-driver` and the installers' `cua-driver` item.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def setup_cua_driver(self, agents: List[str], command: Optional[str], skills: bool, mcp: bool) -> List[AgentSetupOutcome]+```++</Tab>+<Tab value="TypeScript">++```ts+setupCuaDriver(agents: Array<string>, command: string | undefined, skills: boolean, mcp: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>+```++</Tab>+<Tab value="Swift">++```swift+func setupCuaDriver(agents: [String], command: String?, skills: Bool, mcp: Bool) async throws -> [AgentSetupOutcome]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun setupCuaDriver(agents: List<String>, command: String?, skills: Boolean, mcp: Boolean): List<AgentSetupOutcome>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn setup_cua_driver(&self, agents: Vec<String>, command: Option<String>, skills: bool, mcp: bool) -> Result<Vec<AgentSetupOutcome>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `agents` | `Vec<String>` | required |+| `command` | `Option<String>` | required |+| `skills` | `bool` | required |+| `mcp` | `bool` | required |++**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `AgentSetup.update`++Refreshes installed cua skills and re-points managed MCP entries.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def update(self, server: Optional[AgentMcpServer]) -> List[AgentSetupOutcome]+```++</Tab>+<Tab value="TypeScript">++```ts+update(server: AgentMcpServer | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentSetupOutcome>>+```++</Tab>+<Tab value="Swift">++```swift+func update(server: AgentMcpServer?) async throws -> [AgentSetupOutcome]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun update(server: AgentMcpServer?): List<AgentSetupOutcome>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn update(&self, server: Option<AgentMcpServer>) -> Result<Vec<AgentSetupOutcome>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `server` | [`Option<AgentMcpServer>`](#agentmcpserver-record) | required |++**Returns** [`Vec<AgentSetupOutcome>`](#agentsetupoutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `AgentInfo` record++One AI coding agent and what cua configured for it.++Returned by [`AgentSetup.detect`](#agentsetup), [`AgentSetup.status`](#agentsetup).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `String` | | Registry id (`claude-code`, `codex`, `cursor`, ...). |+| `name` | `String` | | Display name. |+| `installed` | `bool` | | Whether it looks installed. |+| `evidence` | `Vec<String>` | | What gave it away (`bin:<path>`, `path:<dir>`, `app:<bundle>`). |+| `skills_dir` / `skillsDir` | `Option<String>` | | User skills directory, when the agent supports Agent Skills. |+| `mcp_config` / `mcpConfig` | `Option<String>` | | User MCP config file, when the agent supports MCP. |+| `mcp_format` / `mcpFormat` | `Option<String>` | | `json`, `toml` or `yaml`. |+| `cua_configured` / `cuaConfigured` | `bool` | | A `cua` MCP server launching a cua binary is configured. |+| `cua_managed` / `cuaManaged` | `bool` | | That entry is the one cua wrote. |+| `cua_driver_configured` / `cuaDriverConfigured` | `bool` | | A `cua-driver` MCP server (background computer-use) is configured. |+| `skills_installed` / `skillsInstalled` | `Vec<String>` | | Bundled skills present in the skills directory. |+| `skills_outdated` / `skillsOutdated` | `Vec<String>` | | Installed bundled skills that differ from this SDK's copy. |+| `error` | `Option<String>` | | Problem reading the MCP config (for example a malformed file). |+| `unverified` | `Option<String>` | | What could not be verified from the agent's official docs. |++## `AgentMcpServer` record++The MCP server to register.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `String` | `"cua"` | Server name (`cua`). |+| `command` | `String` | | Launch command (an absolute `cua` path is best: GUI agents often lack the shell PATH). |+| `args` | `Vec<String>` | | Arguments (`["mcp"]`). |+| `env` | `HashMap<String, String>` | | Extra environment. |++## `AgentSetupOutcome` record++One target's outcome.++Returned by [`AgentSetup.configure_mcp`](#agentsetupconfigure_mcp), [`AgentSetup.install_skills`](#agentsetupinstall_skills), [`AgentSetup.remove`](#agentsetupremove), [`AgentSetup.setup_cua_driver`](#agentsetupsetup_cua_driver), [`AgentSetup.update`](#agentsetupupdate).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `agents` | `Vec<String>` | | Agents served by this target. |+| `target` | [`AgentSetupTarget`](#agentsetuptarget-enum) | | Kind. |+| `item` | `String` | | Skill or server name. |+| `path` | `String` | | Skill folder or config file. |+| `change` | [`AgentSetupChange`](#agentsetupchange-enum) | | Result. |+| `detail` | `String` | | Explanation. |+| `backup` | `Option<String>` | | Backup taken before this write. |++## `BundledSkill` record++A skill bundled with the SDK.++Returned by [`AgentSetup.skills`](#agentsetup).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `String` | | Name. |+| `description` | `String` | | Description. |+| `version` | `String` | | Version. |+| `files` | `u32` | | Number of files. |++## `AgentSetupChange` enum++What happened to one target.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+AgentSetupChange.CREATED+AgentSetupChange.UPDATED+AgentSetupChange.UNCHANGED+AgentSetupChange.REMOVED+AgentSetupChange.SKIPPED+AgentSetupChange.FAILED+```++</Tab>+<Tab value="TypeScript">++```ts+AgentSetupChange.Created+AgentSetupChange.Updated+AgentSetupChange.Unchanged+AgentSetupChange.Removed+AgentSetupChange.Skipped+AgentSetupChange.Failed+```++</Tab>+<Tab value="Swift">++```swift+.created+.updated+.unchanged+.removed+.skipped+.failed+```++</Tab>+<Tab value="Kotlin">++```kotlin+AgentSetupChange.CREATED+AgentSetupChange.UPDATED+AgentSetupChange.UNCHANGED+AgentSetupChange.REMOVED+AgentSetupChange.SKIPPED+AgentSetupChange.FAILED+```++</Tab>+<Tab value="Rust">++```rust+AgentSetupChange::Created+AgentSetupChange::Updated+AgentSetupChange::Unchanged+AgentSetupChange::Removed+AgentSetupChange::Skipped+AgentSetupChange::Failed+```++</Tab>+</Tabs>++| Variant | Description |+| --- | --- |+| `Created` | Written where nothing was. |+| `Updated` | Replaced or edited. |+| `Unchanged` | Already as wanted. |+| `Removed` | Removed (or the previous entry restored). |+| `Skipped` | Deliberately left alone (see detail). |+| `Failed` | Failed (see detail); the target was left untouched. |++## `AgentSetupTarget` enum++What an operation touched.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+AgentSetupTarget.SKILL+AgentSetupTarget.MCP+```++</Tab>+<Tab value="TypeScript">++```ts+AgentSetupTarget.Skill+AgentSetupTarget.Mcp+```++</Tab>+<Tab value="Swift">++```swift+.skill+.mcp+```++</Tab>+<Tab value="Kotlin">++```kotlin+AgentSetupTarget.SKILL+AgentSetupTarget.MCP+```++</Tab>+<Tab value="Rust">++```rust+AgentSetupTarget::Skill+AgentSetupTarget::Mcp+```++</Tab>+</Tabs>++| Variant | Description |+| --- | --- |+| `Skill` | A skill folder. |+| `Mcp` | An MCP config entry. |diff --git a/docs/content/docs/cua-sdk/reference/auth.mdx b/docs/content/docs/cua-sdk/reference/auth.mdxindex 9cd7b515ae..9a2d9b32c5 100644--- a/docs/content/docs/cua-sdk/reference/auth.mdx+++ b/docs/content/docs/cua-sdk/reference/auth.mdx@@ -1,6 +1,6 @@----title: "Auth"-description: "Sign-in and the credential store the SDK, the CLI and the daemon share."+title: "Auth and telemetry"+description: "Sign-in, the credential store the SDK, the CLI and the daemon share, and the telemetry switches."---{/*@@ -14,7 +14,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';`cua.auth()` signs in and reads the shared session. Cloud calls use it when no Fleet token or client credentials are configured.-Python programs usually use the high-level API instead: [`cua_sandbox.configure()`](/cua-sdk/reference/python/configuration#configure).+Python programs usually use the high-level API instead: [`cua_sandbox.configure()`](/cua-sdk/reference/python/runtimes#configure).## `Auth`@@ -181,7 +181,7 @@ pub fn devices(&self, relay_url: Option<String>, name: Option<String>) -> Result| `relay_url` | `Option<String>` | required || `name` | `Option<String>` | required |-**Returns** [`Devices`](/cua-sdk/reference/spaces/devices#devices) · **Raises** [`CuaError`](/cua-sdk/reference/errors)+**Returns** [`Devices`](/cua-sdk/reference/spaces/host#devices) · **Raises** [`CuaError`](/cua-sdk/reference/errors)### `Auth.logout`@@ -469,3 +469,701 @@ pub fn may_have_fleet_session() -> bool</Tabs>**Returns** `bool`++## Telemetry++What is collected and never collected: [Telemetry and privacy](/cua-sdk/concepts/telemetry). These calls read and change the same switches as `cua telemetry`; the SDK records its own events.++## `telemetry_status`++Telemetry state, and exactly what every event carries.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_status() -> TelemetryStatus+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryStatus(): TelemetryStatus+```++</Tab>+<Tab value="Swift">++```swift+func telemetryStatus() -> TelemetryStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryStatus(): TelemetryStatus+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_status() -> TelemetryStatus+```++</Tab>+</Tabs>++**Returns** [`TelemetryStatus`](#telemetrystatus-record)++## `telemetry_set_enabled`++Turns usage telemetry on or off for this machine (`$CUA_HOME/config.toml`,+the same switch as `cua telemetry off` and the Spaces app setting). The+environment (`DO_NOT_TRACK`, `CUA_TELEMETRY`) still wins.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_set_enabled(enabled: bool) -> TelemetryStatus+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetrySetEnabled(enabled: boolean): TelemetryStatus+```++</Tab>+<Tab value="Swift">++```swift+func telemetrySetEnabled(enabled: Bool) throws -> TelemetryStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun telemetrySetEnabled(enabled: Boolean): TelemetryStatus+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_set_enabled(enabled: bool) -> Result<TelemetryStatus, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `enabled` | `bool` | required |++**Returns** [`TelemetryStatus`](#telemetrystatus-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `telemetry_show_last`++The last `limit` events queued or sent from this machine, exactly as+sent, as JSON (`[{status, payload}]`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_show_last(limit: int) -> str+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryShowLast(limit: number): string+```++</Tab>+<Tab value="Swift">++```swift+func telemetryShowLast(limit: UInt32) -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryShowLast(limit: UInt): String+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_show_last(limit: u32) -> String+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `limit` | `u32` | required |++**Returns** `String`++## `telemetry_schema_json`++Every event and property that may be sent, as JSON.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_schema_json() -> str+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetrySchemaJson(): string+```++</Tab>+<Tab value="Swift">++```swift+func telemetrySchemaJson() -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetrySchemaJson(): String+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_schema_json() -> String+```++</Tab>+</Tabs>++**Returns** `String`++## `telemetry_reset_id`++Deletes the anonymous install id and its salt.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_reset_id() -> None+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryResetId(): void+```++</Tab>+<Tab value="Swift">++```swift+func telemetryResetId() throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun telemetryResetId()+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_reset_id() -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Raises** [`CuaError`](/cua-sdk/reference/errors)++## `StreamStatsReport` record++One stream session's aggregate stats (sampled).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `transport` | `String` | | `quic`, `webrtc`, `websocket` or `grpc`. |+| `codec` | `String` | | `h264`, `hevc`, `av1`, `vp8`, `vp9`, `jpeg` or `png`. |+| `hw_decode` / `hwDecode` | `Option<bool>` | | Hardware decode (None: not decoded here). |+| `avg_fps` / `avgFps` | `f64` | | |+| `p95_latency_ms` / `p95LatencyMs` | `Option<f64>` | | p95 input-to-present or control round trip, ms. |+| `height` | `u32` | | Stream height in pixels. |+| `duration_ms` / `durationMs` | `u64` | | |++## `TelemetryStatus` record++Telemetry state.++Returned by [`telemetry_set_enabled`](#telemetry_set_enabled), [`telemetry_status`](#telemetry_status).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `enabled` | `bool` | | Usage events may be sent. |+| `source` | `String` | | Why (`env CUA_TELEMETRY`, `env DO_NOT_TRACK`, `config <path>`, `CI environment ...`, `default`). |+| `source_kind` / `sourceKind` | `String` | | `do_not_track`, `env`, `legacy_env`, `config`, `ci` or `default`. |+| `is_ci` / `isCi` | `bool` | | Running in CI. |+| `install_id` / `installId` | `Option<String>` | | The first 8 characters of the anonymous install id, if one exists. |+| `notice_shown` / `noticeShown` | `bool` | | The first-run notice was shown on this machine. |+| `endpoint` | `String` | | Where batches go. |+| `product` | `String` | | Which Cua program events are attributed to. |+| `envelope_json` / `envelopeJson` | `String` | | The exact properties every event carries, as JSON. |++## `telemetry_acknowledge_notice`++Records that the first-run notice was shown in the app's UI (nothing is+sent from a machine before that). Apps that show the notice themselves+call `telemetry_use_app_notice` first so the SDK does not print it.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_acknowledge_notice() -> None+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryAcknowledgeNotice(): void+```++</Tab>+<Tab value="Swift">++```swift+func telemetryAcknowledgeNotice()+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryAcknowledgeNotice()+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_acknowledge_notice()+```++</Tab>+</Tabs>++## `telemetry_flush`++Sends queued events now, waiting at most `timeout_ms`; anything left+is kept on disk for a later process.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_flush(timeout_ms: int) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryFlush(timeoutMs: number): void+```++</Tab>+<Tab value="Swift">++```swift+func telemetryFlush(timeoutMs: UInt32)+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryFlush(timeoutMs: UInt)+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_flush(timeout_ms: u32)+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `timeout_ms` | `u32` | required |++## `telemetry_notice_text`++The first-run notice text (an app shows it in its own UI, then calls+`telemetry_acknowledge_notice`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_notice_text() -> str+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryNoticeText(): string+```++</Tab>+<Tab value="Swift">++```swift+func telemetryNoticeText() -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryNoticeText(): String+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_notice_text() -> String+```++</Tab>+</Tabs>++**Returns** `String`++## `telemetry_record_bench_run`++Records a finished cua-bench run: the taskset (catalog name, else+`custom`), the aggregate success rate (0 to 1, bucketed), the task count+(bucketed) and the outcome (`ok`, `error`, `cancelled`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_record_bench_run(taskset: str, success_rate: Optional[float], task_count: int, outcome: str) -> bool+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryRecordBenchRun(taskset: string, successRate: number | undefined, taskCount: bigint, outcome: string): boolean+```++</Tab>+<Tab value="Swift">++```swift+func telemetryRecordBenchRun(taskset: String, successRate: Double?, taskCount: UInt64, outcome: String) -> Bool+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryRecordBenchRun(taskset: String, successRate: Double?, taskCount: ULong, outcome: String): Boolean+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_record_bench_run(taskset: String, success_rate: Option<f64>, task_count: u64, outcome: String) -> bool+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `taskset` | `String` | required |+| `success_rate` | `Option<f64>` | required |+| `task_count` | `u64` | required |+| `outcome` | `String` | required |++**Returns** `bool`++## `telemetry_record_feature`++Records use of a Spaces app feature (fixed names: `space_create_local`,+`teleport_drop`, ... see the docs). Returns whether it was queued;+unknown names are dropped.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_record_feature(feature: str) -> bool+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryRecordFeature(feature: string): boolean+```++</Tab>+<Tab value="Swift">++```swift+func telemetryRecordFeature(feature: String) -> Bool+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryRecordFeature(feature: String): Boolean+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_record_feature(feature: String) -> bool+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `feature` | `String` | required |++**Returns** `bool`++## `telemetry_record_onboarding_step`++Records an install or onboarding funnel step (fixed names:+`onboarding_shown`, `signed_in`, `first_space_created`, ...; `first_*`+steps count once per install). Returns whether it was queued.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_record_onboarding_step(step: str, ok: bool) -> bool+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryRecordOnboardingStep(step: string, ok: boolean): boolean+```++</Tab>+<Tab value="Swift">++```swift+func telemetryRecordOnboardingStep(step: String, ok: Bool) -> Bool+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryRecordOnboardingStep(step: String, ok: Boolean): Boolean+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_record_onboarding_step(step: String, ok: bool) -> bool+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `step` | `String` | required |+| `ok` | `bool` | required |++**Returns** `bool`++## `telemetry_record_stream_stats`++Records one stream session's aggregate stats (bucketed and sampled).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_record_stream_stats(stats: StreamStatsReport) -> bool+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryRecordStreamStats(stats: StreamStatsReport): boolean+```++</Tab>+<Tab value="Swift">++```swift+func telemetryRecordStreamStats(stats: StreamStatsReport) -> Bool+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryRecordStreamStats(stats: StreamStatsReport): Boolean+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_record_stream_stats(stats: StreamStatsReport) -> bool+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `stats` | [`StreamStatsReport`](#streamstatsreport-record) | required |++**Returns** `bool`++## `telemetry_set_surface`++Names the SDK surface events are attributed to. Bindings call it at+import: `sdk_python`, `sdk_typescript`, `sdk_swift`, `sdk_kotlin`;+apps pass their own product (`spaces_app`). Unknown names are ignored.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_set_surface(surface: str, version: str) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetrySetSurface(surface: string, version: string): void+```++</Tab>+<Tab value="Swift">++```swift+func telemetrySetSurface(surface: String, version: String)+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetrySetSurface(surface: String, version: String)+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_set_surface(surface: String, version: String)+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `surface` | `String` | required |+| `version` | `String` | required |++## `telemetry_use_app_notice`++The host app shows the first-run notice itself (no stderr notice).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def telemetry_use_app_notice() -> None+```++</Tab>+<Tab value="TypeScript">++```ts+function telemetryUseAppNotice(): void+```++</Tab>+<Tab value="Swift">++```swift+func telemetryUseAppNotice()+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun telemetryUseAppNotice()+```++</Tab>+<Tab value="Rust">++```rust+pub fn telemetry_use_app_notice()+```++</Tab>+</Tabs>diff --git a/docs/content/docs/cua-sdk/reference/cua.mdx b/docs/content/docs/cua-sdk/reference/cua.mdxindex 66467c63e2..e479f97fa1 100644--- a/docs/content/docs/cua-sdk/reference/cua.mdx+++ b/docs/content/docs/cua-sdk/reference/cua.mdx@@ -1,6 +1,6 @@----title: "Cua client"-description: "The Cua handle: embedded or daemon client, its configuration, and the SDK version."+title: "Cua client and local runtimes"+description: "The Cua handle (embedded or daemon client, configuration, SDK version) and the local container and VM runtimes."---{/*@@ -39,9 +39,9 @@ accessors.| Accessor | Returns | Description || --- | --- | --- |-| `agent_setup()` | [`AgentSetup`](/cua-sdk/reference/agent-setup#agentsetup) | Agent onboarding: detect AI coding agents, install the cua skills and configure the cua MCP server for the current user. |+| `agent_setup()` | [`AgentSetup`](/cua-sdk/reference/agents#agentsetup) | Agent onboarding: detect AI coding agents, install the cua skills and configure the cua MCP server for the current user. || `auth()` | [`Auth`](/cua-sdk/reference/auth#auth) | Sign-in and the shared session (`CUA_OIDC_ISSUER`, `CUA_CREDENTIAL_STORE`, `CUA_HOME` apply). |-| `local()` | [`Local`](/cua-sdk/reference/local#local) | Local runtimes (doctor and setup) and local images. |+| `local()` | [`Local`](#local) | Local runtimes (doctor and setup) and local images. || `mode()` | [`CuaMode`](#cuamode-enum) | Topology. || `sandboxes()` | [`Sandboxes`](/cua-sdk/reference/sandbox#sandboxes) | Sandboxes (local, direct, your own cloud). || `spaces()` | [`Spaces`](/cua-sdk/reference/spaces#spaces) | Spaces: the registry and every Space primitive. |@@ -1013,3 +1013,512 @@ pub fn error_doc_url(variant: String) -> String| `variant` | `String` | required |**Returns** `String`++## Local runtimes++`cua.local()` checks and sets up the local runtimes and moves images in and out of the local engines.++Python programs usually use the high-level API instead: [`cua_sandbox` runtimes](/cua-sdk/reference/python/runtimes).++## `Local`++Local runtimes and images.++Returned by [`Cua.local`](#cua).++| Method | Description |+| --- | --- |+| [`build_image`](#localbuild_image) | Builds an image from an `images.cua.ai/v1alpha1` Image resource (JSON) on `base`; pushes to `push` when set. |+| [`doctor`](#localdoctor) | Inspects local runtimes (read-only: never installs or starts anything). |+| [`pull_image`](#localpull_image) | Pulls an image (container engine for container refs, the image cache for `vm:` containerDisks). |+| [`push_image`](#localpush_image) | Copies an image (host architecture) to `destination`; returns the pushed manifest digest. |+| [`setup`](#localsetup) | Provisions `components` (`qemu`, `lume`; `runsc` reports its plan). |+| [`storage`](#localstorage) | Free space where local Spaces are written (Lume's VM storage, the cua home for QEMU, the container engine's data disk) and which catalog images are already pulled. |++### `Local.build_image`++Builds an image from an `images.cua.ai/v1alpha1` Image resource+(JSON) on `base`; pushes to `push` when set. Returns+`reference@digest` or the local output directory.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def build_image(self, spec_json: str, base: str, push: Optional[str]) -> str+```++</Tab>+<Tab value="TypeScript">++```ts+buildImage(specJson: string, base: string, push: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<string>+```++</Tab>+<Tab value="Swift">++```swift+func buildImage(specJson: String, base: String, push: String?) async throws -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun buildImage(specJson: String, base: String, push: String?): String+```++</Tab>+<Tab value="Rust">++```rust+pub async fn build_image(&self, spec_json: String, base: String, push: Option<String>) -> Result<String, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `spec_json` | `String` | required |+| `base` | `String` | required |+| `push` | `Option<String>` | required |++**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Local.doctor`++Inspects local runtimes (read-only: never installs or starts+anything).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def doctor(self) -> DoctorReport+```++</Tab>+<Tab value="TypeScript">++```ts+doctor(asyncOpts_?: { signal: AbortSignal }): Promise<DoctorReport>+```++</Tab>+<Tab value="Swift">++```swift+func doctor() async throws -> DoctorReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun doctor(): DoctorReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn doctor(&self) -> Result<DoctorReport, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DoctorReport`](#doctorreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++**Example**++{/* Examples: scripts/docs-generators/examples/cua-sdk/Local.doctor.py, scripts/docs-generators/examples/cua-sdk/Local.doctor.swift, scripts/docs-generators/examples/cua-sdk/Local.doctor.kt */}++<Tabs items={['Python', 'Swift', 'Kotlin']} groupId="sdk-lang" persist>+<Tab value="Python">++```python test="docs" id="local-doctor-py" session="local-doctor-py"+import asyncio++import cua++async def main():+ report = await cua.embedded().local().doctor()+ for check in report.checks:+ print(check.name, check.status)++asyncio.run(main())+```++</Tab>+<Tab value="Swift">++```swift test="swift" id="local-doctor-swift"+import Cua++let report = try await Cua.embedded().local().doctor()+for check in report.checks {+ print(check.name, check.status)+}+```++</Tab>+<Tab value="Kotlin">++```kotlin test="kotlin" id="local-doctor-kt"+import ai.cua.sdk.Cua+import ai.cua.sdk.CuaConfig++val report = Cua.embedded(CuaConfig()).local().doctor()+for (check in report.checks) println("${check.name} ${check.status}")+```++</Tab>+</Tabs>++### `Local.pull_image`++Pulls an image (container engine for container refs, the image cache+for `vm:` containerDisks).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def pull_image(self, reference: str) -> LocalImage+```++</Tab>+<Tab value="TypeScript">++```ts+pullImage(reference: string, asyncOpts_?: { signal: AbortSignal }): Promise<LocalImage>+```++</Tab>+<Tab value="Swift">++```swift+func pullImage(reference: String) async throws -> LocalImage+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun pullImage(reference: String): LocalImage+```++</Tab>+<Tab value="Rust">++```rust+pub async fn pull_image(&self, reference: String) -> Result<LocalImage, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `reference` | `String` | required |++**Returns** [`LocalImage`](#localimage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Local.push_image`++Copies an image (host architecture) to `destination`; returns the+pushed manifest digest.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def push_image(self, reference: str, destination: str) -> str+```++</Tab>+<Tab value="TypeScript">++```ts+pushImage(reference: string, destination: string, asyncOpts_?: { signal: AbortSignal }): Promise<string>+```++</Tab>+<Tab value="Swift">++```swift+func pushImage(reference: String, destination: String) async throws -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun pushImage(reference: String, destination: String): String+```++</Tab>+<Tab value="Rust">++```rust+pub async fn push_image(&self, reference: String, destination: String) -> Result<String, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `reference` | `String` | required |+| `destination` | `String` | required |++**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Local.setup`++Provisions `components` (`qemu`, `lume`; `runsc` reports its plan).+Empty = everything provisionable. `dry_run` only reports.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def setup(self, components: List[str], dry_run: bool) -> List[SetupStep]+```++</Tab>+<Tab value="TypeScript">++```ts+setup(components: Array<string>, dryRun: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<SetupStep>>+```++</Tab>+<Tab value="Swift">++```swift+func setup(components: [String], dryRun: Bool) async throws -> [SetupStep]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun setup(components: List<String>, dryRun: Boolean): List<SetupStep>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn setup(&self, components: Vec<String>, dry_run: bool) -> Result<Vec<SetupStep>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `components` | `Vec<String>` | required |+| `dry_run` | `bool` | required |++**Returns** [`Vec<SetupStep>`](#setupstep-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Local.storage`++Free space where local Spaces are written (Lume's VM storage, the+cua home for QEMU, the container engine's data disk) and which+catalog images are already pulled. Read-only and bounded; probed in+this process (the daemon runs on the same host).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def storage(self) -> LocalStorage+```++</Tab>+<Tab value="TypeScript">++```ts+storage(asyncOpts_?: { signal: AbortSignal }): Promise<LocalStorage>+```++</Tab>+<Tab value="Swift">++```swift+func storage() async throws -> LocalStorage+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun storage(): LocalStorage+```++</Tab>+<Tab value="Rust">++```rust+pub async fn storage(&self) -> Result<LocalStorage, CuaError>+```++</Tab>+</Tabs>++**Returns** [`LocalStorage`](#localstorage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `DoctorReport` record++Doctor output.++Returned by [`Local.doctor`](#localdoctor).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `checks` | [`Vec<RuntimeCheck>`](#runtimecheck-record) | | One check per backend. |+| `report_json` / `reportJson` | `String` | | The full cua-vmm host report as JSON. |++## `LocalImage` record++A local image.++Returned by [`Local.pull_image`](#localpull_image).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `reference` | `String` | | Reference. |+| `kind` | `String` | | `container` or `vm`. |+| `location` | `String` | | Disk path (VM) or engine image reference (container). |+| `size_bytes` / `sizeBytes` | `u64` | | Size in bytes, when known. |++## `LocalStorage` record++What local Spaces have room for (see `Local.storage`).++Returned by [`Local.storage`](#localstorage).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `host_arch` / `hostArch` | `String` | | This host's architecture (`arm64`, `amd64`). |+| `reserve_bytes` / `reserveBytes` | `u64` | | Bytes cua keeps free on a volume: a create that would leave less fails (`CUA_DISK_MIN_FREE`, default 5 GiB). |+| `lume` | [`Option<StorageVolume>`](#storagevolume-record) | | Where Lume writes macOS VMs. |+| `qemu` | [`Option<StorageVolume>`](#storagevolume-record) | | Where QEMU writes VM disks and the containerDisk cache. |+| `container` | [`Option<StorageVolume>`](#storagevolume-record) | | The container engine's data disk (Colima, Docker Desktop, OrbStack, `/var/lib/docker`), when its free space can be read. |+| `pulled` | `Vec<String>` | | Catalog image refs already pulled here at their published digest. |+| `linux_runtime_download_bytes` / `linuxRuntimeDownloadBytes` | `u64` | | |++## `RuntimeCheck` record++One doctor check (one backend).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `String` | | Backend (`container`, `qemu`, `lume`, ...). |+| `status` | [`RuntimeCheckStatus`](#runtimecheckstatus-enum) | | Status. |+| `version` | `Option<String>` | | Version, when detected. |+| `detail` | `String` | | Explanation, missing pieces and what `setup` would do. |++## `SetupStep` record++One setup step.++Returned by [`Local.setup`](#localsetup).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `String` | | Component. |+| `status` | [`RuntimeCheckStatus`](#runtimecheckstatus-enum) | | Status after the step. |+| `detail` | `String` | | What was (or would be) done. |++## `StorageVolume` record++Space on the volume a local engine writes to.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `available_bytes` / `availableBytes` | `u64` | | Bytes available to this user. |+| `total_bytes` / `totalBytes` | `u64` | | Volume size in bytes. |+| `name` | `String` | | What a person calls it: `Macintosh HD`, `Colima`, `Docker Desktop`. |++## `RuntimeCheckStatus` enum++Status of one local runtime component.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+RuntimeCheckStatus.OK+RuntimeCheckStatus.INSTALLABLE+RuntimeCheckStatus.ERROR+RuntimeCheckStatus.NOT_APPLICABLE+RuntimeCheckStatus.UNKNOWN+```++</Tab>+<Tab value="TypeScript">++```ts+RuntimeCheckStatus.Ok+RuntimeCheckStatus.Installable+RuntimeCheckStatus.Error+RuntimeCheckStatus.NotApplicable+RuntimeCheckStatus.Unknown+```++</Tab>+<Tab value="Swift">++```swift+.ok+.installable+.error+.notApplicable+.unknown+```++</Tab>+<Tab value="Kotlin">++```kotlin+RuntimeCheckStatus.OK+RuntimeCheckStatus.INSTALLABLE+RuntimeCheckStatus.ERROR+RuntimeCheckStatus.NOT_APPLICABLE+RuntimeCheckStatus.UNKNOWN+```++</Tab>+<Tab value="Rust">++```rust+RuntimeCheckStatus::Ok+RuntimeCheckStatus::Installable+RuntimeCheckStatus::Error+RuntimeCheckStatus::NotApplicable+RuntimeCheckStatus::Unknown+```++</Tab>+</Tabs>++| Variant | Description |+| --- | --- |+| `Ok` | Present and usable. |+| `Installable` | Missing; `setup` can provision it. |+| `Error` | Missing or broken; needs user action. |+| `NotApplicable` | Not used on this host. |+| `Unknown` | Not reported. |diff --git a/docs/content/docs/cua-sdk/reference/errors.mdx b/docs/content/docs/cua-sdk/reference/errors.mdxindex 5029c0e718..2d53de9805 100644--- a/docs/content/docs/cua-sdk/reference/errors.mdx+++ b/docs/content/docs/cua-sdk/reference/errors.mdx@@ -14,7 +14,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';Every fallible call raises (throws) one error type, `CuaError`. Its variant says what went wrong; its message carries the detail; its doc URL links to the variant's entry on this page (`https://cua.ai/docs/cua-sdk/reference/errors#<variant in lower case>`).-The Python high-level API raises its own exceptions (`SpacesdNotAvailable`, `PoolSpecMismatch`, ...), listed on [Python: configuration and errors](/cua-sdk/reference/python/configuration#errors). cua-spacesd answers RPCs with a `google.rpc.Status` carrying [`ErrorInfo`](/cua-sdk/reference/protocol/env-common#errorinfo); the SDK maps it to the variants below.+The Python high-level API raises its own exceptions (`SpacesdNotAvailable`, `PoolSpecMismatch`, ...), listed on [Python: configuration and errors](/cua-sdk/reference/python/runtimes#errors). cua-spacesd answers RPCs with a `google.rpc.Status` carrying [`ErrorInfo`](/cua-sdk/reference/protocol/env-system#errorinfo); the SDK maps it to the variants below.| Language | Type | A variant | Doc URL || --- | --- | --- | --- |@@ -184,7 +184,7 @@ message names what is missing.**Message** `unsupported: <detail>`-**Raised by** [`Sandbox.guest_sh`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_sh), [`fleet_image_variant`](/cua-sdk/reference/fleet/images#fleet_image_variant), [`fleet_resolve_runtime`](/cua-sdk/reference/fleet/images#fleet_resolve_runtime), [`resolve_image`](/cua-sdk/reference/image#resolve_image)+**Raised by** [`Sandbox.guest_sh`](/cua-sdk/reference/spacesd#sandboxguest_sh), [`fleet_image_variant`](/cua-sdk/reference/fleet/images#fleet_image_variant), [`fleet_resolve_runtime`](/cua-sdk/reference/fleet/images#fleet_resolve_runtime), [`resolve_image`](/cua-sdk/reference/image#resolve_image)## `SpacesdNotAvailable`@@ -350,7 +350,7 @@ scope.**Message** `teleport refused: <detail>`-**Raised by** [`Space.teleport`](/cua-sdk/reference/spaces/teleport#spaceteleport)+**Raised by** [`Space.teleport`](/cua-sdk/reference/spaces/space#spaceteleport)## `PoolSpecMismatch`diff --git a/docs/content/docs/cua-sdk/reference/fleet/claims.mdx b/docs/content/docs/cua-sdk/reference/fleet/claims.mdxindex 7d0de802d1..c841e1574d 100644--- a/docs/content/docs/cua-sdk/reference/fleet/claims.mdx+++ b/docs/content/docs/cua-sdk/reference/fleet/claims.mdx@@ -14,8 +14,6 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';A claim binds one sandbox of a pool to you until you release it or its TTL passes.-Python programs usually use the high-level API instead: [`Pool.claim`](/cua-sdk/reference/python/pool#poolclaim).-## Claim methodsMethods of [`Fleet`](/cua-sdk/reference/fleet#fleet).diff --git a/docs/content/docs/cua-sdk/reference/fleet/index.mdx b/docs/content/docs/cua-sdk/reference/fleet/index.mdxindex 4810931261..ae834aec4b 100644--- a/docs/content/docs/cua-sdk/reference/fleet/index.mdx+++ b/docs/content/docs/cua-sdk/reference/fleet/index.mdx@@ -14,8 +14,6 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';`cua.fleet()` manages cloud capacity directly: named pools, [claims](/cua-sdk/reference/fleet/claims) and [images](/cua-sdk/reference/fleet/images). Most programs only need `Sandboxes.create` with `on: "cloud"`, which manages pools for you.-Python programs usually use the high-level API instead: [`cua_sandbox.Pool`](/cua-sdk/reference/python/pool#pool).-## `Fleet`Fleet control plane. Cua Cloud has ended: `Cua.fleet()` never returns@@ -931,11 +929,11 @@ not compared by `Fleet.check_pool_spec`).| `args` | `Option<Vec<String>>` | `None` | Arguments replacing the image CMD. || `env` | `HashMap<String, String>` | `[:]` | Plain environment variables (not secrets). || `services` | `HashMap<String, u16>` | `[:]` | Named services (name → guest port). |-| `readiness` | [`Option<ReadinessProbe>`](/cua-sdk/reference/sandbox/options#readinessprobe-record) | `None` | Readiness probe (`port`, or a declared `service`; `http_path` for HTTP). A replica binds a claim only once it passes. |+| `readiness` | [`Option<ReadinessProbe>`](/cua-sdk/reference/image#readinessprobe-record) | `None` | Readiness probe (`port`, or a declared `service`; `http_path` for HTTP). A replica binds a claim only once it passes. || `cpu` | `Option<u32>` | `None` | vCPUs. || `memory_mb` / `memoryMb` | `Option<u32>` | `None` | Memory (MiB). || `efi` | `bool` | `false` | UEFI firmware (Windows images). |-| `sidecars` | [`Vec<Container>`](/cua-sdk/reference/sandbox/options#container-record) | `[]` | Extra containers sharing the sandbox's network namespace. |+| `sidecars` | [`Vec<Container>`](/cua-sdk/reference/image#container-record) | `[]` | Extra containers sharing the sandbox's network namespace. || `registry_secret` / `registrySecret` | [`Option<RegistrySecret>`](/cua-sdk/reference/image#registrysecret-enum) | `None` | Credentials for a private image: stored as the pool's `cua-registry-*` pull Secret. || `registry_secret_name` / `registrySecretName` | `Option<String>` | `None` | An existing `cua-registry-*` pull Secret in the pool namespace (instead of `registry_secret`). || `process_mode` / `processMode` | `Option<String>` | `None` | `Legacy` or `Run` (`vmTemplate.processMode`). |diff --git a/docs/content/docs/cua-sdk/reference/image.mdx b/docs/content/docs/cua-sdk/reference/image.mdxindex 5fb078dbce..fa942ea6f7 100644--- a/docs/content/docs/cua-sdk/reference/image.mdx+++ b/docs/content/docs/cua-sdk/reference/image.mdx@@ -1,6 +1,6 @@----title: "Image"-description: "Canonical images, image references, build layers and registry credentials."+title: "Images and create options"+description: "Canonical images, image references, build layers, registry credentials, and the options `Sandboxes.create` takes."---{/*@@ -14,7 +14,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';Images are references: the functions here resolve and normalise them without pulling anything. `ImageBuild` layers and a `RegistrySecret` go into `SandboxCreateOptions`.-Python programs usually use the high-level API instead: [`cua_sandbox.Image`](/cua-sdk/reference/python/image#image).+Python programs usually use the high-level API instead: [`cua_sandbox.Image`](/cua-sdk/reference/python/sandbox#image).`canonical_image` names one public repository per OS; `CUA_IMAGE_LINUX`, `CUA_IMAGE_WINDOWS` and `CUA_IMAGE_MACOS` override it. The [image catalog details](/cua-sdk/reference/os-image-catalog) lists each image's variants, and [runtime support](/cua-sdk/reference/runtime-support) where each one runs.@@ -696,3 +696,92 @@ pub fn omarchy_image(channel: Option<String>) -> Result<String, CuaError>| `channel` | `Option<String>` | required |**Returns** `String` · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`ImageNotPublished`](/cua-sdk/reference/errors#imagenotpublished))++## Create options++`Sandboxes.create` takes one `SandboxCreateOptions`. Every field means the same thing locally and in the cloud; `on` picks where the sandbox runs, `kind` and `runtime` what runs it.++Python programs usually use the high-level API instead: [`Sandbox.create` parameters](/cua-sdk/reference/python/sandbox#sandboxcreate).++## `SandboxCreateOptions` record++Options for `Sandboxes.create`.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `on` | `Option<String>` | `None` | Where it runs: `local`, `cloud`, `direct:<addr>` (an existing machine running cua-spacesd) or a registered provider. `None` (the default): the cloud when `cloud` options (or the deprecated flat cloud fields) are set, else the user default (`default.on` in `~/.cua/config.toml`, `CUA_DEFAULT_ON`, else `local`). `local` together with `cloud` is an `InvalidArgument`. |+| `kind` | `Option<String>` | `None` | What kind of machine: `auto`, `container` or `vm`. `None`: the user default (`default.kind`, else `auto`: macOS and Windows images are VMs, an image with a container rootfs is a container, a disk-only image is a VM). |+| `runtime` | `Option<String>` | `None` | Which engine: `auto` or one the location offers for the kind (local `gvisor`, `runc`, `qemu`, `lume`; cloud `gvisor`, `kubevirt`). `None`: the user default (`default.runtime`, else `auto`, the safest available). A local sandbox with sidecars needs `runc` where gVisor would run. A combination that does not exist is `InvalidPlacement`, listing the valid values. |+| `image` | `String` | `""` | Image reference. Locally, `pool:<name>` runs that cloud pool's template image. |+| `name` | `Option<String>` | `None` | Name. `None`: ephemeral (cloud: released with the sandbox; the managed capacity stays for reuse). |+| `token` | `Option<String>` | `None` | spacesd token. |+| `pool` | `Option<String>` | `None` | Cua Cloud has ended: a pool fails with the "Cua Cloud has ended" error. |+| `os` | `Option<String>` | `None` | Guest OS (`linux`, `macos`, `windows`). |+| `cpus` | `Option<u32>` | `None` | vCPUs. |+| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory (MiB). |+| `ports` | `Vec<u16>` | `[]` | Extra guest ports (local: published). |+| `services` | `HashMap<String, u16>` | `[:]` | Named services (name → guest port). `env` defaults to 3211. |+| `wait_for` / `waitFor` | [`Vec<ReadinessProbe>`](#readinessprobe-record) | `[]` | Readiness probes. |+| `ready_timeout_ms` / `readyTimeoutMs` | `Option<u32>` | `None` | Readiness budget (default 10 min). |+| `env` | `HashMap<String, String>` | `[:]` | Guest environment (local: container environment or cloud-init; values are not secrets). |+| `fleet_replicas` / `fleetReplicas` | `Option<u32>` | `None` | Deprecated, and Cua Cloud has ended: initial replicas of a new managed pool (> 0 = warm). |+| `fleet_ttl_seconds` / `fleetTtlSeconds` | `Option<u32>` | `None` | Deprecated: use `cloud.claim_ttl_seconds`. |+| `warm` | `Option<bool>` | `None` | Deprecated: use `cloud.warm`. |+| `max_pool_size` / `maxPoolSize` | `Option<u32>` | `None` | Deprecated: use `cloud.max_pool_size`. |+| `command` | `Option<Vec<String>>` | `None` | The sandbox's command (argv), replacing the image's entrypoint. Same meaning local (container ENTRYPOINT, or run by cloud-init in a Linux VM) and in the cloud (the template command with `processMode: Run`, on gVisor and KubeVirt). |+| `cloud` | [`Option<CloudOptions>`](#cloudoptions-record) | `None` | Advanced cloud options (warm capacity, limits, TTL, runtime, a dedicated pool). They win over the deprecated flat fields. |+| `sidecars` | [`Vec<Container>`](#container-record) | `[]` | Sidecar containers, addressed by name (see `Container`). |+| `registry_secret` / `registrySecret` | [`Option<RegistrySecret>`](#registrysecret-enum) | `None` | Credentials for a private `image` (and sidecar images on its registry). |+| `build` | [`Option<ImageBuild>`](#imagebuild-record) | `None` | Image layers built on top of `image` (cloud: a remote build; local: a build into the container engine; both cached by content). |+| `network` | `Option<String>` | `None` | Guest network: `"default"` (unset) gives outbound network, like a Docker container; `"none"` cuts it while published ports still work. Only local QEMU VMs honour `"none"`; containers, Lume and cloud sandboxes reject it. |+| `overlays` | [`Vec<Overlay>`](/cua-sdk/reference/sandbox#overlay-record) | `[]` | Binaries to inject once the sandbox is up, so tests run the build under test and not the copy the image bundles (see `Overlay`; the same as calling `Sandbox.overlay` after create). Needs cua-spacesd in the image, or a local container. |+| `keep_on_failure` / `keepOnFailure` | `bool` | `false` | Keep a named sandbox whose readiness check fails (its cloud claim, VM or container, and its record) to debug it. `false` (the default): a failed create deletes what it made and releases the claim. Ephemeral sandboxes are always deleted. |+| `gpu` | `Option<String>` | `None` | A GPU option of the runtime it runs on (`Spaces.gpu_support` lists them): `paravirtual` (a macOS VM on Lume: GPU acceleration, experimental), `virgl` (QEMU on Linux), `nvidia` (a runc container on Linux), a contrib provider's GPU type; `auto` picks the runtime's own. `None` (the default): no GPU. |++## `CloudOptions` record++Advanced options for cloud sandboxes (warm capacity, limits, TTL, a+dedicated pool). Leave unset for the defaults. Setting them with `on`+unset means the cloud; with `on = "local"` they are an error.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `warm` | `Option<bool>` | `None` | Keep one warm replica of this image ready (faster next start). |+| `max_pool_size` / `maxPoolSize` | `Option<u32>` | `None` | Most sandboxes of this image at once (default 10). |+| `claim_ttl_seconds` / `claimTtlSeconds` | `Option<u32>` | `None` | Seconds the sandbox outlives this process without a keep-alive (renewed while held; default 15 min). |+| `pool` | `Option<String>` | `None` | Dedicated capacity: claim from this existing pool. The sandbox fields given alongside (image, command, env, services, sidecars, cpus, memory) must match its template, or creation fails with `PoolSpecMismatch` and a diff. |+| `apply` | `bool` | `false` | With `pool`: update the pool's template to the given fields instead of failing on a mismatch. Cua Cloud has ended: ignored. |++## `ReadinessProbe` record++A user-declared readiness probe. With no probes a sandbox is ready as+soon as its provider reports it running; nothing assumes a guest daemon.++Name a declared service (`service = "mcp"`) or a guest port.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `port` | `u16` | `0` | Guest port (0 with `service`). |+| `http_path` / `httpPath` | `Option<String>` | `None` | HTTP path; `None` is a TCP connect probe. |+| `http_status` / `httpStatus` | `Option<u16>` | `None` | Exact HTTP status to wait for; `None` accepts any 2xx. |+| `service` | `Option<String>` | `None` | A declared service whose guest port to probe (instead of `port`). |++## `Container` record++An extra container next to a sandbox (a compose-style sidecar),+addressed by name on every runtime: the sandbox reaches it at its+`name` (on its `ports`), it reaches the sandbox at `main`, and+`services` may name its ports (`{"db": 5432}`). Local containers run it+in the sandbox's network namespace (`localhost` works too; needs+`runtime="runc"`); cloud gVisor sandboxes run it in the same pod; cloud+VM (KubeVirt) sandboxes run it in a companion pod named in the guest's+`/etc/hosts`. Local VM sandboxes refuse sidecars. With sidecars the+service names `main`, `sidecars` and `sc` are reserved.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `image` | `String` | | Image reference. |+| `command` | `Option<Vec<String>>` | `None` | argv replacing the image's entrypoint. |+| `env` | `HashMap<String, String>` | `[:]` | Environment (plain values, not secrets). |+| `ports` | `Vec<u16>` | `[]` | Ports it listens on. |+| `name` | `Option<String>` | `None` | Name, unique within the sandbox, and its hostname (not `main`). Unset: from the image (`redis`). |diff --git a/docs/content/docs/cua-sdk/reference/index.mdx b/docs/content/docs/cua-sdk/reference/index.mdxindex 73df655b01..35c8579536 100644--- a/docs/content/docs/cua-sdk/reference/index.mdx+++ b/docs/content/docs/cua-sdk/reference/index.mdx@@ -10,9 +10,7 @@ description: "The Cua SDK reference: every object with its signature in Python,Version: 0.5.0*/}-The Cua SDK in Python, TypeScript, Swift, Kotlin and Rust, all generated from the Rust `cua-sdk` crate. Each page covers one object, with signatures in every language.--Pages marked *Cua Spaces app export* document the APIs the Cua Spaces apps are built on, not the SDK: source-available under FSL-1.1-MIT, Swift only.+The Cua SDK in Python, TypeScript, Swift, Kotlin and Rust, all generated from the Rust `cua-sdk` crate. Each page covers one module, with signatures in every language.| Language | Package | Import || --- | --- | --- |@@ -27,16 +25,12 @@ Pages marked *Cua Spaces app export* document the APIs the Cua Spaces apps are b| Page | Covers || --- | --- |-| [Cua client](/cua-sdk/reference/cua) | The Cua handle: embedded or daemon client, its configuration, and the SDK version. |-| [Sandbox](/cua-sdk/reference/sandbox) | Create, find, connect to and control sandboxes, locally, in the cloud or by address. |-| [Lifecycle](/cua-sdk/reference/sandbox/lifecycle) | Wait for, keep alive, suspend, resume, restart, detach and delete a sandbox. |-| [Without cua-spacesd](/cua-sdk/reference/sandbox/without-spacesd) | Run commands, take screenshots and open the display of a local Lume sandbox that has no cua-spacesd. |-| [Create options](/cua-sdk/reference/sandbox/options) | SandboxCreateOptions and what it holds: cloud options, readiness probes and sidecar containers. |-| [Image](/cua-sdk/reference/image) | Canonical images, image references, build layers and registry credentials. |+| [Cua client and local runtimes](/cua-sdk/reference/cua) | The Cua handle (embedded or daemon client, configuration, SDK version) and the local container and VM runtimes. |+| [Sandbox](/cua-sdk/reference/sandbox) | Create, find, connect to and control sandboxes, and their lifecycle: wait, suspend, resume, restart, detach and delete. |+| [Images and create options](/cua-sdk/reference/image) | Canonical images, image references, build layers, registry credentials, and the options `Sandboxes.create` takes. || [Image catalog details](/cua-sdk/reference/os-image-catalog) | The canonical images, their variants per backend and architecture. || [What's installed](/cua-sdk/reference/image-software) | The apps, tools and simulator runtimes in each image tier, as the strict doctor measured them. || [Services](/cua-sdk/reference/services) | Named services, port forwards, public URLs and MCP clients of a sandbox. |-| [Local runtimes](/cua-sdk/reference/local) | The container and VM runtimes this machine can host, their setup, and local images. || [Runtime support](/cua-sdk/reference/runtime-support) | Which images run on which local runtime and in the cloud. |## Cloud capacity@@ -51,74 +45,27 @@ Pages marked *Cua Spaces app export* document the APIs the Cua Spaces apps are b| Page | Covers || --- | --- |-| [Spacesd client](/cua-sdk/reference/spacesd) | SpacesdClient: the cua-spacesd client for processes, files, the desktop and media in a sandbox. |-| [Processes](/cua-sdk/reference/spacesd/shell) | Run, spawn and attach to processes in a sandbox through cua-spacesd. |+| [Spacesd client and processes](/cua-sdk/reference/spacesd) | SpacesdClient: the cua-spacesd client, running processes in a sandbox, and sandboxes without cua-spacesd. || [Files](/cua-sdk/reference/spacesd/files) | Upload, download, list and remove files in a sandbox through cua-spacesd. |-| [Computer](/cua-sdk/reference/spacesd/computer) | Screenshots, pointer, keyboard, clipboard and displays of a sandbox desktop through cua-spacesd. |-| [Media](/cua-sdk/reference/spacesd/media) | Video and audio streaming sessions and the sink callbacks you implement. |-| [Coding agents](/cua-sdk/reference/agents) | Run coding agents (Claude Code, Codex, Gemini CLI, OpenCode, ...) inside any sandbox. |+| [Computer and media](/cua-sdk/reference/spacesd/computer) | Screenshots, pointer, keyboard, clipboard and displays of a sandbox desktop, and its video and audio streams. |+| [Coding agents and setup](/cua-sdk/reference/agents) | Run coding agents (Claude Code, Codex, Gemini CLI, OpenCode, ...) inside any sandbox, and set them up on this machine. |## Spaces| Page | Covers || --- | --- |-| [Spaces](/cua-sdk/reference/spaces) | The Spaces registry: create, add, resolve, delete and remove Spaces. |-| [Create options](/cua-sdk/reference/spaces/create) | What `Spaces.create` takes and reports: options, progress, cancel and GPU acceleration. |-| [Space](/cua-sdk/reference/spaces/space) | A connected Space: shell, files, tools, windows and the hotspot. |-| [Cua Volume](/cua-sdk/reference/spaces/volume) | The versioned volume every Space and agent shares: files, history, grants, requests and audit. |-| [Cua Volume storage and sync](/cua-sdk/reference/spaces/volume-sync) | Where the drive keeps its bytes, the volume on this machine and in Spaces, sync across devices, and the block cache. |+| [Spaces](/cua-sdk/reference/spaces) | The Spaces registry: create, add, resolve, delete and remove Spaces, their create options, and agent runs in a Space. |+| [Space](/cua-sdk/reference/spaces/space) | A connected Space: shell, files, tools, windows, icons, displays, the hotspot and teleport. |+| [Cua Volume](/cua-sdk/reference/spaces/volume) | The versioned volume every Space and agent shares: files, history, grants, requests, audit, storage and sync. || [Streams and presence](/cua-sdk/reference/spaces/streams) | Media sessions of a Space and presence (who is connected, and their cursors). |-| [Windows, icons and displays](/cua-sdk/reference/spaces/windows) | A Space's app icons (batched, through the SDK's one icon cache), window previews, displays and memory and storage use. |-| [Agents in a Space](/cua-sdk/reference/spaces/agents) | Start, follow, message and stop coding-agent runs inside a Space. |-| [Persistent agents](/cua-sdk/reference/spaces/persistent-agents) | Named agents whose memory outlives their Space: homes in the Cua Volume, routines, notifications, pause and resume, access to your computers. |-| [Your cloud](/cua-sdk/reference/spaces/cloud) | Sandboxes and Spaces in your own AWS, Google Cloud or Modal account: connect, check, and sweep what Cua created there. |-| [Teleport](/cua-sdk/reference/spaces/teleport) | Move a running app between machines, with an approval callback. |-| [Decoded media](/cua-sdk/reference/spaces/decoded-media) | Media sessions that deliver decoded BGRA frames and PCM audio. *Cua Spaces app export.* |-| [Host teleport](/cua-sdk/reference/spaces/teleport-host) | The Teleport object of the Spaces apps: providers, manifests and sends from this machine. *Cua Spaces app export.* |-| [Teleport an app](/cua-sdk/reference/spaces/teleport-apps) | The app catalog, plans with consent, runs, drops and window drags. *Cua Spaces app export.* |-| [Spaces app core](/cua-sdk/reference/spaces/app-core) | The view models the Cua Spaces apps share: Space list, New Space wizard, teleport review, notch and Keyvault. *Cua Spaces app export.* |-| [Space list](/cua-sdk/reference/spaces/app-core/spaces) | The Space list (roster), the sidebar, a Space's detail and its remote windows. *Cua Spaces app export.* |-| [Creates and deletes](/cua-sdk/reference/spaces/app-core/creates) | Spaces being created or deleted: the rows they show at once, their progress and how they hand over to the registry. *Cua Spaces app export.* |-| [Stream section and facts](/cua-sdk/reference/spaces/app-core/stream) | A Space detail's Stream rows (desktop and windows with their icons and picture in picture) and its facts with live memory and storage use. *Cua Spaces app export.* |-| [New Space wizard](/cua-sdk/reference/spaces/app-core/new-space) | The New Space wizard: where it runs, image, engine, address and the create call. *Cua Spaces app export.* |-| [Image catalog](/cua-sdk/reference/spaces/app-core/images) | The images the New Space wizard offers: groups, sizes, the image field and its suggestions. *Cua Spaces app export.* |-| [Teleport picker](/cua-sdk/reference/spaces/app-core/teleport) | The teleport picker and its catalog. *Cua Spaces app export.* |-| [Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer) | The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space. *Cua Spaces app export.* |-| [Teleport plan and run](/cua-sdk/reference/spaces/app-core/teleport-run) | The teleport plan, its consent and capabilities, and the run's steps. *Cua Spaces app export.* |-| [Teleport review](/cua-sdk/reference/spaces/app-core/teleport-review) | The review and consent before a teleport: what to send per site, from the app or from the Keyvault, and the choice remembered for next time. *Cua Spaces app export.* |-| [Teleport picker grid](/cua-sdk/reference/spaces/app-core/teleport-grid) | The teleport picker's tiles in both apps: tabs, app and window tiles with their icon and preview sources, and the arrow keys. *Cua Spaces app export.* |-| [App core: Cua Volume storage, mount and sync](/cua-sdk/reference/spaces/volume-app-core) | Settings, Storage (this machine or an S3-compatible bucket, the Finder volume, the cache), the first run's Cua Volume page and the Drive page's devices and conflicts. *Cua Spaces app export.* |-| [App core: agents, drive, notifications](/cua-sdk/reference/spaces/agents-app-core) | The Agents page (persistent agents, memory, routines, computer access), the Drive page and the notifications the apps post. *Cua Spaces app export.* |-| [Your cloud](/cua-sdk/reference/spaces/app-core/cloud) | The "Connect a cloud" sheet and the New Space wizard's "Your cloud": providers with their found mark, Test that creates nothing, Connect, and what a connected cloud runs at what cost. *Cua Spaces app export.* |-| [Window drag trigger](/cua-sdk/reference/spaces/app-core/drag-trigger) | When dragging a window opens Teleport to Cua: move versus resize, the notch line and the dwell. *Cua Spaces app export.* |-| [Experiments](/cua-sdk/reference/spaces/app-core/experiments) | Settings > Experiments: the switches that hide Cua Volume, your own cloud and sharing until they are turned on. *Cua Spaces app export.* |-| [Run on](/cua-sdk/reference/spaces/app-core/run-on) | The New Space Run on menu: This Mac, your machines that provide Spaces, and connected clouds. *Cua Spaces app export.* |-| [Power button](/cua-sdk/reference/spaces/app-core/power) | The power button on a Space: suspend and resume, or turn off and on. *Cua Spaces app export.* |-| [Notch](/cua-sdk/reference/spaces/app-core/notch) | The notch switcher: state, events, layout on the screen and motion. *Cua Spaces app export.* |-| [Keyvault](/cua-sdk/reference/spaces/app-core/keyvault) | The Keyvault broker client and its overview: items, pending requests, grants, rules and audit. *Cua Spaces app export.* |-| [Keyvault screens](/cua-sdk/reference/spaces/app-core/keyvault-screens) | The Keyvault page, sidebar, the vault list (apps, sites and items with their locks), the unlock prompt and the approval prompt. *Cua Spaces app export.* |-| [Onboarding and settings](/cua-sdk/reference/spaces/app-core/onboarding-settings) | First-run onboarding, the settings file and the hotkey label. *Cua Spaces app export.* |-| [Onboarding previews](/cua-sdk/reference/spaces/app-core/onboarding-previews) | The animated miniatures on the onboarding cards: the background computer-use card, the notch and the menu bar. *Cua Spaces app export.* |-| [About, updates and launch](/cua-sdk/reference/spaces/app-core/about) | The About window and its update channel, what the apps do once they launch (the bundled cua install), and the daemon and refresh reports they read. *Cua Spaces app export.* |-| [App core: billing, relay usage and Teams](/cua-sdk/reference/spaces/account-app-core) | The Billing and Relay usage rows in Settings, the out-of-credit and relay allowance notices, and the Teams section. *Cua Spaces app export.* |-| [This machine](/cua-sdk/reference/spaces/app-core/this-machine) | The This machine roster entry, its page and the host setup form. *Cua Spaces app export.* |-| [Window, menu bar and Settings](/cua-sdk/reference/spaces/app-core/window) | The window chrome, a Space's toolbar and sections, the menu bar menu and Settings. *Cua Spaces app export.* |-| [Devices](/cua-sdk/reference/spaces/app-core/devices) | Settings > Devices: this device's enrollment, the account's devices, Recent Access, and the enroll and approval sheets. *Cua Spaces app export.* |-| [Settings, Agents](/cua-sdk/reference/spaces/app-core/agent-keys) | Settings > Agents: the coding agents' rows, the provider keys saved in the keychain, and the add or replace sheet. *Cua Spaces app export.* |-| [Share sheet](/cua-sdk/reference/spaces/app-core/share) | The Share sheet: who a Space is shared with (viewer or editor) and the share request to run. *Cua Spaces app export.* |-| [Machines page](/cua-sdk/reference/spaces/machines-app-core) | The Machines page's rows: this machine, your machines and your devices, each computer once. *Cua Spaces app export.* |-| [Getting started and the command palette](/cua-sdk/reference/spaces/app-checklist-palette) | The getting-started checklist, the command palette's ranking and the shared keyboard shortcuts. *Cua Spaces app export.* |-| [Usage telemetry](/cua-sdk/reference/spaces/app-core/telemetry) | Which anonymous usage events a Spaces app step means, and sending them. *Cua Spaces app export.* |-| [Devices](/cua-sdk/reference/spaces/devices) | This device as a client of the account on the relay: enroll, approve, rename, revoke and the audit log. |-| [Host and relay](/cua-sdk/reference/spaces/host) | Unattended host setup and the cua-relay directory client. |+| [Persistent agents and your cloud](/cua-sdk/reference/spaces/persistent-agents) | Named agents whose memory outlives their Space: homes in the Cua Volume, routines, notifications, pause and resume, access to your computers, and Spaces in your own AWS, Google Cloud or Modal account. |+| [Host, relay and devices](/cua-sdk/reference/spaces/host) | Unattended host setup, the cua-relay directory client, and this device's enrollment on the relay. |## Account| Page | Covers || --- | --- |-| [Auth](/cua-sdk/reference/auth) | Sign-in and the credential store the SDK, the CLI and the daemon share. |-| [Agent setup](/cua-sdk/reference/agent-setup) | Detect coding agents, install cua skills and configure their MCP servers. |-| [Telemetry](/cua-sdk/reference/telemetry) | Anonymous usage telemetry switches. |+| [Auth and telemetry](/cua-sdk/reference/auth) | Sign-in, the credential store the SDK, the CLI and the daemon share, and the telemetry switches. |## Errors and types@@ -142,5 +89,3 @@ 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`). |291 items, 385 methods. The [Types](/cua-sdk/reference/types) page lists them.--The Cua Spaces app export adds 783 items and 38 methods.diff --git a/docs/content/docs/cua-sdk/reference/local.mdx b/docs/content/docs/cua-sdk/reference/local.mdxdeleted file mode 100644index fa9fb9c9e3..0000000000--- a/docs/content/docs/cua-sdk/reference/local.mdx+++ /dev/null@@ -1,520 +0,0 @@-----title: "Local runtimes"-description: "The container and VM runtimes this machine can host, their setup, and local images."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--`cua.local()` checks and sets up the local runtimes and moves images in and out of the local engines.--Python programs usually use the high-level API instead: [`cua_sandbox` runtimes](/cua-sdk/reference/python/runtimes).--## `Local`--Local runtimes and images.--Returned by [`Cua.local`](/cua-sdk/reference/cua#cua).--| Method | Description |-| --- | --- |-| [`build_image`](#localbuild_image) | Builds an image from an `images.cua.ai/v1alpha1` Image resource (JSON) on `base`; pushes to `push` when set. |-| [`doctor`](#localdoctor) | Inspects local runtimes (read-only: never installs or starts anything). |-| [`pull_image`](#localpull_image) | Pulls an image (container engine for container refs, the image cache for `vm:` containerDisks). |-| [`push_image`](#localpush_image) | Copies an image (host architecture) to `destination`; returns the pushed manifest digest. |-| [`setup`](#localsetup) | Provisions `components` (`qemu`, `lume`; `runsc` reports its plan). |-| [`storage`](#localstorage) | Free space where local Spaces are written (Lume's VM storage, the cua home for QEMU, the container engine's data disk) and which catalog images are already pulled. |--### `Local.build_image`--Builds an image from an `images.cua.ai/v1alpha1` Image resource-(JSON) on `base`; pushes to `push` when set. Returns-`reference@digest` or the local output directory.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def build_image(self, spec_json: str, base: str, push: Optional[str]) -> str-```--</Tab>-<Tab value="TypeScript">--```ts-buildImage(specJson: string, base: string, push: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<string>-```--</Tab>-<Tab value="Swift">--```swift-func buildImage(specJson: String, base: String, push: String?) async throws -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun buildImage(specJson: String, base: String, push: String?): String-```--</Tab>-<Tab value="Rust">--```rust-pub async fn build_image(&self, spec_json: String, base: String, push: Option<String>) -> Result<String, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spec_json` | `String` | required |-| `base` | `String` | required |-| `push` | `Option<String>` | required |--**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Local.doctor`--Inspects local runtimes (read-only: never installs or starts-anything).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def doctor(self) -> DoctorReport-```--</Tab>-<Tab value="TypeScript">--```ts-doctor(asyncOpts_?: { signal: AbortSignal }): Promise<DoctorReport>-```--</Tab>-<Tab value="Swift">--```swift-func doctor() async throws -> DoctorReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun doctor(): DoctorReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn doctor(&self) -> Result<DoctorReport, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DoctorReport`](#doctorreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--**Example**--{/* Examples: scripts/docs-generators/examples/cua-sdk/Local.doctor.py, scripts/docs-generators/examples/cua-sdk/Local.doctor.swift, scripts/docs-generators/examples/cua-sdk/Local.doctor.kt */}--<Tabs items={['Python', 'Swift', 'Kotlin']} groupId="sdk-lang" persist>-<Tab value="Python">--```python test="docs" id="local-doctor-py" session="local-doctor-py"-import asyncio--import cua--async def main():- report = await cua.embedded().local().doctor()- for check in report.checks:- print(check.name, check.status)--asyncio.run(main())-```--</Tab>-<Tab value="Swift">--```swift test="swift" id="local-doctor-swift"-import Cua--let report = try await Cua.embedded().local().doctor()-for check in report.checks {- print(check.name, check.status)-}-```--</Tab>-<Tab value="Kotlin">--```kotlin test="kotlin" id="local-doctor-kt"-import ai.cua.sdk.Cua-import ai.cua.sdk.CuaConfig--val report = Cua.embedded(CuaConfig()).local().doctor()-for (check in report.checks) println("${check.name} ${check.status}")-```--</Tab>-</Tabs>--### `Local.pull_image`--Pulls an image (container engine for container refs, the image cache-for `vm:` containerDisks).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def pull_image(self, reference: str) -> LocalImage-```--</Tab>-<Tab value="TypeScript">--```ts-pullImage(reference: string, asyncOpts_?: { signal: AbortSignal }): Promise<LocalImage>-```--</Tab>-<Tab value="Swift">--```swift-func pullImage(reference: String) async throws -> LocalImage-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun pullImage(reference: String): LocalImage-```--</Tab>-<Tab value="Rust">--```rust-pub async fn pull_image(&self, reference: String) -> Result<LocalImage, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `reference` | `String` | required |--**Returns** [`LocalImage`](#localimage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Local.push_image`--Copies an image (host architecture) to `destination`; returns the-pushed manifest digest.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def push_image(self, reference: str, destination: str) -> str-```--</Tab>-<Tab value="TypeScript">--```ts-pushImage(reference: string, destination: string, asyncOpts_?: { signal: AbortSignal }): Promise<string>-```--</Tab>-<Tab value="Swift">--```swift-func pushImage(reference: String, destination: String) async throws -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun pushImage(reference: String, destination: String): String-```--</Tab>-<Tab value="Rust">--```rust-pub async fn push_image(&self, reference: String, destination: String) -> Result<String, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `reference` | `String` | required |-| `destination` | `String` | required |--**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Local.setup`--Provisions `components` (`qemu`, `lume`; `runsc` reports its plan).-Empty = everything provisionable. `dry_run` only reports.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def setup(self, components: List[str], dry_run: bool) -> List[SetupStep]-```--</Tab>-<Tab value="TypeScript">--```ts-setup(components: Array<string>, dryRun: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<Array<SetupStep>>-```--</Tab>-<Tab value="Swift">--```swift-func setup(components: [String], dryRun: Bool) async throws -> [SetupStep]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun setup(components: List<String>, dryRun: Boolean): List<SetupStep>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn setup(&self, components: Vec<String>, dry_run: bool) -> Result<Vec<SetupStep>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `components` | `Vec<String>` | required |-| `dry_run` | `bool` | required |--**Returns** [`Vec<SetupStep>`](#setupstep-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Local.storage`--Free space where local Spaces are written (Lume's VM storage, the-cua home for QEMU, the container engine's data disk) and which-catalog images are already pulled. Read-only and bounded; probed in-this process (the daemon runs on the same host).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def storage(self) -> LocalStorage-```--</Tab>-<Tab value="TypeScript">--```ts-storage(asyncOpts_?: { signal: AbortSignal }): Promise<LocalStorage>-```--</Tab>-<Tab value="Swift">--```swift-func storage() async throws -> LocalStorage-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun storage(): LocalStorage-```--</Tab>-<Tab value="Rust">--```rust-pub async fn storage(&self) -> Result<LocalStorage, CuaError>-```--</Tab>-</Tabs>--**Returns** [`LocalStorage`](#localstorage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `DoctorReport` record--Doctor output.--Returned by [`Local.doctor`](#localdoctor).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `checks` | [`Vec<RuntimeCheck>`](#runtimecheck-record) | | One check per backend. |-| `report_json` / `reportJson` | `String` | | The full cua-vmm host report as JSON. |--## `LocalImage` record--A local image.--Returned by [`Local.pull_image`](#localpull_image).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `reference` | `String` | | Reference. |-| `kind` | `String` | | `container` or `vm`. |-| `location` | `String` | | Disk path (VM) or engine image reference (container). |-| `size_bytes` / `sizeBytes` | `u64` | | Size in bytes, when known. |--## `LocalStorage` record--What local Spaces have room for (see `Local.storage`).--Returned by [`Local.storage`](#localstorage).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `host_arch` / `hostArch` | `String` | | This host's architecture (`arm64`, `amd64`). |-| `reserve_bytes` / `reserveBytes` | `u64` | | Bytes cua keeps free on a volume: a create that would leave less fails (`CUA_DISK_MIN_FREE`, default 5 GiB). |-| `lume` | [`Option<StorageVolume>`](#storagevolume-record) | | Where Lume writes macOS VMs. |-| `qemu` | [`Option<StorageVolume>`](#storagevolume-record) | | Where QEMU writes VM disks and the containerDisk cache. |-| `container` | [`Option<StorageVolume>`](#storagevolume-record) | | The container engine's data disk (Colima, Docker Desktop, OrbStack, `/var/lib/docker`), when its free space can be read. |-| `pulled` | `Vec<String>` | | Catalog image refs already pulled here at their published digest. |-| `linux_runtime_download_bytes` / `linuxRuntimeDownloadBytes` | `u64` | | |--## `RuntimeCheck` record--One doctor check (one backend).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | Backend (`container`, `qemu`, `lume`, ...). |-| `status` | [`RuntimeCheckStatus`](#runtimecheckstatus-enum) | | Status. |-| `version` | `Option<String>` | | Version, when detected. |-| `detail` | `String` | | Explanation, missing pieces and what `setup` would do. |--## `SetupStep` record--One setup step.--Returned by [`Local.setup`](#localsetup).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | Component. |-| `status` | [`RuntimeCheckStatus`](#runtimecheckstatus-enum) | | Status after the step. |-| `detail` | `String` | | What was (or would be) done. |--## `StorageVolume` record--Space on the volume a local engine writes to.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `available_bytes` / `availableBytes` | `u64` | | Bytes available to this user. |-| `total_bytes` / `totalBytes` | `u64` | | Volume size in bytes. |-| `name` | `String` | | What a person calls it: `Macintosh HD`, `Colima`, `Docker Desktop`. |--## `RuntimeCheckStatus` enum--Status of one local runtime component.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-RuntimeCheckStatus.OK-RuntimeCheckStatus.INSTALLABLE-RuntimeCheckStatus.ERROR-RuntimeCheckStatus.NOT_APPLICABLE-RuntimeCheckStatus.UNKNOWN-```--</Tab>-<Tab value="TypeScript">--```ts-RuntimeCheckStatus.Ok-RuntimeCheckStatus.Installable-RuntimeCheckStatus.Error-RuntimeCheckStatus.NotApplicable-RuntimeCheckStatus.Unknown-```--</Tab>-<Tab value="Swift">--```swift-.ok-.installable-.error-.notApplicable-.unknown-```--</Tab>-<Tab value="Kotlin">--```kotlin-RuntimeCheckStatus.OK-RuntimeCheckStatus.INSTALLABLE-RuntimeCheckStatus.ERROR-RuntimeCheckStatus.NOT_APPLICABLE-RuntimeCheckStatus.UNKNOWN-```--</Tab>-<Tab value="Rust">--```rust-RuntimeCheckStatus::Ok-RuntimeCheckStatus::Installable-RuntimeCheckStatus::Error-RuntimeCheckStatus::NotApplicable-RuntimeCheckStatus::Unknown-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Ok` | Present and usable. |-| `Installable` | Missing; `setup` can provision it. |-| `Error` | Missing or broken; needs user action. |-| `NotApplicable` | Not used on this host. |-| `Unknown` | Not reported. |diff --git a/docs/content/docs/cua-sdk/reference/meta.json b/docs/content/docs/cua-sdk/reference/meta.jsonindex e684cdbccc..5f212105ee 100644--- a/docs/content/docs/cua-sdk/reference/meta.json+++ b/docs/content/docs/cua-sdk/reference/meta.json@@ -8,7 +8,6 @@"os-image-catalog","image-software","services",- "local","runtime-support","---Cloud capacity---","fleet",@@ -19,8 +18,6 @@"spaces","---Account---","auth",- "agent-setup",- "telemetry","---Errors and types---","errors","types",diff --git a/docs/content/docs/cua-sdk/reference/protocol/daemon-runtimes.mdx b/docs/content/docs/cua-sdk/reference/protocol/daemon-runtimes.mdxdeleted file mode 100644index 5a87b2324b..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/daemon-runtimes.mdx+++ /dev/null@@ -1,190 +0,0 @@-----title: "Daemon: local runtimes"-description: "cua.daemon.v1 RuntimeService: the local engines and images the cua daemon orchestrates."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--The local runtimes (gVisor, runc, QEMU, Lume) and images the `cua daemon` orchestrates.--Source: `libs/cua/proto/cua/daemon/v1/runtime.proto`.--## RuntimeService--`cua.daemon.v1.RuntimeService`--Local runtime provisioning (`cua runtime doctor|setup`).--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`Doctor`](#runtimeservicedoctor) | [`DoctorRequest`](#doctorrequest) | [`DoctorResponse`](#doctorresponse) | unary |-| [`Setup`](#runtimeservicesetup) | [`SetupRequest`](#setuprequest) | [`SetupResponse`](#setupresponse) | unary |-| [`PullImage`](#runtimeservicepullimage) | [`PullImageRequest`](#pullimagerequest) | [`PullImageResponse`](#pullimageresponse) | unary |-| [`BuildImage`](#runtimeservicebuildimage) | [`BuildImageRequest`](#buildimagerequest) | [`BuildImageResponse`](#buildimageresponse) | unary |-| [`PushImage`](#runtimeservicepushimage) | [`PushImageRequest`](#pushimagerequest) | [`PushImageResponse`](#pushimageresponse) | unary |--### RuntimeService.Doctor--`/cua.daemon.v1.RuntimeService/Doctor`, unary: [`DoctorRequest`](#doctorrequest) to [`DoctorResponse`](#doctorresponse).--Inspects local runtimes (Lume, QEMU, container engine, runsc) without-changing anything.--### RuntimeService.Setup--`/cua.daemon.v1.RuntimeService/Setup`, unary: [`SetupRequest`](#setuprequest) to [`SetupResponse`](#setupresponse).--Installs or starts missing local runtime components. Every step is-explicit and logged in the response.--### RuntimeService.PullImage--`/cua.daemon.v1.RuntimeService/PullImage`, unary: [`PullImageRequest`](#pullimagerequest) to [`PullImageResponse`](#pullimageresponse).--Pulls an image into the local cache or container engine.--### RuntimeService.BuildImage--`/cua.daemon.v1.RuntimeService/BuildImage`, unary: [`BuildImageRequest`](#buildimagerequest) to [`BuildImageResponse`](#buildimageresponse).--Builds an image from an `images.cua.ai/v1alpha1` Image resource.--### RuntimeService.PushImage--`/cua.daemon.v1.RuntimeService/PushImage`, unary: [`PushImageRequest`](#pushimagerequest) to [`PushImageResponse`](#pushimageresponse).--Copies an image (host architecture) to another registry reference.--## Types in `cua/daemon/v1/runtime.proto`--### RuntimeCheck--One doctor check.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Component, for example "lume", "qemu", "docker", "runsc". |-| `status` | 2 | [`CheckStatus`](#checkstatus) | Status. |-| `version` | 3 | `string` | Detected version, when present. |-| `detail` | 4 | `string` | Explanation or remediation. |--### DoctorRequest--Request for `RuntimeService.Doctor`.--No fields.--### DoctorResponse--Response for `RuntimeService.Doctor`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `checks` | 1 | repeated [`RuntimeCheck`](#runtimecheck) | Checks, in a stable order. |-| `report_json` | 2 | `string` | The full host report (cua-vmm `DoctorReport`) as JSON. |--### SetupRequest--Request for `RuntimeService.Setup`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `components` | 1 | repeated `string` | Components to set up. Empty means every installable component. |-| `dry_run` | 2 | `bool` | Report the plan without changing anything. |--### SetupStep--One setup step.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Component. |-| `status` | 2 | [`CheckStatus`](#checkstatus) | Status after the step. |-| `detail` | 3 | `string` | What was done, or would be done on a dry run. |--### SetupResponse--Response for `RuntimeService.Setup`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `steps` | 1 | repeated [`SetupStep`](#setupstep) | Steps, in execution order. |--### LocalImage--A local image.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `reference` | 1 | `string` | Reference. |-| `kind` | 2 | `string` | `container` or `vm`. |-| `location` | 3 | `string` | Local disk path (VM images) or engine image reference (containers). |-| `size_bytes` | 4 | `uint64` | Size in bytes, when known. |--### PullImageRequest--Request for `RuntimeService.PullImage`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `reference` | 1 | `string` | Reference, with an optional backend prefix (`container:`, `vm:`). |--### PullImageResponse--Response for `RuntimeService.PullImage`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `image` | 1 | [`LocalImage`](#localimage) | The pulled image. |--### BuildImageRequest--Request for `RuntimeService.BuildImage`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `spec_json` | 1 | `string` | `images.cua.ai/v1alpha1` Image resource as JSON. |-| `base` | 2 | `string` | Base image, with an optional backend prefix (`container:`, `vm:`, `disk:`). |-| `push` | 3 | `string` | Push the result to this reference. Empty keeps it local. |--### BuildImageResponse--Response for `RuntimeService.BuildImage`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `result` | 1 | `string` | `reference@digest` when pushed, else the local output directory. |--### PushImageRequest--Request for `RuntimeService.PushImage`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `reference` | 1 | `string` | Source reference. |-| `destination` | 2 | `string` | Destination reference. |--### PushImageResponse--Response for `RuntimeService.PushImage`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `digest` | 1 | `string` | Pushed manifest digest. |--### CheckStatus--Status of one local runtime component.--| Value | # | Description |-| --- | --- | --- |-| `CHECK_STATUS_UNSPECIFIED` | 0 | Not reported. |-| `CHECK_STATUS_OK` | 1 | Present and usable. |-| `CHECK_STATUS_INSTALLABLE` | 2 | Missing, but `cua runtime setup` can install it. |-| `CHECK_STATUS_ERROR` | 3 | Missing or broken and needs user action. |-| `CHECK_STATUS_NOT_APPLICABLE` | 4 | Not applicable on this host. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/daemon-sandboxes.mdx b/docs/content/docs/cua-sdk/reference/protocol/daemon-sandboxes.mdxdeleted file mode 100644index 490e2fc2f0..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/daemon-sandboxes.mdx+++ /dev/null@@ -1,702 +0,0 @@-----title: "Daemon: sandboxes"-description: "cua.daemon.v1 SandboxService: the local cua daemon API for sandboxes in every location."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--The local `cua daemon` API (a Unix socket on the host, not cua-spacesd): sandbox lifecycle across locations.--Source: `libs/cua/proto/cua/daemon/v1/sandboxes.proto`.--## SandboxService--`cua.daemon.v1.SandboxService`--Sandbox lifecycle across providers (Fleet, local VMM, direct).--Sandboxes are daemon-agnostic: nothing here assumes cua-spacesd is-installed in the guest.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`ListSandboxes`](#sandboxservicelistsandboxes) | [`ListSandboxesRequest`](#listsandboxesrequest) | [`ListSandboxesResponse`](#listsandboxesresponse) | unary |-| [`CreateSandbox`](#sandboxservicecreatesandbox) | [`CreateSandboxRequest`](#createsandboxrequest) | [`CreateSandboxResponse`](#createsandboxresponse) | unary |-| [`CreateSandboxStream`](#sandboxservicecreatesandboxstream) | [`CreateSandboxStreamRequest`](#createsandboxstreamrequest) | [`CreateSandboxStreamResponse`](#createsandboxstreamresponse) | server stream |-| [`CancelCreateSandbox`](#sandboxservicecancelcreatesandbox) | [`CancelCreateSandboxRequest`](#cancelcreatesandboxrequest) | [`CancelCreateSandboxResponse`](#cancelcreatesandboxresponse) | unary |-| [`GetSandbox`](#sandboxservicegetsandbox) | [`GetSandboxRequest`](#getsandboxrequest) | [`GetSandboxResponse`](#getsandboxresponse) | unary |-| [`DeleteSandbox`](#sandboxservicedeletesandbox) | [`DeleteSandboxRequest`](#deletesandboxrequest) | [`DeleteSandboxResponse`](#deletesandboxresponse) | unary |-| [`ConnectSandbox`](#sandboxserviceconnectsandbox) | [`ConnectSandboxRequest`](#connectsandboxrequest) | [`ConnectSandboxResponse`](#connectsandboxresponse) | unary |-| [`SuspendSandbox`](#sandboxservicesuspendsandbox) | [`SuspendSandboxRequest`](#suspendsandboxrequest) | [`SuspendSandboxResponse`](#suspendsandboxresponse) | unary |-| [`ResumeSandbox`](#sandboxserviceresumesandbox) | [`ResumeSandboxRequest`](#resumesandboxrequest) | [`ResumeSandboxResponse`](#resumesandboxresponse) | unary |-| [`RestartSandbox`](#sandboxservicerestartsandbox) | [`RestartSandboxRequest`](#restartsandboxrequest) | [`RestartSandboxResponse`](#restartsandboxresponse) | unary |-| [`KeepAlive`](#sandboxservicekeepalive) | [`KeepAliveRequest`](#keepaliverequest) | [`KeepAliveResponse`](#keepaliveresponse) | unary |-| [`WaitReady`](#sandboxservicewaitready) | [`WaitReadyRequest`](#waitreadyrequest) | [`WaitReadyResponse`](#waitreadyresponse) | unary |-| [`ServiceRequest`](#sandboxserviceservicerequest) | [`ServiceRequestRequest`](#servicerequestrequest) | [`ServiceRequestResponse`](#servicerequestresponse) | unary |-| [`ForwardPort`](#sandboxserviceforwardport) | [`ForwardPortRequest`](#forwardportrequest) | [`ForwardPortResponse`](#forwardportresponse) | unary |-| [`CloseForward`](#sandboxservicecloseforward) | [`CloseForwardRequest`](#closeforwardrequest) | [`CloseForwardResponse`](#closeforwardresponse) | unary |-| [`GetEnvEndpoint`](#sandboxservicegetenvendpoint) | [`GetEnvEndpointRequest`](#getenvendpointrequest) | [`GetEnvEndpointResponse`](#getenvendpointresponse) | unary |-| [`GetServiceEndpoint`](#sandboxservicegetserviceendpoint) | [`GetServiceEndpointRequest`](#getserviceendpointrequest) | [`GetServiceEndpointResponse`](#getserviceendpointresponse) | unary |-| [`GetServiceUrl`](#sandboxservicegetserviceurl) | [`GetServiceUrlRequest`](#getserviceurlrequest) | [`GetServiceUrlResponse`](#getserviceurlresponse) | unary |-| [`CreatePublicUrl`](#sandboxservicecreatepublicurl) | [`CreatePublicUrlRequest`](#createpublicurlrequest) | [`CreatePublicUrlResponse`](#createpublicurlresponse) | unary |-| [`RevokePublicUrl`](#sandboxservicerevokepublicurl) | [`RevokePublicUrlRequest`](#revokepublicurlrequest) | [`RevokePublicUrlResponse`](#revokepublicurlresponse) | unary |--### SandboxService.ListSandboxes--`/cua.daemon.v1.SandboxService/ListSandboxes`, unary: [`ListSandboxesRequest`](#listsandboxesrequest) to [`ListSandboxesResponse`](#listsandboxesresponse).--Lists sandboxes known to the daemon.--### SandboxService.CreateSandbox--`/cua.daemon.v1.SandboxService/CreateSandbox`, unary: [`CreateSandboxRequest`](#createsandboxrequest) to [`CreateSandboxResponse`](#createsandboxresponse).--Creates a sandbox where `location` says (local by default), or-connects to an existing machine (`direct:<addr>`).--### SandboxService.CreateSandboxStream--`/cua.daemon.v1.SandboxService/CreateSandboxStream`, server stream: [`CreateSandboxStreamRequest`](#createsandboxstreamrequest) to [`CreateSandboxStreamResponse`](#createsandboxstreamresponse).--`CreateSandbox`, streaming what the create is doing: progress events-(pulling the image with its bytes, creating, booting, waiting for the-probes) in order, then exactly one `result`. A failed create ends the-stream with its status. Closing the stream cancels the create, as for-a `CreateSandbox` whose caller goes away.--### SandboxService.CancelCreateSandbox--`/cua.daemon.v1.SandboxService/CancelCreateSandbox`, unary: [`CancelCreateSandboxRequest`](#cancelcreatesandboxrequest) to [`CancelCreateSandboxResponse`](#cancelcreatesandboxresponse).--Cancels a `CreateSandbox` of a named sandbox still running: the work-in flight stops (an image download, a boot, a claim) and what the-create made is deleted; a sandbox of that name that existed before is-never touched. Finished image downloads stay cached. Returns once the-clean-up is done. Idempotent: `cancelled` is false when no create of-that name was running. A `CreateSandbox` whose caller goes away (a-closed connection) is cleaned up the same way.--### SandboxService.GetSandbox--`/cua.daemon.v1.SandboxService/GetSandbox`, unary: [`GetSandboxRequest`](#getsandboxrequest) to [`GetSandboxResponse`](#getsandboxresponse).--Returns one sandbox.--### SandboxService.DeleteSandbox--`/cua.daemon.v1.SandboxService/DeleteSandbox`, unary: [`DeleteSandboxRequest`](#deletesandboxrequest) to [`DeleteSandboxResponse`](#deletesandboxresponse).--Deletes (or releases, or detaches from) a sandbox.--### SandboxService.ConnectSandbox--`/cua.daemon.v1.SandboxService/ConnectSandbox`, unary: [`ConnectSandboxRequest`](#connectsandboxrequest) to [`ConnectSandboxResponse`](#connectsandboxresponse).--Reattaches to a sandbox by ref (a state file, a live cloud claim or an-address) and keeps the handle in the daemon.--### SandboxService.SuspendSandbox--`/cua.daemon.v1.SandboxService/SuspendSandbox`, unary: [`SuspendSandboxRequest`](#suspendsandboxrequest) to [`SuspendSandboxResponse`](#suspendsandboxresponse).--Suspends a sandbox (local: pause; Fleet: scale to zero).--### SandboxService.ResumeSandbox--`/cua.daemon.v1.SandboxService/ResumeSandbox`, unary: [`ResumeSandboxRequest`](#resumesandboxrequest) to [`ResumeSandboxResponse`](#resumesandboxresponse).--Resumes a suspended sandbox.--### SandboxService.RestartSandbox--`/cua.daemon.v1.SandboxService/RestartSandbox`, unary: [`RestartSandboxRequest`](#restartsandboxrequest) to [`RestartSandboxResponse`](#restartsandboxresponse).--Restarts a sandbox.--### SandboxService.KeepAlive--`/cua.daemon.v1.SandboxService/KeepAlive`, unary: [`KeepAliveRequest`](#keepaliverequest) to [`KeepAliveResponse`](#keepaliveresponse).--Extends a Fleet claim lease.--### SandboxService.WaitReady--`/cua.daemon.v1.SandboxService/WaitReady`, unary: [`WaitReadyRequest`](#waitreadyrequest) to [`WaitReadyResponse`](#waitreadyresponse).--Waits until user-declared readiness probes pass.--### SandboxService.ServiceRequest--`/cua.daemon.v1.SandboxService/ServiceRequest`, unary: [`ServiceRequestRequest`](#servicerequestrequest) to [`ServiceRequestResponse`](#servicerequestresponse).--Sends one HTTP request to a named service of a sandbox. Credentials-(for example the Fleet bearer) stay in the daemon.--### SandboxService.ForwardPort--`/cua.daemon.v1.SandboxService/ForwardPort`, unary: [`ForwardPortRequest`](#forwardportrequest) to [`ForwardPortResponse`](#forwardportresponse).--Forwards a daemon loopback port to a guest port.--### SandboxService.CloseForward--`/cua.daemon.v1.SandboxService/CloseForward`, unary: [`CloseForwardRequest`](#closeforwardrequest) to [`CloseForwardResponse`](#closeforwardresponse).--Stops a forward started by `ForwardPort`.--### SandboxService.GetEnvEndpoint--`/cua.daemon.v1.SandboxService/GetEnvEndpoint`, unary: [`GetEnvEndpointRequest`](#getenvendpointrequest) to [`GetEnvEndpointResponse`](#getenvendpointresponse).--Probes cua-spacesd in the sandbox and returns the daemon's loopback-passthrough endpoint for it. `cua.env.v1` calls sent there are proxied-with the sandbox credentials attached by the daemon.--### SandboxService.GetServiceEndpoint--`/cua.daemon.v1.SandboxService/GetServiceEndpoint`, unary: [`GetServiceEndpointRequest`](#getserviceendpointrequest) to [`GetServiceEndpointResponse`](#getserviceendpointresponse).--The daemon's loopback passthrough for a named service of a sandbox:-any HTTP request (any method, streamed both ways, headers passed-through) sent to `url` + path reaches that path on the service with the-sandbox's route and credentials attached by the daemon. For MCP-clients, SSE and anything else served over HTTP.--### SandboxService.GetServiceUrl--`/cua.daemon.v1.SandboxService/GetServiceUrl`, unary: [`GetServiceUrlRequest`](#getserviceurlrequest) to [`GetServiceUrlResponse`](#getserviceurlresponse).--Returns a URL for a named service usable from this machine without-credentials: the published loopback port locally, a signed service URL-in the cloud.--### SandboxService.CreatePublicUrl--`/cua.daemon.v1.SandboxService/CreatePublicUrl`, unary: [`CreatePublicUrlRequest`](#createpublicurlrequest) to [`CreatePublicUrlResponse`](#createpublicurlresponse).--Creates a shareable URL for a named service that expires: a signed-service URL in the cloud; locally a loopback proxy URL with its own-token, served by the daemon.--### SandboxService.RevokePublicUrl--`/cua.daemon.v1.SandboxService/RevokePublicUrl`, unary: [`RevokePublicUrlRequest`](#revokepublicurlrequest) to [`RevokePublicUrlResponse`](#revokepublicurlresponse).--Revokes a URL created by `CreatePublicUrl`.--## Types in `cua/daemon/v1/sandboxes.proto`--### Sandbox--A sandbox.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Name (unique within its location; see `id`). |-| `provider` | 2 | [`SandboxProvider`](#sandboxprovider) | Provider. |-| `state` | 3 | [`SandboxState`](#sandboxstate) | State. |-| `image` | 4 | `string` | Image reference, for example "ghcr.io/trycua/linux:24.04". |-| `endpoints` | 5 | map of `string` to `string` | Reachable endpoints by service name, for example {"env": "http://127.0.0.1:52011"}. |-| `labels` | 6 | map of `string` to `string` | User labels. |-| `created_at` | 7 | `google.protobuf.Timestamp` | Creation time. |-| `error` | 8 | `string` | Failure reason when `state` is `SANDBOX_STATE_FAILED`. |-| `runtime_type` | 9 | `string` | Runtime identifier as persisted in the state file (`fleet`, `direct`, `docker`, `qemu`, `lume`, ...). |-| `ephemeral` | 10 | `bool` | True when the sandbox has no state file and is torn down on delete. |-| `services` | 11 | map of `string` to `uint32` | Declared services: logical name to guest port (0 when only the name is known, for example on Fleet). |-| `location` | 12 | `string` | Where the sandbox runs: "local", "cloud", "direct" (a machine reached by address) or "relay". |-| `expires_at` | 13 | `google.protobuf.Timestamp` | When the sandbox expires unless kept alive. Unset when unknown or never (cloud sandboxes held by the daemon are renewed while held). |-| `provider_details` | 14 | map of `string` to `string` | Provider internals for debugging (cloud: pool, namespace, claim; local: backend, container_id). Not part of the portable API. |-| `id` | 15 | `string` | Qualified ref: "local:<name>", "cloud:<name>" or "direct:<host:port>". Every request's `name` accepts it (and a bare name when that name is unique across locations). |-| `kind` | 16 | `string` | What kind of machine it runs as: "container" or "vm"; empty when not known (an existing machine, or a cloud sandbox this daemon did not create). |-| `runtime` | 17 | `string` | The engine that runs it: "gvisor", "runc", "qemu", "lume" or "kubevirt"; empty when not known. |-| `stop_reason` | 18 | `string` | Why a local sandbox stopped without being asked to, in plain words: "out of memory", "killed", "exited" or "exited with code N". Empty otherwise, and once it is started again. |--### ReadinessProbe--A user-declared readiness probe. With no probes a sandbox is ready as soon-as its provider reports it running.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `port` | 1 | `uint32` | Guest port to probe. |-| `http_path` | 2 | `string` | HTTP path. Empty means a TCP connect probe. |-| `http_status` | 3 | `uint32` | Exact HTTP status to wait for. 0 accepts any 2xx. |--### Sidecar--An extra container sharing a sandbox's network namespace: the sandbox-reaches its ports on `localhost`, and `services` may name them. Local-containers and cloud container (gVisor) sandboxes only.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Name, unique within the sandbox (a DNS label other than `main`). Empty derives it from the image. |-| `image` | 2 | `string` | Image reference. |-| `command` | 3 | repeated `string` | argv replacing the image's entrypoint. Empty lets the image decide. |-| `env` | 4 | map of `string` to `string` | Environment (plain values, not secrets). |-| `ports` | 5 | repeated `uint32` | Ports it listens on. |--### RegistrySecret--Credentials for a private registry. Write-only: never logged, stored in-state files or returned.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `registry` | 1 | `string` | Registry host (`ghcr.io`, `localhost:5000`). Empty means the image's. |-| `username` | 2 | `string` | User name (`AWS` for ECR tokens). |-| `password` | 3 | `string` | Password or token. |--### ImageLayer--One image build step, as in `images.cua.ai/v1alpha1` recipes.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `type` | 1 | `string` | `apt_install`, `pip_install`, `uv_install`, `run` or `app_install`. |-| `packages` | 2 | repeated `string` | Packages (the install types). |-| `command` | 3 | `string` | Shell command (`run`). |-| `app_id` | 4 | `string` | App id (`app_install`). |--### BuildFile--A local file copied into a built image.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `source` | 1 | `string` | Path on the daemon's machine. |-| `destination` | 2 | `string` | Absolute path in the image. |--### ImageBuild--Image layers built on top of the sandbox's image. Cloud: a remote build-through the images API, cached by content.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `layers` | 1 | repeated [`ImageLayer`](#imagelayer) | Steps, in order. |-| `env` | 2 | map of `string` to `string` | Image environment. |-| `ports` | 3 | repeated `uint32` | Ports the image exposes. |-| `files` | 4 | repeated [`BuildFile`](#buildfile) | Files copied into the image. |-| `timeout` | 5 | `google.protobuf.Duration` | Build budget. Unset uses one hour. |--### ListSandboxesRequest--Request for `SandboxService.ListSandboxes`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `provider` | 1 | [`SandboxProvider`](#sandboxprovider) | Deprecated. Deprecated: use `location`. Only sandboxes of this provider. Unspecified lists all. |-| `include_cloud` | 2 | optional `bool` | Also list the account's live Fleet claims (not only the ones this machine knows) when the provider filter allows cloud sandboxes. Unset means true. Without Fleet credentials nothing is added. |-| `location` | 3 | `string` | Only sandboxes in this location: "local", "cloud" or "direct". Empty lists every location. Wins over `provider`. |--### ListSandboxesResponse--Response for `SandboxService.ListSandboxes`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `sandboxes` | 1 | repeated [`Sandbox`](#sandbox) | Sandboxes. |-| `warnings` | 2 | repeated `string` | What the listing left out, for example "cloud sandboxes not listed: <reason>". The listing still succeeds. |--### CreateSandboxRequest--Request for `SandboxService.CreateSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Desired name. Empty lets the daemon generate one. |-| `provider` | 2 | [`SandboxProvider`](#sandboxprovider) | Deprecated. Deprecated: use `location`. Used only when `location` is empty. |-| `image` | 3 | `string` | Image reference (local and cloud sandboxes). |-| `pool` | 4 | `string` | Cloud: claim from this existing pool (Fleets advanced API). |-| `url` | 5 | `string` | Deprecated: use `location` "direct:<addr>". The address of an existing machine. |-| `token` | 6 | `string` | Access token for the direct provider's spacesd, if any. |-| `labels` | 7 | map of `string` to `string` | User labels. |-| `os` | 8 | `string` | Guest OS: `linux` (default), `macos` or `windows`. |-| `cpus` | 9 | `uint32` | vCPUs. 0 uses the provider default. |-| `memory_mb` | 10 | `uint64` | Memory in MiB. 0 uses the provider default. |-| `ports` | 11 | repeated `uint32` | Extra guest ports to publish (local) or expose as `port-<n>` services (Fleet). |-| `services` | 12 | map of `string` to `uint32` | Named services: logical name to guest port. `env` defaults to 3211. |-| `wait_for` | 13 | repeated [`ReadinessProbe`](#readinessprobe) | Readiness probes. |-| `ready_timeout` | 14 | `google.protobuf.Duration` | Total readiness budget. Unset uses the provider default. |-| `env` | 15 | map of `string` to `string` | Guest environment. Local: container environment or cloud-init; cloud: the template environment (hashed into the managed pool key). |-| `fleet_runtime` | 16 | `string` | Deprecated. Deprecated: use `runtime`. Cloud runtime (`kubevirt`, `gvisor`), used when `runtime` is empty. |-| `fleet_replicas` | 17 | `uint32` | Deprecated: initial replicas of a new managed Fleet pool (> 0 means warm). 0 leaves it to `fleet_warm`. |-| `fleet_ttl_seconds` | 18 | `uint32` | Fleet claim TTL in seconds after creation. 0 uses the default (managed pools: `CUA_FLEET_CLAIM_TTL`, renewed by the daemon while the sandbox is held). |-| `fleet_warm` | 19 | optional `bool` | Managed Fleet pools (no `pool`): start a new pool with one warm replica. Unset uses `CUA_FLEET_WARM`. Existing pools are never resized. |-| `fleet_max_pool_size` | 20 | `uint32` | Managed Fleet pools: autoscaling ceiling. 0 uses the default (`CUA_FLEET_MAX_POOL_SIZE`, 10). |-| `command` | 21 | repeated `string` | The sandbox's command (argv), replacing the image's entrypoint. Empty lets the image decide. Local containers: ENTRYPOINT; local Linux VMs: run by cloud-init; cloud pod runtimes: the template command. Cloud VMs (KubeVirt) and macOS guests reject it. |-| `sidecars` | 22 | repeated [`Sidecar`](#sidecar) | Sidecar containers sharing the sandbox's network namespace. Local containers and cloud container sandboxes; VMs reject them. |-| `registry_secret` | 23 | [`RegistrySecret`](#registrysecret) | Credentials for a private `image` (and sidecar images on its registry): local pulls use them; the cloud stores them as the sandbox's registry pull Secret. Never logged or returned. |-| `build` | 24 | [`ImageBuild`](#imagebuild) | Image layers built on top of `image` before the sandbox starts. |-| `container_runtime` | 25 | `string` | Deprecated. Deprecated: use `runtime`. Local container sandboxes: `runc` or `gvisor`, used when `runtime` is empty. Cloud sandboxes ignore it. |-| `fleet_apply` | 26 | `bool` | With `pool`: update that pool's template to the sandbox fields given here (image, command, env, services, sidecars, cpus, memory) instead of failing with POOL_SPEC_MISMATCH when they differ. Managed pools refuse. |-| `owner_pid` | 27 | `uint32` | The client process that owns an ephemeral sandbox (no `name`). The daemon records it in the sandbox's lease, so a local ephemeral sandbox is reaped after its client dies even while the daemon runs. 0: the daemon itself owns it. |-| `network` | 28 | `string` | Guest network: empty or `default` gives outbound network (like a Docker container); `none` cuts egress while published ports still work. Only local QEMU VMs honour `none`; containers, Lume and cloud sandboxes reject it. |-| `location` | 29 | `string` | Where it runs: "local", "cloud", "direct:<addr>" (an existing machine running cua-spacesd), or a registered provider (SANDBOX_PROVIDER_CONTRIB, e.g. "e2b"). Empty uses the default (`default.on` in the config, `CUA_DEFAULT_ON`, else "local"); clients resolve the default on their side and send it explicitly. |-| `kind` | 30 | `string` | What kind of machine: "auto" (empty), "container" or "vm". Auto decides from the image: macOS and Windows images are VMs, an image with a container rootfs is a container, a disk-only image is a VM. |-| `runtime` | 31 | `string` | Which engine: "auto" (empty) or one the location offers for the kind. Local: "gvisor", "runc" (containers), "qemu", "lume" (VMs). Cloud: "gvisor" (containers), "kubevirt" (VMs). A registered provider offers its own engines. Anything else is DAEMON_ERROR_REASON_INVALID_PLACEMENT, listing the valid values. |-| `keep_on_failure` | 32 | `bool` | Keep a named sandbox whose readiness check fails (its cloud claim, VM or container, and its record) for debugging. False: a failed create deletes what it made and releases the claim. Ephemeral sandboxes are always deleted. |-| `gpu` | 33 | `string` | A GPU option of the runtime it runs on (`GetGpuSupport`): "paravirtual" (a macOS VM on Lume: GPU acceleration, experimental), "virgl" (QEMU on Linux), "nvidia" (a runc container on Linux), a contrib provider's GPU type; "auto" picks the runtime's own. Empty: no GPU. An option the runtime does not offer here is DAEMON_ERROR_REASON_INVALID_ARGUMENT or _UNSUPPORTED, saying why. |--### CreateSandboxResponse--Response for `SandboxService.CreateSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `sandbox` | 1 | [`Sandbox`](#sandbox) | The sandbox. |--### CreateSandboxStreamRequest--Request for `SandboxService.CreateSandboxStream`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `create` | 1 | [`CreateSandboxRequest`](#createsandboxrequest) | The create, as for `CreateSandbox`. |--### CreateSandboxStreamResponse--One message of `SandboxService.CreateSandboxStream`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `progress` | 1 | [`CreateSpaceProgress`](/cua-sdk/reference/protocol/daemon-spaces#createspaceprogress) (oneof `event`) | What the create is doing now (`space` is empty). |-| `result` | 2 | [`CreateSandboxResponse`](#createsandboxresponse) (oneof `event`) | The created sandbox (the last message). |--### GetSandboxRequest--Request for `SandboxService.GetSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |--### GetSandboxResponse--Response for `SandboxService.GetSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `sandbox` | 1 | [`Sandbox`](#sandbox) | The sandbox. |--### CancelCreateSandboxRequest--Request for `SandboxService.CancelCreateSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | The sandbox's name. |--### CancelCreateSandboxResponse--Response for `SandboxService.CancelCreateSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `cancelled` | 1 | `bool` | A create of that name was running and was stopped. |-| `message` | 2 | `string` | What was removed and what stays, for people. |--### DeleteSandboxRequest--Request for `SandboxService.DeleteSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |--### DeleteSandboxResponse--Response for `SandboxService.DeleteSandbox`.--No fields.--### ConnectSandboxRequest--Request for `SandboxService.ConnectSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |--### ConnectSandboxResponse--Response for `SandboxService.ConnectSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `sandbox` | 1 | [`Sandbox`](#sandbox) | The sandbox. |--### SuspendSandboxRequest--Request for `SandboxService.SuspendSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |--### SuspendSandboxResponse--Response for `SandboxService.SuspendSandbox`.--No fields.--### ResumeSandboxRequest--Request for `SandboxService.ResumeSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |--### ResumeSandboxResponse--Response for `SandboxService.ResumeSandbox`.--No fields.--### RestartSandboxRequest--Request for `SandboxService.RestartSandbox`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |--### RestartSandboxResponse--Response for `SandboxService.RestartSandbox`.--No fields.--### KeepAliveRequest--Request for `SandboxService.KeepAlive`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `duration` | 2 | `google.protobuf.Duration` | How long to extend the lease by. |--### KeepAliveResponse--Response for `SandboxService.KeepAlive`.--No fields.--### WaitReadyRequest--Request for `SandboxService.WaitReady`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `probes` | 2 | repeated [`ReadinessProbe`](#readinessprobe) | Probes to wait for. |-| `timeout` | 3 | `google.protobuf.Duration` | Total budget. |--### WaitReadyResponse--Response for `SandboxService.WaitReady`.--No fields.--### HttpHeader--One HTTP header.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Header name. |-| `value` | 2 | `string` | Header value. |--### ServiceRequestRequest--Request for `SandboxService.ServiceRequest`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `service` | 2 | `string` | Logical service name, for example "env" or "server". |-| `method` | 3 | `string` | HTTP method. Empty means GET. |-| `path` | 4 | `string` | Path (and query) under the service. |-| `body` | 5 | `bytes` | Request body. |-| `timeout` | 6 | `google.protobuf.Duration` | Timeout. Unset means 30 seconds. |-| `headers` | 7 | repeated [`HttpHeader`](#httpheader) | Request headers (for example content-type, or accept and mcp-session-id for MCP). On Fleet the gateway bearer and claim header are added by the daemon and may not be set here. |--### ServiceRequestResponse--Response for `SandboxService.ServiceRequest`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `status` | 1 | `uint32` | HTTP status. |-| `headers` | 2 | repeated [`HttpHeader`](#httpheader) | Response headers. |-| `body` | 3 | `bytes` | Response body. |--### ForwardPortRequest--Request for `SandboxService.ForwardPort`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `port` | 2 | `uint32` | Guest port. |--### ForwardPortResponse--Response for `SandboxService.ForwardPort`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `forward_id` | 1 | `string` | Forward id for `CloseForward`. Empty when no listener was started (the port is only reachable as `url`). |-| `guest_port` | 2 | `uint32` | Guest port. |-| `local_addr` | 3 | `string` | Loopback `host:port` accepting connections, when a TCP forward runs. |-| `url` | 4 | `string` | URL to use (a loopback URL, or the Fleet gateway URL of the port's service). |--### CloseForwardRequest--Request for `SandboxService.CloseForward`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `forward_id` | 1 | `string` | Forward id. |--### CloseForwardResponse--Response for `SandboxService.CloseForward`.--No fields.--### GetEnvEndpointRequest--Request for `SandboxService.GetEnvEndpoint`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `probe_timeout` | 2 | `google.protobuf.Duration` | Probe timeout. Unset uses the daemon default. |--### GetServiceEndpointRequest--Request for `SandboxService.GetServiceEndpoint`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `service` | 2 | `string` | Service name, for example "mcp". |--### GetServiceEndpointResponse--Response for `SandboxService.GetServiceEndpoint`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `url` | 1 | `string` | Base URL, for example "http://127.0.0.1:52011/v1/sandboxes/dev/svc/mcp". Append the path. |-| `headers` | 2 | repeated [`HttpHeader`](#httpheader) | Headers every request needs (the daemon's loopback bearer). |--### GetEnvEndpointResponse--Response for `SandboxService.GetEnvEndpoint`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `url` | 1 | `string` | Loopback passthrough base URL, for example "http://127.0.0.1:52011/v1/sandboxes/dev/env". Append the gRPC path. |-| `token` | 2 | `string` | Bearer token for the passthrough (the daemon's loopback token). |-| `spacesd_version` | 3 | `string` | spacesd version reported by the probe. |--### GetServiceUrlRequest--Request for `SandboxService.GetServiceUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `service` | 2 | `string` | Logical service name. |--### GetServiceUrlResponse--Response for `SandboxService.GetServiceUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `url` | 1 | `string` | The URL (no trailing slash). |--### PublicUrl--A shareable, expiring URL of a sandbox service.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Id for `RevokePublicUrl`. |-| `url` | 2 | `string` | The URL. |-| `expires_at` | 3 | `google.protobuf.Timestamp` | When it stops working. |-| `sandbox` | 4 | `string` | Sandbox name. |-| `service` | 5 | `string` | Logical service name. |-| `provider_details` | 6 | map of `string` to `string` | Provider internals (cloud: namespace, claim; local: upstream). |--### CreatePublicUrlRequest--Request for `SandboxService.CreatePublicUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref or unique name (with `upstream_url`, only recorded). |-| `service` | 2 | `string` | Logical service name. |-| `ttl` | 3 | `google.protobuf.Duration` | Lifetime, 60 s to 24 h. Unset means 1 h. |-| `label` | 4 | `string` | Label shown in listings (cloud). |-| `upstream_url` | 5 | `string` | Share this loopback `http://` URL instead of resolving `name` and `service` (an embedded SDK runtime asking the daemon to host its URL). |--### CreatePublicUrlResponse--Response for `SandboxService.CreatePublicUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `public_url` | 1 | [`PublicUrl`](#publicurl) | The URL. |--### RevokePublicUrlRequest--Request for `SandboxService.RevokePublicUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |-| `id` | 2 | `string` | `PublicUrl.id`. |--### RevokePublicUrlResponse--Response for `SandboxService.RevokePublicUrl`.--No fields.--### SandboxProvider--Where a sandbox comes from. Deprecated: requests use the `location`-string (`local`, `cloud`, `direct:<addr>`), which also names third-party-providers; responses carry `Sandbox.location`.--| Value | # | Description |-| --- | --- | --- |-| `SANDBOX_PROVIDER_UNSPECIFIED` | 0 | Not set. |-| `SANDBOX_PROVIDER_FLEET` | 1 | Claimed from a Fleet pool. |-| `SANDBOX_PROVIDER_LOCAL` | 2 | Run locally through cua-vmm (Lume, QEMU, container). |-| `SANDBOX_PROVIDER_DIRECT` | 3 | An existing machine reached by URL and token. |-| `SANDBOX_PROVIDER_CONTRIB` | 4 | A contrib provider (third-party platform). |--### SandboxState--Sandbox lifecycle state.--| Value | # | Description |-| --- | --- | --- |-| `SANDBOX_STATE_UNSPECIFIED` | 0 | Not reported. |-| `SANDBOX_STATE_PROVISIONING` | 1 | Being created or booted. |-| `SANDBOX_STATE_RUNNING` | 2 | Running and ready (per its readiness probes). |-| `SANDBOX_STATE_STOPPED` | 3 | Suspended or stopped; can resume. |-| `SANDBOX_STATE_DELETING` | 4 | Being deleted. |-| `SANDBOX_STATE_FAILED` | 5 | Failed; see `Sandbox.error`. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/daemon-service.mdx b/docs/content/docs/cua-sdk/reference/protocol/daemon-service.mdxdeleted file mode 100644index 3df921fc17..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/daemon-service.mdx+++ /dev/null@@ -1,146 +0,0 @@-----title: "Daemon: service"-description: "cua.daemon.v1 DaemonService: the local cua daemon identity and the loopback media bridge for webviews."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--The `cua daemon` identity (`GetInfo`) and the loopback media bridge for webviews.--Source: `libs/cua/proto/cua/daemon/v1/daemon.proto`.--## DaemonService--`cua.daemon.v1.DaemonService`--The daemon itself: identity, the loopback bridge for webviews, shutdown.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`GetInfo`](#daemonservicegetinfo) | [`GetInfoRequest`](#getinforequest) | [`GetInfoResponse`](#getinforesponse) | unary |-| [`OpenMediaBridge`](#daemonserviceopenmediabridge) | [`OpenMediaBridgeRequest`](#openmediabridgerequest) | [`OpenMediaBridgeResponse`](#openmediabridgeresponse) | unary |-| [`Shutdown`](#daemonserviceshutdown) | [`ShutdownRequest`](#shutdownrequest) | [`ShutdownResponse`](#shutdownresponse) | unary |--### DaemonService.GetInfo--`/cua.daemon.v1.DaemonService/GetInfo`, unary: [`GetInfoRequest`](#getinforequest) to [`GetInfoResponse`](#getinforesponse).--Returns the daemon identity and its loopback endpoint.--### DaemonService.OpenMediaBridge--`/cua.daemon.v1.DaemonService/OpenMediaBridge`, unary: [`OpenMediaBridgeRequest`](#openmediabridgerequest) to [`OpenMediaBridgeResponse`](#openmediabridgeresponse).--Opens a media session in a sandbox and returns a loopback WebSocket URL-that relays it. The URL carries a short-lived bridge ticket; the-browser never sees the Fleet bearer or the spacesd token.--### DaemonService.Shutdown--`/cua.daemon.v1.DaemonService/Shutdown`, unary: [`ShutdownRequest`](#shutdownrequest) to [`ShutdownResponse`](#shutdownresponse).--Stops the daemon after the response is sent.--## Types in `cua/daemon/v1/daemon.proto`--### DaemonErrorInfo--Structured error detail of daemon RPCs.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `reason` | 1 | [`DaemonErrorReason`](#daemonerrorreason) | Reason. |-| `message` | 2 | `string` | Human-readable message. |-| `metadata` | 3 | map of `string` to `string` | Extra context. |--### GetInfoRequest--Request for `DaemonService.GetInfo`.--No fields.--### GetInfoResponse--Response for `DaemonService.GetInfo`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `version` | 1 | `string` | cua-daemon version. |-| `pid` | 2 | `uint32` | Process id. |-| `socket_path` | 3 | `string` | Unix socket path, when listening on one. |-| `loopback_url` | 4 | `string` | Loopback base URL (`http://127.0.0.1:<port>`) serving the same services, the env passthrough and the media bridge. |-| `loopback_token` | 5 | `string` | Bearer token of the loopback listener. |-| `features` | 6 | repeated `string` | Compiled-in SDK features, for example "env", "fleet", "local". |-| `started_at` | 7 | `google.protobuf.Timestamp` | When the daemon started. |-| `executable` | 8 | `string` | The daemon's executable (symlinks resolved), so a client bound to an app bundle can tell its own daemon from another app's. Empty from daemons that predate it. |-| `build_id` | 9 | `string` | The executable's build as it was when the daemon started (version, size and modification time), so a client can tell a daemon whose executable was rebuilt or updated since. Empty from daemons that predate it. |--### OpenMediaBridgeRequest--Request for `DaemonService.OpenMediaBridge`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Sandbox name. |-| `open_media_json` | 2 | `string` | `cua.env.v1.OpenMediaRequest` in canonical proto3 JSON. Empty opens the primary display with defaults. |--### OpenMediaBridgeResponse--Response for `DaemonService.OpenMediaBridge`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `ws_url` | 1 | `string` | Loopback WebSocket URL, for example "ws://127.0.0.1:52011/v1/bridge/media?ticket=...". Speaks rcdp wire v2 unchanged. |-| `ticket` | 2 | `string` | Bridge ticket (also in `ws_url`). |-| `expires_at` | 3 | `google.protobuf.Timestamp` | When the bridge ticket stops accepting new attaches. |-| `open_media_response_json` | 4 | `string` | `cua.env.v1.OpenMediaResponse` in canonical proto3 JSON, with the upstream ticket removed. |--### ShutdownRequest--Request for `DaemonService.Shutdown`.--No fields.--### ShutdownResponse--Response for `DaemonService.Shutdown`.--No fields.--### DaemonErrorReason--Why a daemon call failed. Packed as `DaemonErrorInfo` in the-`google.rpc.Status` details of every daemon error.--| Value | # | Description |-| --- | --- | --- |-| `DAEMON_ERROR_REASON_UNSPECIFIED` | 0 | Unknown. |-| `DAEMON_ERROR_REASON_INVALID_ARGUMENT` | 1 | Bad input. |-| `DAEMON_ERROR_REASON_NOT_FOUND` | 2 | No such sandbox, forward or bridge. |-| `DAEMON_ERROR_REASON_PROVIDER_NOT_CONFIGURED` | 3 | The provider is not configured in the daemon (for example no Fleet credentials). |-| `DAEMON_ERROR_REASON_UNSUPPORTED` | 4 | The provider or build cannot do this. |-| `DAEMON_ERROR_REASON_SPACESD_NOT_AVAILABLE` | 5 | No cua-spacesd answered in the sandbox. |-| `DAEMON_ERROR_REASON_TIMEOUT` | 6 | A deadline elapsed. |-| `DAEMON_ERROR_REASON_FLEET` | 7 | Fleet API failure. |-| `DAEMON_ERROR_REASON_RUNTIME` | 8 | Local runtime failure. |-| `DAEMON_ERROR_REASON_ENV` | 9 | spacesd call failure. |-| `DAEMON_ERROR_REASON_HTTP` | 10 | HTTP failure talking to a sandbox service. |-| `DAEMON_ERROR_REASON_INTERNAL` | 11 | Daemon bug or I/O failure. |-| `DAEMON_ERROR_REASON_UNAUTHENTICATED` | 12 | Missing or wrong daemon token. |-| `DAEMON_ERROR_REASON_CAPABILITY_MISSING` | 13 | The Space's spacesd reports a feature the call needs as unsupported. |-| `DAEMON_ERROR_REASON_HOST_CAPABILITY_MISSING` | 14 | A host-side prerequisite (app-session providers, an operator display, a local runtime) is not available. |-| `DAEMON_ERROR_REASON_TELEPORT_REFUSED` | 15 | The teleport consent gate refused. |-| `DAEMON_ERROR_REASON_POOL_SPEC_MISMATCH` | 16 | A named cloud pool's template differs from the requested sandbox fields (pass apply to update it). |-| `DAEMON_ERROR_REASON_CLAIM_SECRETS_NOT_DELIVERED` | 17 | A claim bound but its per-claim secrets never reached the sandbox; the claim was released. |-| `DAEMON_ERROR_REASON_AMBIGUOUS_SANDBOX` | 18 | A bare sandbox name matches sandboxes in more than one location. The qualified candidates are in `DaemonErrorInfo.metadata["candidates"]` (comma-separated, for example "local:box,cloud:box"). |-| `DAEMON_ERROR_REASON_INSUFFICIENT_DISK` | 19 | A pull, build or VM create would leave less than the configured minimum free disk space; nothing was written (`cua cache prune` frees space). |-| `DAEMON_ERROR_REASON_INVALID_PLACEMENT` | 20 | A location, kind or runtime that does not exist, or a combination of them (or with the image) that does not. The accepted values are in `DaemonErrorInfo.metadata["valid"]` (comma-separated, for example "auto,gvisor,runc") and the axis in `metadata["axis"]` ("on", "kind", "runtime" or "image"). |-| `DAEMON_ERROR_REASON_FLEET_ADMISSION_DENIED` | 21 | Fleet's admission refused a write, for example a sandbox size over the account's limits. The message is Fleet's and names the limit. |-| `DAEMON_ERROR_REASON_CLOUD_CREDIT_EXHAUSTED` | 22 | The account is out of Cua Cloud credit (no credit left, and no card or plan): new cloud sandboxes are refused, running ones keep running. The message ends with the website billing page's URL. |-| `DAEMON_ERROR_REASON_CANCELLED` | 23 | The create was cancelled (`CancelCreateSpace`, or its caller went away); what it made is gone. The message says what was removed and what stays (finished image downloads stay cached). |-| `DAEMON_ERROR_REASON_CLOUD` | 24 | Your own cloud account (AWS, Google Cloud, Modal) refused or failed a call Cua made there: a missing permission, a quota, a region without the machine type. The message names the cloud's own error. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/daemon-spaces.mdx b/docs/content/docs/cua-sdk/reference/protocol/daemon-spaces.mdxdeleted file mode 100644index 42a8ddd92e..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/daemon-spaces.mdx+++ /dev/null@@ -1,610 +0,0 @@-----title: "Daemon: Spaces"-description: "cua.daemon.v1 SpaceService: Spaces and the hosts that provide them, through the local cua daemon."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--Spaces through the local `cua daemon`: create, list, power, delete, and the machines that provide Spaces.--Source: `libs/cua/proto/cua/daemon/v1/spaces.proto`.--## SpaceService--`cua.daemon.v1.SpaceService`--Spaces: sandboxes with Spaces features (cua-spacesd, streams, agents,-teleport) that the user works in interactively. The daemon hosts one-`cua_spaces::Spaces` runtime: the registry in `~/.cua/spaces.json`-(tokens in the 0600 `spaces-credentials.json`), Space creation in every-location, hotspots, and the Spaces MCP server (`CallSpaceTool`,-`cua daemon mcp`, `/mcp`).--Verbs: `CreateSpace` / `DeleteSpace` create and delete the sandbox;-`AddSpace` / `RemoveSpace` register an existing machine and forget it-without touching it.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`AddSpace`](#spaceserviceaddspace) | [`AddSpaceRequest`](#addspacerequest) | [`AddSpaceResponse`](#addspaceresponse) | unary |-| [`ListSpaces`](#spaceservicelistspaces) | [`ListSpacesRequest`](#listspacesrequest) | [`ListSpacesResponse`](#listspacesresponse) | unary |-| [`RemoveSpace`](#spaceserviceremovespace) | [`RemoveSpaceRequest`](#removespacerequest) | [`RemoveSpaceResponse`](#removespaceresponse) | unary |-| [`ResolveSpace`](#spaceserviceresolvespace) | [`ResolveSpaceRequest`](#resolvespacerequest) | [`ResolveSpaceResponse`](#resolvespaceresponse) | unary |-| [`ClaimFleetSpace`](#spaceserviceclaimfleetspace) | [`ClaimFleetSpaceRequest`](#claimfleetspacerequest) | [`ClaimFleetSpaceResponse`](#claimfleetspaceresponse) | unary |-| [`ProvisionLocalSpace`](#spaceserviceprovisionlocalspace) | [`ProvisionLocalSpaceRequest`](#provisionlocalspacerequest) | [`ProvisionLocalSpaceResponse`](#provisionlocalspaceresponse) | unary |-| [`ReleaseSpace`](#spaceservicereleasespace) | [`ReleaseSpaceRequest`](#releasespacerequest) | [`ReleaseSpaceResponse`](#releasespaceresponse) | unary |-| [`CreateSpace`](#spaceservicecreatespace) | [`CreateSpaceRequest`](#createspacerequest) | [`CreateSpaceResponse`](#createspaceresponse) | unary |-| [`CreateSpaceStream`](#spaceservicecreatespacestream) | [`CreateSpaceStreamRequest`](#createspacestreamrequest) | [`CreateSpaceStreamResponse`](#createspacestreamresponse) | server stream |-| [`CancelCreateSpace`](#spaceservicecancelcreatespace) | [`CancelCreateSpaceRequest`](#cancelcreatespacerequest) | [`CancelCreateSpaceResponse`](#cancelcreatespaceresponse) | unary |-| [`GetGpuSupport`](#spaceservicegetgpusupport) | [`GetGpuSupportRequest`](#getgpusupportrequest) | [`GetGpuSupportResponse`](#getgpusupportresponse) | unary |-| [`DeleteSpace`](#spaceservicedeletespace) | [`DeleteSpaceRequest`](#deletespacerequest) | [`DeleteSpaceResponse`](#deletespaceresponse) | unary |-| [`ConnectSpace`](#spaceserviceconnectspace) | [`ConnectSpaceRequest`](#connectspacerequest) | [`ConnectSpaceResponse`](#connectspaceresponse) | unary |-| [`ListSpaceTools`](#spaceservicelistspacetools) | [`ListSpaceToolsRequest`](#listspacetoolsrequest) | [`ListSpaceToolsResponse`](#listspacetoolsresponse) | unary |-| [`CallSpaceTool`](#spaceservicecallspacetool) | [`CallSpaceToolRequest`](#callspacetoolrequest) | [`CallSpaceToolResponse`](#callspacetoolresponse) | unary |-| [`ListHosts`](#spaceservicelisthosts) | [`ListHostsRequest`](#listhostsrequest) | [`ListHostsResponse`](#listhostsresponse) | unary |-| [`GetSpaceThumbnail`](#spaceservicegetspacethumbnail) | [`GetSpaceThumbnailRequest`](#getspacethumbnailrequest) | [`GetSpaceThumbnailResponse`](#getspacethumbnailresponse) | unary |--### SpaceService.AddSpace--`/cua.daemon.v1.SpaceService/AddSpace`, unary: [`AddSpaceRequest`](#addspacerequest) to [`AddSpaceResponse`](#addspaceresponse).--Adds an existing machine as a Space by address (`host:port`, a direct-`http(s)://host:port`, or a sandbox ref such as `cloud:<name>`) after a-`GetCapabilities` handshake.--### SpaceService.ListSpaces--`/cua.daemon.v1.SpaceService/ListSpaces`, unary: [`ListSpacesRequest`](#listspacesrequest) to [`ListSpacesResponse`](#listspacesresponse).--Lists registered Spaces.--### SpaceService.RemoveSpace--`/cua.daemon.v1.SpaceService/RemoveSpace`, unary: [`RemoveSpaceRequest`](#removespacerequest) to [`RemoveSpaceResponse`](#removespaceresponse).--Forgets a Space. Does not delete the underlying sandbox.--### SpaceService.ResolveSpace--`/cua.daemon.v1.SpaceService/ResolveSpace`, unary: [`ResolveSpaceRequest`](#resolvespacerequest) to [`ResolveSpaceResponse`](#resolvespaceresponse).--Resolves any accepted spelling (id, legacy id, URL, name) to a Space.--### SpaceService.ClaimFleetSpace--`/cua.daemon.v1.SpaceService/ClaimFleetSpace`, unary: [`ClaimFleetSpaceRequest`](#claimfleetspacerequest) to [`ClaimFleetSpaceResponse`](#claimfleetspaceresponse).--**Deprecated.**--Deprecated: use `CreateSpace` with location "cloud".--### SpaceService.ProvisionLocalSpace--`/cua.daemon.v1.SpaceService/ProvisionLocalSpace`, unary: [`ProvisionLocalSpaceRequest`](#provisionlocalspacerequest) to [`ProvisionLocalSpaceResponse`](#provisionlocalspaceresponse).--**Deprecated.**--Deprecated: use `CreateSpace` with location "local".--### SpaceService.ReleaseSpace--`/cua.daemon.v1.SpaceService/ReleaseSpace`, unary: [`ReleaseSpaceRequest`](#releasespacerequest) to [`ReleaseSpaceResponse`](#releasespaceresponse).--**Deprecated.**--Deprecated: use `DeleteSpace`.--### SpaceService.CreateSpace--`/cua.daemon.v1.SpaceService/CreateSpace`, unary: [`CreateSpaceRequest`](#createspacerequest) to [`CreateSpaceResponse`](#createspaceresponse).--Creates a Space (a sandbox, registered as a Space) where `location`-says, with the same location / kind / runtime model as-`SandboxService.CreateSandbox`.--### SpaceService.CreateSpaceStream--`/cua.daemon.v1.SpaceService/CreateSpaceStream`, server stream: [`CreateSpaceStreamRequest`](#createspacestreamrequest) to [`CreateSpaceStreamResponse`](#createspacestreamresponse).--`CreateSpace`, streaming what the create is doing: progress events-(pulling the image, booting, waiting for cua-spacesd, connecting) in-order, then exactly one `result`. A failed create ends the stream with-its status after the progress it made.--### SpaceService.CancelCreateSpace--`/cua.daemon.v1.SpaceService/CancelCreateSpace`, unary: [`CancelCreateSpaceRequest`](#cancelcreatespacerequest) to [`CancelCreateSpaceResponse`](#cancelcreatespaceresponse).--Cancels a create that is still running, found by the caller's-`create_id`, the id the Space will have (every progress event carries-it in `space`) or its name: the work in flight stops (an image-download, a boot, a claim, a relay registration) and what the create-made is removed (its VM or container and disks, its cloud claim, its-relay machine, its registry entry). Nothing that existed before is-touched; finished image downloads stay cached so the next create-resumes. Returns once the clean-up is done; the create itself ends with-DAEMON_ERROR_REASON_CANCELLED. Idempotent, and works for a create-another process runs or one a daemon restart cut off.--### SpaceService.GetGpuSupport--`/cua.daemon.v1.SpaceService/GetGpuSupport`, unary: [`GetGpuSupportRequest`](#getgpusupportrequest) to [`GetGpuSupportResponse`](#getgpusupportresponse).--The GPU options each runtime of a location offers on this host (the-wizard's GPU row; `gpu` of `CreateSpace`).--### SpaceService.DeleteSpace--`/cua.daemon.v1.SpaceService/DeleteSpace`, unary: [`DeleteSpaceRequest`](#deletespacerequest) to [`DeleteSpaceResponse`](#deletespaceresponse).--Deletes a Space's sandbox and forgets it. A Space added by address-(`direct:`, `relay:`) is only forgotten: cua did not create it.--### SpaceService.ConnectSpace--`/cua.daemon.v1.SpaceService/ConnectSpace`, unary: [`ConnectSpaceRequest`](#connectspacerequest) to [`ConnectSpaceResponse`](#connectspaceresponse).--Connects to a registered Space and returns a loopback env passthrough-(`<loopback>/v1/spaces/<key>/env`) that carries the Space's credentials,-so a client runs every `cua.env.v1` call and media WebSocket through the-daemon without seeing the Space's token.--### SpaceService.ListSpaceTools--`/cua.daemon.v1.SpaceService/ListSpaceTools`, unary: [`ListSpaceToolsRequest`](#listspacetoolsrequest) to [`ListSpaceToolsResponse`](#listspacetoolsresponse).--Lists the Spaces MCP tools (`tools/list` result as JSON).--### SpaceService.CallSpaceTool--`/cua.daemon.v1.SpaceService/CallSpaceTool`, unary: [`CallSpaceToolRequest`](#callspacetoolrequest) to [`CallSpaceToolResponse`](#callspacetoolresponse).--Calls one Spaces MCP tool (the same implementation `cua daemon mcp` and-`/mcp` serve).--### SpaceService.ListHosts--`/cua.daemon.v1.SpaceService/ListHosts`, unary: [`ListHostsRequest`](#listhostsrequest) to [`ListHostsResponse`](#listhostsresponse).--Your machines that provide Spaces (the account's relay hosts and the-hosts added by their Tailscale or LAN address), each asked for its-limits: what `CreateSpace` takes as `on="host:<id>"` (the New Space-wizard's Run on menu). One that does not answer is listed offline when-it provided a Space before.--### SpaceService.GetSpaceThumbnail--`/cua.daemon.v1.SpaceService/GetSpaceThumbnail`, unary: [`GetSpaceThumbnailRequest`](#getspacethumbnailrequest) to [`GetSpaceThumbnailResponse`](#getspacethumbnailresponse).--The Space's latest thumbnail (a small JPEG of its primary display)-from the daemon's cache, which every client on this machine shares:-the cached image when it is younger than `max_age`, else a fresh-capture through cua-spacesd (the cached one again, with its older-`captured_at`, when the capture fails). Asking keeps the daemon-refreshing running Spaces' thumbnails in the background for a while.--## Types in `cua/daemon/v1/spaces.proto`--### Space--A registered Space.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Space id, for example "space://direct/10.0.0.5:3211". |-| `name` | 2 | `string` | Display name. |-| `spacesd_version` | 3 | `string` | spacesd version reported at the last handshake. |-| `features` | 4 | repeated `string` | Supported feature names reported at the last handshake. |-| `added_at` | 5 | `google.protobuf.Timestamp` | When it was added. |-| `os` | 6 | `string` | Guest OS family at the last handshake (GetCapabilities): "linux", "macos" or "windows"; empty when not reported. |-| `services` | 7 | repeated `string` | Services the Space declares (never "env"), for example "mcp". A Space without cua-spacesd has an empty feature list and reaches these through generic MCP (`list_tools` / `call_tool` with `service`). |-| `os_name` | 8 | `string` | Guest OS product or distribution at the last handshake (GetCapabilities `os.name`), for example "Ubuntu" or "macOS"; empty when not reported. The Spaces app picks the OS icon from it. |-| `os_pretty_name` | 9 | `string` | The guest's full OS string at the last handshake (GetCapabilities `os.pretty_name`), for example "Ubuntu 24.04.3 LTS"; empty when the driver does not report one. |-| `image` | 10 | `string` | The image the sandbox runs, as requested (local and cloud Spaces), for example "ghcr.io/trycua/linux:24.04"; empty when unknown (a Space added by address). |-| `image_digest` | 11 | `string` | The digest of the variant that runs ("sha256:..."), when known. |-| `kind` | 12 | `string` | Container or virtual machine: "container" or "vm" (the guest's runtime at the last handshake, else the local sandbox's record); empty when unknown. |-| `arch` | 13 | `string` | The guest's CPU architecture: "arm64" or "amd64" (GetCapabilities `arch` at the last handshake, else the local sandbox's record); empty when unknown. |-| `host` | 14 | `string` | For a Space a host provides (`relay:<machine>` created with `on="host:<machine>"`): the relay machine id of that host; for one a host added by its direct address created (`direct:<addr>:<port>`): that host's Space id (`direct:<addr>:<port>`); empty otherwise. Lists group these Spaces under their host. |-| `host_name` | 15 | `string` | The display name of `host`, when known. |-| `power` | 16 | `string` | How the Space turns off and on again (`stop_space` / `start_space`): "suspend" (its memory is kept), "stop" (its disk is kept), or empty when it cannot. Filled in when listed, not stored. |-| `power_state` | 17 | `string` | "running", "suspended" or "stopped" as cua last recorded it; empty when unknown. Filled in when listed, not stored. |-| `cloud` | 18 | `string` | A Space in the owner's own cloud: the provider ("aws", "gcp", "modal"); empty otherwise. |-| `cloud_place` | 19 | `string` | Where it runs, for people ("AWS · us-west-2"); empty otherwise. |-| `cloud_delete` | 20 | `string` | How this device would delete it permanently: "here" (this cua home created it and records it), "host:<machine>" (ask the device that created it, through the relay) or "elsewhere" (only from the device that created it). Empty for other Spaces. |-| `stop_reason` | 21 | `string` | Why a local Space stopped without being asked to, in plain words: "out of memory", "killed", "exited" or "exited with code N". Empty otherwise, and once it is started again. Filled in when listed, not stored. |--### AddSpaceRequest--Request for `SpaceService.AddSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `url` | 1 | `string` | Space URL. |-| `token` | 2 | `string` | spacesd token (direct Spaces). |-| `name` | 3 | `string` | Display name. Empty derives one. |-| `service` | 4 | `string` | When `url` is not a cua-spacesd but an MCP endpoint: the service name it is registered under. Empty means "mcp". |--### AddSpaceResponse--Response for `SpaceService.AddSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`Space`](#space) | The Space. |--### ListSpacesRequest--Request for `SpaceService.ListSpaces`.--No fields.--### ListSpacesResponse--Response for `SpaceService.ListSpaces`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `spaces` | 1 | repeated [`Space`](#space) | Spaces. |--### RemoveSpaceRequest--Request for `SpaceService.RemoveSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Space id. |--### RemoveSpaceResponse--Response for `SpaceService.RemoveSpace`.--No fields.--### ResolveSpaceRequest--Request for `SpaceService.ResolveSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | Id, legacy id, URL or display name. |--### ResolveSpaceResponse--Response for `SpaceService.ResolveSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`Space`](#space) | The registered Space. |--### ClaimFleetSpaceRequest--Request for `SpaceService.ClaimFleetSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `image` | 1 | `string` | Image. Empty uses the default Spaces image for the runtime. |-| `runtime` | 2 | `string` | Fleet runtime (`kubevirt`, `gvisor`). Empty picks from the image. |-| `name` | 3 | `string` | Display name. |-| `wait` | 4 | optional `bool` | Wait for the claim to bind (default true when unset). |-| `reuse` | 5 | `bool` | Reuse a reachable registered Fleet Space for the same image first. |-| `command` | 6 | repeated `string` | Entrypoint override (pod runtimes). Empty keeps the image's. |-| `env` | 7 | map of `string` to `string` | Guest environment. |-| `services` | 8 | map of `string` to `uint32` | Named services (name -> guest port), for example {"mcp": 8765}. |-| `spacesd` | 9 | optional `bool` | Whether the image runs cua-spacesd. Unset: yes for the Spaces images, no for any other image. |--### ClaimFleetSpaceResponse--Response for `SpaceService.ClaimFleetSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`Space`](#space) | The Space, once bound. |-| `pending_json` | 2 | `string` | With `wait = false`: the pending claim as JSON (`{namespace, claim, pool, ...}`). |-| `reused` | 3 | `bool` | A registered Space was reused. |--### ProvisionLocalSpaceRequest--Request for `SpaceService.ProvisionLocalSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `image` | 1 | `string` | Image. Empty uses the default Spaces image. |-| `name` | 2 | `string` | Name. Empty generates one. |-| `cpus` | 3 | `uint32` | vCPUs (0 = 2). |-| `memory_mb` | 4 | `uint64` | Memory in MiB (0 = 4096). |-| `timeout` | 5 | `google.protobuf.Duration` | Provisioning budget (default 600 s). |-| `command` | 6 | repeated `string` | Entrypoint override. Empty keeps the image's. |-| `env` | 7 | map of `string` to `string` | Guest environment. |-| `services` | 8 | map of `string` to `uint32` | Named services (name -> guest port), for example {"mcp": 8765}. |-| `spacesd` | 9 | optional `bool` | Whether the image runs cua-spacesd. Unset: yes for the Spaces images, no for any other image. |--### ProvisionLocalSpaceResponse--Response for `SpaceService.ProvisionLocalSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`Space`](#space) | The Space. |--### ReleaseSpaceRequest--Request for `SpaceService.ReleaseSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | Space. |--### ReleaseSpaceResponse--Response for `SpaceService.ReleaseSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `message` | 1 | `string` | What happened, for humans. |--### ConnectSpaceRequest--Request for `SpaceService.ConnectSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | Space. |--### ConnectSpaceResponse--Response for `SpaceService.ConnectSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`Space`](#space) | The Space. |-| `env_url` | 2 | `string` | env passthrough base URL (speaks `cua.env.v1`, gRPC and gRPC-Web, and relays the `/media` and `/tunnel` WebSockets). |-| `token` | 3 | `string` | Bearer for `env_url` (the daemon's loopback token). |-| `capabilities` | 4 | `bytes` | `cua.env.v1.GetCapabilitiesResponse` of the Space, protobuf-encoded. |-| `services` | 5 | repeated [`SpaceServiceEndpoint`](#spaceserviceendpoint) | The Space's declared services through the daemon (same bearer as `env_url`). `env_url` is empty when the Space runs no cua-spacesd. |--### SpaceServiceEndpoint--A declared service of a Space, reachable through the daemon.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Service name, for example "mcp". |-| `url` | 2 | `string` | Base URL: requests to `<url><path>` reach `<path>` on the service. |-| `mcp_path` | 3 | `string` | Its MCP endpoint path, for example "/mcp". |--### ListSpaceToolsRequest--Request for `SpaceService.ListSpaceTools`.--No fields.--### ListSpaceToolsResponse--Response for `SpaceService.ListSpaceTools`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `tools_json` | 1 | `string` | MCP `tools/list` result as JSON. |--### CallSpaceToolRequest--Request for `SpaceService.CallSpaceTool`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Tool name from the Spaces contract. |-| `arguments_json` | 2 | `string` | Arguments as a JSON object. Empty means `{}`. |--### CallSpaceToolResponse--Response for `SpaceService.CallSpaceTool`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `content_json` | 1 | `string` | MCP content parts as a JSON array. |-| `structured_json` | 2 | `string` | MCP structured content as JSON, when present. |-| `is_error` | 3 | `bool` | The call failed as a tool error. |-| `meta_json` | 4 | `string` | The result's `_meta` as JSON, when present (forwarded verbatim from an in-Space MCP service). |--### CreateSpaceRequest--Request for `SpaceService.CreateSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `image` | 1 | `string` | Image. Empty uses the canonical Linux image. |-| `location` | 2 | `string` | Where it runs: "local", "cloud" or a registered provider. Empty uses the default (`default.on` in the config, `CUA_DEFAULT_ON`, else "local"); clients resolve the default on their side. |-| `kind` | 3 | `string` | What kind of machine: "auto" (empty), "container" or "vm". |-| `runtime` | 4 | `string` | Which engine: "auto" (empty), or one the location offers for the kind ("gvisor", "runc", "qemu", "lume" locally; "gvisor", "kubevirt" in the cloud). |-| `name` | 5 | `string` | Name. Empty generates `space-<hex>`. |-| `cpus` | 6 | `uint32` | vCPUs (0 = the default, 2). |-| `memory_mb` | 7 | `uint64` | Memory in MiB (0 = the default, 4096). |-| `timeout` | 8 | `google.protobuf.Duration` | Readiness budget (default 600 s). |-| `wait` | 9 | optional `bool` | Wait until the Space is ready (default true when unset). With false the response carries only its id and phase "starting". |-| `reuse` | 10 | `bool` | Return a reachable registered Space with the same image, location, kind and runtime instead of creating one (get-or-create). |-| `command` | 11 | repeated `string` | Entrypoint override. Empty keeps the image's. |-| `env` | 12 | map of `string` to `string` | Guest environment. |-| `services` | 13 | map of `string` to `uint32` | Named services (name -> guest port), for example {"mcp": 8765}. |-| `spacesd` | 14 | optional `bool` | Whether the image runs cua-spacesd. Unset: yes for the canonical images, no for any other image. |-| `disk_gb` | 15 | `uint32` | Grow the VM's disk to this many GiB (local VMs only; 0 keeps the image's size). Lume grows the macOS APFS container before the first boot; Linux images grow their root partition at boot (cloud-init growpart). |-| `gpu` | 16 | `string` | A GPU option of the runtime the Space runs on (`GetGpuSupport`): "paravirtual" (a macOS VM on Lume: GPU acceleration, experimental), "virgl", "nvidia", a provider's GPU type; "auto" picks the runtime's own. Empty: no GPU. Kept with the Space. |-| `create_id` | 17 | `string` | The caller's own key for this create (an app's pending row id), for `CancelCreateSpace` before the Space's id is known. |--### CreateSpaceResponse--Response for `SpaceService.CreateSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`Space`](#space) | The Space (with `wait = false`: only its id). |-| `phase` | 2 | `string` | "ready", or "starting" with `wait = false`. |-| `reused` | 3 | `bool` | `reuse` returned an existing Space. |--### CreateSpaceStreamRequest--Request for `SpaceService.CreateSpaceStream`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `create` | 1 | [`CreateSpaceRequest`](#createspacerequest) | The create, as for `CreateSpace`. `wait` is ignored: the stream always runs until the Space is ready or the create fails. |--### CreateSpaceProgress--What a create is doing.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `phase` | 1 | `string` | "preparing", "pulling", "creating", "booting", "waiting_for_services", "connecting" or "ready", in that order. |-| `fraction` | 2 | optional `double` | How far through the phase, 0.0 to 1.0, when its size is known (an image pull). |-| `detail` | 3 | `string` | One short line, for example the image being pulled. |-| `bytes_done` | 4 | optional `uint64` | Bytes downloaded so far, when the step counts them (an image pull). |-| `bytes_total` | 5 | optional `uint64` | Bytes the download has in all. |-| `bytes_per_second` | 6 | optional `double` | Smoothed download rate, bytes per second. |-| `space` | 7 | `string` | The id the Space will have (`local:<name>`), for `CancelCreateSpace`. |--### CreateSpaceStreamResponse--One message of `SpaceService.CreateSpaceStream`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `progress` | 1 | [`CreateSpaceProgress`](#createspaceprogress) (oneof `event`) | What the create is doing now. |-| `result` | 2 | [`CreateSpaceResponse`](#createspaceresponse) (oneof `event`) | The created Space (the last message). |--### CancelCreateSpaceRequest--Request for `SpaceService.CancelCreateSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | The create's `create_id`, the id the Space will have, or its name. |--### CancelCreateSpaceResponse--Response for `SpaceService.CancelCreateSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | The Space id the create had, when known. |-| `state` | 2 | `string` | "cancelled", "not_creating" (nothing by that key is running) or "already_created" (it finished; delete it instead). |-| `message` | 3 | `string` | What was removed and what stays, for people. |--### GetGpuSupportRequest--Request for `SpaceService.GetGpuSupport`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `location` | 1 | `string` | "local" (empty) or "cloud". |--### GpuOption--One GPU option of a runtime.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | What to pass as `gpu`. |-| `label` | 2 | `string` | How a person names it ("GPU acceleration"). |-| `experimental` | 3 | `bool` | Experimental. |-| `supported` | 4 | `bool` | Works on this host (and account) now. |-| `reason` | 5 | `string` | Why not, one short line. |-| `learn_more` | 6 | `string` | A page that explains it. |-| `usd_per_hour` | 7 | optional `double` | Estimated cost per hour while it runs (cloud GPU types). |--### GpuSupport--The GPU options of one runtime.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `runtime` | 1 | `string` | "lume", "qemu", "container", "gvisor", "fleet", a provider's name. |-| `options` | 2 | repeated [`GpuOption`](#gpuoption) | Its options; empty: none. |-| `reason` | 3 | `string` | Why it has none. |--### GetGpuSupportResponse--Response for `SpaceService.GetGpuSupport`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `runtimes` | 1 | repeated [`GpuSupport`](#gpusupport) | One entry per runtime of the location. |--### DeleteSpaceRequest--Request for `SpaceService.DeleteSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | Space. |--### DeleteSpaceResponse--Response for `SpaceService.DeleteSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `message` | 1 | `string` | What happened, for humans. |--### ListHostsRequest--Request for `SpaceService.ListHosts`.--No fields.--### SpacesHostLimit--One limit of a host and how much of it is used.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `resource` | 1 | `string` | `spaces` (every Space it provides) or `macos_vms` (macOS VMs on that Mac). |-| `used` | 2 | `uint32` | In use now. |-| `limit` | 3 | `uint32` | The limit (0: none). |-| `reason` | 4 | `string` | Why the limit exists, for people. |--### SpacesHost--One of your machines that provides Spaces.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | What `on="host:<id>"` takes: the relay machine id, or the name a direct host was added as. |-| `name` | 2 | `string` | Its name. |-| `via` | 3 | `string` | `relay` or `direct`. |-| `online` | 4 | `bool` | It answered. |-| `os` | 5 | `string` | Its operating system (`macos`, `linux`, `windows`), when it answered. |-| `limits` | 6 | repeated [`SpacesHostLimit`](#spaceshostlimit) | Its limits, when it answered. |--### ListHostsResponse--Response for `SpaceService.ListHosts`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `hosts` | 1 | repeated [`SpacesHost`](#spaceshost) | In order: relay hosts, then direct ones. |--### GetSpaceThumbnailRequest--Request for `SpaceService.GetSpaceThumbnail`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | Space. |-| `max_age` | 2 | `google.protobuf.Duration` | How old a cached thumbnail may be (unset: any age; zero: always capture). |--### GetSpaceThumbnailResponse--Response for `SpaceService.GetSpaceThumbnail`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `image` | 1 | `bytes` | Encoded image. |-| `format` | 2 | `string` | "jpeg". |-| `width` | 3 | `uint32` | Pixel width. |-| `height` | 4 | `uint32` | Pixel height. |-| `captured_at` | 5 | `google.protobuf.Timestamp` | When it was captured. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/daemon.mdx b/docs/content/docs/cua-sdk/reference/protocol/daemon.mdxnew file mode 100644index 0000000000..c069dbb9a4--- /dev/null+++ b/docs/content/docs/cua-sdk/reference/protocol/daemon.mdx@@ -0,0 +1,1603 @@+---+title: "Cua daemon"+description: "cua.daemon.v1: the local cua daemon API for sandboxes, local runtimes, Spaces, its identity and the media bridge."+---++{/*+ AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY+ Generated by: pnpm --dir docs docs:generate:cua-proto+ Source: buf build libs/cua/proto -o -#format=json+ Version: 0.5.0+*/}++The local `cua daemon` API (a Unix socket on the host, not cua-spacesd): sandbox lifecycle across locations, the local runtimes and images it orchestrates, Spaces and the machines that provide them, its identity (`GetInfo`) and the loopback media bridge for webviews.++Source: `libs/cua/proto/cua/daemon/v1/sandboxes.proto`, `libs/cua/proto/cua/daemon/v1/runtime.proto`, `libs/cua/proto/cua/daemon/v1/spaces.proto`, `libs/cua/proto/cua/daemon/v1/daemon.proto`.++## SandboxService++`cua.daemon.v1.SandboxService`++Sandbox lifecycle across providers (Fleet, local VMM, direct).++Sandboxes are daemon-agnostic: nothing here assumes cua-spacesd is+installed in the guest.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`ListSandboxes`](#sandboxservicelistsandboxes) | [`ListSandboxesRequest`](#listsandboxesrequest) | [`ListSandboxesResponse`](#listsandboxesresponse) | unary |+| [`CreateSandbox`](#sandboxservicecreatesandbox) | [`CreateSandboxRequest`](#createsandboxrequest) | [`CreateSandboxResponse`](#createsandboxresponse) | unary |+| [`CreateSandboxStream`](#sandboxservicecreatesandboxstream) | [`CreateSandboxStreamRequest`](#createsandboxstreamrequest) | [`CreateSandboxStreamResponse`](#createsandboxstreamresponse) | server stream |+| [`CancelCreateSandbox`](#sandboxservicecancelcreatesandbox) | [`CancelCreateSandboxRequest`](#cancelcreatesandboxrequest) | [`CancelCreateSandboxResponse`](#cancelcreatesandboxresponse) | unary |+| [`GetSandbox`](#sandboxservicegetsandbox) | [`GetSandboxRequest`](#getsandboxrequest) | [`GetSandboxResponse`](#getsandboxresponse) | unary |+| [`DeleteSandbox`](#sandboxservicedeletesandbox) | [`DeleteSandboxRequest`](#deletesandboxrequest) | [`DeleteSandboxResponse`](#deletesandboxresponse) | unary |+| [`ConnectSandbox`](#sandboxserviceconnectsandbox) | [`ConnectSandboxRequest`](#connectsandboxrequest) | [`ConnectSandboxResponse`](#connectsandboxresponse) | unary |+| [`SuspendSandbox`](#sandboxservicesuspendsandbox) | [`SuspendSandboxRequest`](#suspendsandboxrequest) | [`SuspendSandboxResponse`](#suspendsandboxresponse) | unary |+| [`ResumeSandbox`](#sandboxserviceresumesandbox) | [`ResumeSandboxRequest`](#resumesandboxrequest) | [`ResumeSandboxResponse`](#resumesandboxresponse) | unary |+| [`RestartSandbox`](#sandboxservicerestartsandbox) | [`RestartSandboxRequest`](#restartsandboxrequest) | [`RestartSandboxResponse`](#restartsandboxresponse) | unary |+| [`KeepAlive`](#sandboxservicekeepalive) | [`KeepAliveRequest`](#keepaliverequest) | [`KeepAliveResponse`](#keepaliveresponse) | unary |+| [`WaitReady`](#sandboxservicewaitready) | [`WaitReadyRequest`](#waitreadyrequest) | [`WaitReadyResponse`](#waitreadyresponse) | unary |+| [`ServiceRequest`](#sandboxserviceservicerequest) | [`ServiceRequestRequest`](#servicerequestrequest) | [`ServiceRequestResponse`](#servicerequestresponse) | unary |+| [`ForwardPort`](#sandboxserviceforwardport) | [`ForwardPortRequest`](#forwardportrequest) | [`ForwardPortResponse`](#forwardportresponse) | unary |+| [`CloseForward`](#sandboxservicecloseforward) | [`CloseForwardRequest`](#closeforwardrequest) | [`CloseForwardResponse`](#closeforwardresponse) | unary |+| [`GetEnvEndpoint`](#sandboxservicegetenvendpoint) | [`GetEnvEndpointRequest`](#getenvendpointrequest) | [`GetEnvEndpointResponse`](#getenvendpointresponse) | unary |+| [`GetServiceEndpoint`](#sandboxservicegetserviceendpoint) | [`GetServiceEndpointRequest`](#getserviceendpointrequest) | [`GetServiceEndpointResponse`](#getserviceendpointresponse) | unary |+| [`GetServiceUrl`](#sandboxservicegetserviceurl) | [`GetServiceUrlRequest`](#getserviceurlrequest) | [`GetServiceUrlResponse`](#getserviceurlresponse) | unary |+| [`CreatePublicUrl`](#sandboxservicecreatepublicurl) | [`CreatePublicUrlRequest`](#createpublicurlrequest) | [`CreatePublicUrlResponse`](#createpublicurlresponse) | unary |+| [`RevokePublicUrl`](#sandboxservicerevokepublicurl) | [`RevokePublicUrlRequest`](#revokepublicurlrequest) | [`RevokePublicUrlResponse`](#revokepublicurlresponse) | unary |++### SandboxService.ListSandboxes++`/cua.daemon.v1.SandboxService/ListSandboxes`, unary: [`ListSandboxesRequest`](#listsandboxesrequest) to [`ListSandboxesResponse`](#listsandboxesresponse).++Lists sandboxes known to the daemon.++### SandboxService.CreateSandbox++`/cua.daemon.v1.SandboxService/CreateSandbox`, unary: [`CreateSandboxRequest`](#createsandboxrequest) to [`CreateSandboxResponse`](#createsandboxresponse).++Creates a sandbox where `location` says (local by default), or+connects to an existing machine (`direct:<addr>`).++### SandboxService.CreateSandboxStream++`/cua.daemon.v1.SandboxService/CreateSandboxStream`, server stream: [`CreateSandboxStreamRequest`](#createsandboxstreamrequest) to [`CreateSandboxStreamResponse`](#createsandboxstreamresponse).++`CreateSandbox`, streaming what the create is doing: progress events+(pulling the image with its bytes, creating, booting, waiting for the+probes) in order, then exactly one `result`. A failed create ends the+stream with its status. Closing the stream cancels the create, as for+a `CreateSandbox` whose caller goes away.++### SandboxService.CancelCreateSandbox++`/cua.daemon.v1.SandboxService/CancelCreateSandbox`, unary: [`CancelCreateSandboxRequest`](#cancelcreatesandboxrequest) to [`CancelCreateSandboxResponse`](#cancelcreatesandboxresponse).++Cancels a `CreateSandbox` of a named sandbox still running: the work+in flight stops (an image download, a boot, a claim) and what the+create made is deleted; a sandbox of that name that existed before is+never touched. Finished image downloads stay cached. Returns once the+clean-up is done. Idempotent: `cancelled` is false when no create of+that name was running. A `CreateSandbox` whose caller goes away (a+closed connection) is cleaned up the same way.++### SandboxService.GetSandbox++`/cua.daemon.v1.SandboxService/GetSandbox`, unary: [`GetSandboxRequest`](#getsandboxrequest) to [`GetSandboxResponse`](#getsandboxresponse).++Returns one sandbox.++### SandboxService.DeleteSandbox++`/cua.daemon.v1.SandboxService/DeleteSandbox`, unary: [`DeleteSandboxRequest`](#deletesandboxrequest) to [`DeleteSandboxResponse`](#deletesandboxresponse).++Deletes (or releases, or detaches from) a sandbox.++### SandboxService.ConnectSandbox++`/cua.daemon.v1.SandboxService/ConnectSandbox`, unary: [`ConnectSandboxRequest`](#connectsandboxrequest) to [`ConnectSandboxResponse`](#connectsandboxresponse).++Reattaches to a sandbox by ref (a state file, a live cloud claim or an+address) and keeps the handle in the daemon.++### SandboxService.SuspendSandbox++`/cua.daemon.v1.SandboxService/SuspendSandbox`, unary: [`SuspendSandboxRequest`](#suspendsandboxrequest) to [`SuspendSandboxResponse`](#suspendsandboxresponse).++Suspends a sandbox (local: pause; Fleet: scale to zero).++### SandboxService.ResumeSandbox++`/cua.daemon.v1.SandboxService/ResumeSandbox`, unary: [`ResumeSandboxRequest`](#resumesandboxrequest) to [`ResumeSandboxResponse`](#resumesandboxresponse).++Resumes a suspended sandbox.++### SandboxService.RestartSandbox++`/cua.daemon.v1.SandboxService/RestartSandbox`, unary: [`RestartSandboxRequest`](#restartsandboxrequest) to [`RestartSandboxResponse`](#restartsandboxresponse).++Restarts a sandbox.++### SandboxService.KeepAlive++`/cua.daemon.v1.SandboxService/KeepAlive`, unary: [`KeepAliveRequest`](#keepaliverequest) to [`KeepAliveResponse`](#keepaliveresponse).++Extends a Fleet claim lease.++### SandboxService.WaitReady++`/cua.daemon.v1.SandboxService/WaitReady`, unary: [`WaitReadyRequest`](#waitreadyrequest) to [`WaitReadyResponse`](#waitreadyresponse).++Waits until user-declared readiness probes pass.++### SandboxService.ServiceRequest++`/cua.daemon.v1.SandboxService/ServiceRequest`, unary: [`ServiceRequestRequest`](#servicerequestrequest) to [`ServiceRequestResponse`](#servicerequestresponse).++Sends one HTTP request to a named service of a sandbox. Credentials+(for example the Fleet bearer) stay in the daemon.++### SandboxService.ForwardPort++`/cua.daemon.v1.SandboxService/ForwardPort`, unary: [`ForwardPortRequest`](#forwardportrequest) to [`ForwardPortResponse`](#forwardportresponse).++Forwards a daemon loopback port to a guest port.++### SandboxService.CloseForward++`/cua.daemon.v1.SandboxService/CloseForward`, unary: [`CloseForwardRequest`](#closeforwardrequest) to [`CloseForwardResponse`](#closeforwardresponse).++Stops a forward started by `ForwardPort`.++### SandboxService.GetEnvEndpoint++`/cua.daemon.v1.SandboxService/GetEnvEndpoint`, unary: [`GetEnvEndpointRequest`](#getenvendpointrequest) to [`GetEnvEndpointResponse`](#getenvendpointresponse).++Probes cua-spacesd in the sandbox and returns the daemon's loopback+passthrough endpoint for it. `cua.env.v1` calls sent there are proxied+with the sandbox credentials attached by the daemon.++### SandboxService.GetServiceEndpoint++`/cua.daemon.v1.SandboxService/GetServiceEndpoint`, unary: [`GetServiceEndpointRequest`](#getserviceendpointrequest) to [`GetServiceEndpointResponse`](#getserviceendpointresponse).++The daemon's loopback passthrough for a named service of a sandbox:+any HTTP request (any method, streamed both ways, headers passed+through) sent to `url` + path reaches that path on the service with the+sandbox's route and credentials attached by the daemon. For MCP+clients, SSE and anything else served over HTTP.++### SandboxService.GetServiceUrl++`/cua.daemon.v1.SandboxService/GetServiceUrl`, unary: [`GetServiceUrlRequest`](#getserviceurlrequest) to [`GetServiceUrlResponse`](#getserviceurlresponse).++Returns a URL for a named service usable from this machine without+credentials: the published loopback port locally, a signed service URL+in the cloud.++### SandboxService.CreatePublicUrl++`/cua.daemon.v1.SandboxService/CreatePublicUrl`, unary: [`CreatePublicUrlRequest`](#createpublicurlrequest) to [`CreatePublicUrlResponse`](#createpublicurlresponse).++Creates a shareable URL for a named service that expires: a signed+service URL in the cloud; locally a loopback proxy URL with its own+token, served by the daemon.++### SandboxService.RevokePublicUrl++`/cua.daemon.v1.SandboxService/RevokePublicUrl`, unary: [`RevokePublicUrlRequest`](#revokepublicurlrequest) to [`RevokePublicUrlResponse`](#revokepublicurlresponse).++Revokes a URL created by `CreatePublicUrl`.++## RuntimeService++`cua.daemon.v1.RuntimeService`++Local runtime provisioning (`cua runtime doctor|setup`).++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`Doctor`](#runtimeservicedoctor) | [`DoctorRequest`](#doctorrequest) | [`DoctorResponse`](#doctorresponse) | unary |+| [`Setup`](#runtimeservicesetup) | [`SetupRequest`](#setuprequest) | [`SetupResponse`](#setupresponse) | unary |+| [`PullImage`](#runtimeservicepullimage) | [`PullImageRequest`](#pullimagerequest) | [`PullImageResponse`](#pullimageresponse) | unary |+| [`BuildImage`](#runtimeservicebuildimage) | [`BuildImageRequest`](#buildimagerequest) | [`BuildImageResponse`](#buildimageresponse) | unary |+| [`PushImage`](#runtimeservicepushimage) | [`PushImageRequest`](#pushimagerequest) | [`PushImageResponse`](#pushimageresponse) | unary |++### RuntimeService.Doctor++`/cua.daemon.v1.RuntimeService/Doctor`, unary: [`DoctorRequest`](#doctorrequest) to [`DoctorResponse`](#doctorresponse).++Inspects local runtimes (Lume, QEMU, container engine, runsc) without+changing anything.++### RuntimeService.Setup++`/cua.daemon.v1.RuntimeService/Setup`, unary: [`SetupRequest`](#setuprequest) to [`SetupResponse`](#setupresponse).++Installs or starts missing local runtime components. Every step is+explicit and logged in the response.++### RuntimeService.PullImage++`/cua.daemon.v1.RuntimeService/PullImage`, unary: [`PullImageRequest`](#pullimagerequest) to [`PullImageResponse`](#pullimageresponse).++Pulls an image into the local cache or container engine.++### RuntimeService.BuildImage++`/cua.daemon.v1.RuntimeService/BuildImage`, unary: [`BuildImageRequest`](#buildimagerequest) to [`BuildImageResponse`](#buildimageresponse).++Builds an image from an `images.cua.ai/v1alpha1` Image resource.++### RuntimeService.PushImage++`/cua.daemon.v1.RuntimeService/PushImage`, unary: [`PushImageRequest`](#pushimagerequest) to [`PushImageResponse`](#pushimageresponse).++Copies an image (host architecture) to another registry reference.++## SpaceService++`cua.daemon.v1.SpaceService`++Spaces: sandboxes with Spaces features (cua-spacesd, streams, agents,+teleport) that the user works in interactively. The daemon hosts one+`cua_spaces::Spaces` runtime: the registry in `~/.cua/spaces.json`+(tokens in the 0600 `spaces-credentials.json`), Space creation in every+location, hotspots, and the Spaces MCP server (`CallSpaceTool`,+`cua daemon mcp`, `/mcp`).++Verbs: `CreateSpace` / `DeleteSpace` create and delete the sandbox;+`AddSpace` / `RemoveSpace` register an existing machine and forget it+without touching it.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`AddSpace`](#spaceserviceaddspace) | [`AddSpaceRequest`](#addspacerequest) | [`AddSpaceResponse`](#addspaceresponse) | unary |+| [`ListSpaces`](#spaceservicelistspaces) | [`ListSpacesRequest`](#listspacesrequest) | [`ListSpacesResponse`](#listspacesresponse) | unary |+| [`RemoveSpace`](#spaceserviceremovespace) | [`RemoveSpaceRequest`](#removespacerequest) | [`RemoveSpaceResponse`](#removespaceresponse) | unary |+| [`ResolveSpace`](#spaceserviceresolvespace) | [`ResolveSpaceRequest`](#resolvespacerequest) | [`ResolveSpaceResponse`](#resolvespaceresponse) | unary |+| [`ClaimFleetSpace`](#spaceserviceclaimfleetspace) | [`ClaimFleetSpaceRequest`](#claimfleetspacerequest) | [`ClaimFleetSpaceResponse`](#claimfleetspaceresponse) | unary |+| [`ProvisionLocalSpace`](#spaceserviceprovisionlocalspace) | [`ProvisionLocalSpaceRequest`](#provisionlocalspacerequest) | [`ProvisionLocalSpaceResponse`](#provisionlocalspaceresponse) | unary |+| [`ReleaseSpace`](#spaceservicereleasespace) | [`ReleaseSpaceRequest`](#releasespacerequest) | [`ReleaseSpaceResponse`](#releasespaceresponse) | unary |+| [`CreateSpace`](#spaceservicecreatespace) | [`CreateSpaceRequest`](#createspacerequest) | [`CreateSpaceResponse`](#createspaceresponse) | unary |+| [`CreateSpaceStream`](#spaceservicecreatespacestream) | [`CreateSpaceStreamRequest`](#createspacestreamrequest) | [`CreateSpaceStreamResponse`](#createspacestreamresponse) | server stream |+| [`CancelCreateSpace`](#spaceservicecancelcreatespace) | [`CancelCreateSpaceRequest`](#cancelcreatespacerequest) | [`CancelCreateSpaceResponse`](#cancelcreatespaceresponse) | unary |+| [`GetGpuSupport`](#spaceservicegetgpusupport) | [`GetGpuSupportRequest`](#getgpusupportrequest) | [`GetGpuSupportResponse`](#getgpusupportresponse) | unary |+| [`DeleteSpace`](#spaceservicedeletespace) | [`DeleteSpaceRequest`](#deletespacerequest) | [`DeleteSpaceResponse`](#deletespaceresponse) | unary |+| [`ConnectSpace`](#spaceserviceconnectspace) | [`ConnectSpaceRequest`](#connectspacerequest) | [`ConnectSpaceResponse`](#connectspaceresponse) | unary |+| [`ListSpaceTools`](#spaceservicelistspacetools) | [`ListSpaceToolsRequest`](#listspacetoolsrequest) | [`ListSpaceToolsResponse`](#listspacetoolsresponse) | unary |+| [`CallSpaceTool`](#spaceservicecallspacetool) | [`CallSpaceToolRequest`](#callspacetoolrequest) | [`CallSpaceToolResponse`](#callspacetoolresponse) | unary |+| [`ListHosts`](#spaceservicelisthosts) | [`ListHostsRequest`](#listhostsrequest) | [`ListHostsResponse`](#listhostsresponse) | unary |+| [`GetSpaceThumbnail`](#spaceservicegetspacethumbnail) | [`GetSpaceThumbnailRequest`](#getspacethumbnailrequest) | [`GetSpaceThumbnailResponse`](#getspacethumbnailresponse) | unary |++### SpaceService.AddSpace++`/cua.daemon.v1.SpaceService/AddSpace`, unary: [`AddSpaceRequest`](#addspacerequest) to [`AddSpaceResponse`](#addspaceresponse).++Adds an existing machine as a Space by address (`host:port`, a direct+`http(s)://host:port`, or a sandbox ref such as `cloud:<name>`) after a+`GetCapabilities` handshake.++### SpaceService.ListSpaces++`/cua.daemon.v1.SpaceService/ListSpaces`, unary: [`ListSpacesRequest`](#listspacesrequest) to [`ListSpacesResponse`](#listspacesresponse).++Lists registered Spaces.++### SpaceService.RemoveSpace++`/cua.daemon.v1.SpaceService/RemoveSpace`, unary: [`RemoveSpaceRequest`](#removespacerequest) to [`RemoveSpaceResponse`](#removespaceresponse).++Forgets a Space. Does not delete the underlying sandbox.++### SpaceService.ResolveSpace++`/cua.daemon.v1.SpaceService/ResolveSpace`, unary: [`ResolveSpaceRequest`](#resolvespacerequest) to [`ResolveSpaceResponse`](#resolvespaceresponse).++Resolves any accepted spelling (id, legacy id, URL, name) to a Space.++### SpaceService.ClaimFleetSpace++`/cua.daemon.v1.SpaceService/ClaimFleetSpace`, unary: [`ClaimFleetSpaceRequest`](#claimfleetspacerequest) to [`ClaimFleetSpaceResponse`](#claimfleetspaceresponse).++**Deprecated.**++Deprecated: use `CreateSpace` with location "cloud".++### SpaceService.ProvisionLocalSpace++`/cua.daemon.v1.SpaceService/ProvisionLocalSpace`, unary: [`ProvisionLocalSpaceRequest`](#provisionlocalspacerequest) to [`ProvisionLocalSpaceResponse`](#provisionlocalspaceresponse).++**Deprecated.**++Deprecated: use `CreateSpace` with location "local".++### SpaceService.ReleaseSpace++`/cua.daemon.v1.SpaceService/ReleaseSpace`, unary: [`ReleaseSpaceRequest`](#releasespacerequest) to [`ReleaseSpaceResponse`](#releasespaceresponse).++**Deprecated.**++Deprecated: use `DeleteSpace`.++### SpaceService.CreateSpace++`/cua.daemon.v1.SpaceService/CreateSpace`, unary: [`CreateSpaceRequest`](#createspacerequest) to [`CreateSpaceResponse`](#createspaceresponse).++Creates a Space (a sandbox, registered as a Space) where `location`+says, with the same location / kind / runtime model as+`SandboxService.CreateSandbox`.++### SpaceService.CreateSpaceStream++`/cua.daemon.v1.SpaceService/CreateSpaceStream`, server stream: [`CreateSpaceStreamRequest`](#createspacestreamrequest) to [`CreateSpaceStreamResponse`](#createspacestreamresponse).++`CreateSpace`, streaming what the create is doing: progress events+(pulling the image, booting, waiting for cua-spacesd, connecting) in+order, then exactly one `result`. A failed create ends the stream with+its status after the progress it made.++### SpaceService.CancelCreateSpace++`/cua.daemon.v1.SpaceService/CancelCreateSpace`, unary: [`CancelCreateSpaceRequest`](#cancelcreatespacerequest) to [`CancelCreateSpaceResponse`](#cancelcreatespaceresponse).++Cancels a create that is still running, found by the caller's+`create_id`, the id the Space will have (every progress event carries+it in `space`) or its name: the work in flight stops (an image+download, a boot, a claim, a relay registration) and what the create+made is removed (its VM or container and disks, its cloud claim, its+relay machine, its registry entry). Nothing that existed before is+touched; finished image downloads stay cached so the next create+resumes. Returns once the clean-up is done; the create itself ends with+DAEMON_ERROR_REASON_CANCELLED. Idempotent, and works for a create+another process runs or one a daemon restart cut off.++### SpaceService.GetGpuSupport++`/cua.daemon.v1.SpaceService/GetGpuSupport`, unary: [`GetGpuSupportRequest`](#getgpusupportrequest) to [`GetGpuSupportResponse`](#getgpusupportresponse).++The GPU options each runtime of a location offers on this host (the+wizard's GPU row; `gpu` of `CreateSpace`).++### SpaceService.DeleteSpace++`/cua.daemon.v1.SpaceService/DeleteSpace`, unary: [`DeleteSpaceRequest`](#deletespacerequest) to [`DeleteSpaceResponse`](#deletespaceresponse).++Deletes a Space's sandbox and forgets it. A Space added by address+(`direct:`, `relay:`) is only forgotten: cua did not create it.++### SpaceService.ConnectSpace++`/cua.daemon.v1.SpaceService/ConnectSpace`, unary: [`ConnectSpaceRequest`](#connectspacerequest) to [`ConnectSpaceResponse`](#connectspaceresponse).++Connects to a registered Space and returns a loopback env passthrough+(`<loopback>/v1/spaces/<key>/env`) that carries the Space's credentials,+so a client runs every `cua.env.v1` call and media WebSocket through the+daemon without seeing the Space's token.++### SpaceService.ListSpaceTools++`/cua.daemon.v1.SpaceService/ListSpaceTools`, unary: [`ListSpaceToolsRequest`](#listspacetoolsrequest) to [`ListSpaceToolsResponse`](#listspacetoolsresponse).++Lists the Spaces MCP tools (`tools/list` result as JSON).++### SpaceService.CallSpaceTool++`/cua.daemon.v1.SpaceService/CallSpaceTool`, unary: [`CallSpaceToolRequest`](#callspacetoolrequest) to [`CallSpaceToolResponse`](#callspacetoolresponse).++Calls one Spaces MCP tool (the same implementation `cua daemon mcp` and+`/mcp` serve).++### SpaceService.ListHosts++`/cua.daemon.v1.SpaceService/ListHosts`, unary: [`ListHostsRequest`](#listhostsrequest) to [`ListHostsResponse`](#listhostsresponse).++Your machines that provide Spaces (the account's relay hosts and the+hosts added by their Tailscale or LAN address), each asked for its+limits: what `CreateSpace` takes as `on="host:<id>"` (the New Space+wizard's Run on menu). One that does not answer is listed offline when+it provided a Space before.++### SpaceService.GetSpaceThumbnail++`/cua.daemon.v1.SpaceService/GetSpaceThumbnail`, unary: [`GetSpaceThumbnailRequest`](#getspacethumbnailrequest) to [`GetSpaceThumbnailResponse`](#getspacethumbnailresponse).++The Space's latest thumbnail (a small JPEG of its primary display)+from the daemon's cache, which every client on this machine shares:+the cached image when it is younger than `max_age`, else a fresh+capture through cua-spacesd (the cached one again, with its older+`captured_at`, when the capture fails). Asking keeps the daemon+refreshing running Spaces' thumbnails in the background for a while.++## DaemonService++`cua.daemon.v1.DaemonService`++The daemon itself: identity, the loopback bridge for webviews, shutdown.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`GetInfo`](#daemonservicegetinfo) | [`GetInfoRequest`](#getinforequest) | [`GetInfoResponse`](#getinforesponse) | unary |+| [`OpenMediaBridge`](#daemonserviceopenmediabridge) | [`OpenMediaBridgeRequest`](#openmediabridgerequest) | [`OpenMediaBridgeResponse`](#openmediabridgeresponse) | unary |+| [`Shutdown`](#daemonserviceshutdown) | [`ShutdownRequest`](#shutdownrequest) | [`ShutdownResponse`](#shutdownresponse) | unary |++### DaemonService.GetInfo++`/cua.daemon.v1.DaemonService/GetInfo`, unary: [`GetInfoRequest`](#getinforequest) to [`GetInfoResponse`](#getinforesponse).++Returns the daemon identity and its loopback endpoint.++### DaemonService.OpenMediaBridge++`/cua.daemon.v1.DaemonService/OpenMediaBridge`, unary: [`OpenMediaBridgeRequest`](#openmediabridgerequest) to [`OpenMediaBridgeResponse`](#openmediabridgeresponse).++Opens a media session in a sandbox and returns a loopback WebSocket URL+that relays it. The URL carries a short-lived bridge ticket; the+browser never sees the Fleet bearer or the spacesd token.++### DaemonService.Shutdown++`/cua.daemon.v1.DaemonService/Shutdown`, unary: [`ShutdownRequest`](#shutdownrequest) to [`ShutdownResponse`](#shutdownresponse).++Stops the daemon after the response is sent.++## Types in `cua/daemon/v1/sandboxes.proto`++### Sandbox++A sandbox.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Name (unique within its location; see `id`). |+| `provider` | 2 | [`SandboxProvider`](#sandboxprovider) | Provider. |+| `state` | 3 | [`SandboxState`](#sandboxstate) | State. |+| `image` | 4 | `string` | Image reference, for example "ghcr.io/trycua/linux:24.04". |+| `endpoints` | 5 | map of `string` to `string` | Reachable endpoints by service name, for example {"env": "http://127.0.0.1:52011"}. |+| `labels` | 6 | map of `string` to `string` | User labels. |+| `created_at` | 7 | `google.protobuf.Timestamp` | Creation time. |+| `error` | 8 | `string` | Failure reason when `state` is `SANDBOX_STATE_FAILED`. |+| `runtime_type` | 9 | `string` | Runtime identifier as persisted in the state file (`fleet`, `direct`, `docker`, `qemu`, `lume`, ...). |+| `ephemeral` | 10 | `bool` | True when the sandbox has no state file and is torn down on delete. |+| `services` | 11 | map of `string` to `uint32` | Declared services: logical name to guest port (0 when only the name is known, for example on Fleet). |+| `location` | 12 | `string` | Where the sandbox runs: "local", "cloud", "direct" (a machine reached by address) or "relay". |+| `expires_at` | 13 | `google.protobuf.Timestamp` | When the sandbox expires unless kept alive. Unset when unknown or never (cloud sandboxes held by the daemon are renewed while held). |+| `provider_details` | 14 | map of `string` to `string` | Provider internals for debugging (cloud: pool, namespace, claim; local: backend, container_id). Not part of the portable API. |+| `id` | 15 | `string` | Qualified ref: "local:<name>", "cloud:<name>" or "direct:<host:port>". Every request's `name` accepts it (and a bare name when that name is unique across locations). |+| `kind` | 16 | `string` | What kind of machine it runs as: "container" or "vm"; empty when not known (an existing machine, or a cloud sandbox this daemon did not create). |+| `runtime` | 17 | `string` | The engine that runs it: "gvisor", "runc", "qemu", "lume" or "kubevirt"; empty when not known. |+| `stop_reason` | 18 | `string` | Why a local sandbox stopped without being asked to, in plain words: "out of memory", "killed", "exited" or "exited with code N". Empty otherwise, and once it is started again. |++### ReadinessProbe++A user-declared readiness probe. With no probes a sandbox is ready as soon+as its provider reports it running.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `port` | 1 | `uint32` | Guest port to probe. |+| `http_path` | 2 | `string` | HTTP path. Empty means a TCP connect probe. |+| `http_status` | 3 | `uint32` | Exact HTTP status to wait for. 0 accepts any 2xx. |++### Sidecar++An extra container sharing a sandbox's network namespace: the sandbox+reaches its ports on `localhost`, and `services` may name them. Local+containers and cloud container (gVisor) sandboxes only.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Name, unique within the sandbox (a DNS label other than `main`). Empty derives it from the image. |+| `image` | 2 | `string` | Image reference. |+| `command` | 3 | repeated `string` | argv replacing the image's entrypoint. Empty lets the image decide. |+| `env` | 4 | map of `string` to `string` | Environment (plain values, not secrets). |+| `ports` | 5 | repeated `uint32` | Ports it listens on. |++### RegistrySecret++Credentials for a private registry. Write-only: never logged, stored in+state files or returned.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `registry` | 1 | `string` | Registry host (`ghcr.io`, `localhost:5000`). Empty means the image's. |+| `username` | 2 | `string` | User name (`AWS` for ECR tokens). |+| `password` | 3 | `string` | Password or token. |++### ImageLayer++One image build step, as in `images.cua.ai/v1alpha1` recipes.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `type` | 1 | `string` | `apt_install`, `pip_install`, `uv_install`, `run` or `app_install`. |+| `packages` | 2 | repeated `string` | Packages (the install types). |+| `command` | 3 | `string` | Shell command (`run`). |+| `app_id` | 4 | `string` | App id (`app_install`). |++### BuildFile++A local file copied into a built image.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `source` | 1 | `string` | Path on the daemon's machine. |+| `destination` | 2 | `string` | Absolute path in the image. |++### ImageBuild++Image layers built on top of the sandbox's image. Cloud: a remote build+through the images API, cached by content.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `layers` | 1 | repeated [`ImageLayer`](#imagelayer) | Steps, in order. |+| `env` | 2 | map of `string` to `string` | Image environment. |+| `ports` | 3 | repeated `uint32` | Ports the image exposes. |+| `files` | 4 | repeated [`BuildFile`](#buildfile) | Files copied into the image. |+| `timeout` | 5 | `google.protobuf.Duration` | Build budget. Unset uses one hour. |++### ListSandboxesRequest++Request for `SandboxService.ListSandboxes`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `provider` | 1 | [`SandboxProvider`](#sandboxprovider) | Deprecated. Deprecated: use `location`. Only sandboxes of this provider. Unspecified lists all. |+| `include_cloud` | 2 | optional `bool` | Also list the account's live Fleet claims (not only the ones this machine knows) when the provider filter allows cloud sandboxes. Unset means true. Without Fleet credentials nothing is added. |+| `location` | 3 | `string` | Only sandboxes in this location: "local", "cloud" or "direct". Empty lists every location. Wins over `provider`. |++### ListSandboxesResponse++Response for `SandboxService.ListSandboxes`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `sandboxes` | 1 | repeated [`Sandbox`](#sandbox) | Sandboxes. |+| `warnings` | 2 | repeated `string` | What the listing left out, for example "cloud sandboxes not listed: <reason>". The listing still succeeds. |++### CreateSandboxRequest++Request for `SandboxService.CreateSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Desired name. Empty lets the daemon generate one. |+| `provider` | 2 | [`SandboxProvider`](#sandboxprovider) | Deprecated. Deprecated: use `location`. Used only when `location` is empty. |+| `image` | 3 | `string` | Image reference (local and cloud sandboxes). |+| `pool` | 4 | `string` | Cloud: claim from this existing pool (Fleets advanced API). |+| `url` | 5 | `string` | Deprecated: use `location` "direct:<addr>". The address of an existing machine. |+| `token` | 6 | `string` | Access token for the direct provider's spacesd, if any. |+| `labels` | 7 | map of `string` to `string` | User labels. |+| `os` | 8 | `string` | Guest OS: `linux` (default), `macos` or `windows`. |+| `cpus` | 9 | `uint32` | vCPUs. 0 uses the provider default. |+| `memory_mb` | 10 | `uint64` | Memory in MiB. 0 uses the provider default. |+| `ports` | 11 | repeated `uint32` | Extra guest ports to publish (local) or expose as `port-<n>` services (Fleet). |+| `services` | 12 | map of `string` to `uint32` | Named services: logical name to guest port. `env` defaults to 3211. |+| `wait_for` | 13 | repeated [`ReadinessProbe`](#readinessprobe) | Readiness probes. |+| `ready_timeout` | 14 | `google.protobuf.Duration` | Total readiness budget. Unset uses the provider default. |+| `env` | 15 | map of `string` to `string` | Guest environment. Local: container environment or cloud-init; cloud: the template environment (hashed into the managed pool key). |+| `fleet_runtime` | 16 | `string` | Deprecated. Deprecated: use `runtime`. Cloud runtime (`kubevirt`, `gvisor`), used when `runtime` is empty. |+| `fleet_replicas` | 17 | `uint32` | Deprecated: initial replicas of a new managed Fleet pool (> 0 means warm). 0 leaves it to `fleet_warm`. |+| `fleet_ttl_seconds` | 18 | `uint32` | Fleet claim TTL in seconds after creation. 0 uses the default (managed pools: `CUA_FLEET_CLAIM_TTL`, renewed by the daemon while the sandbox is held). |+| `fleet_warm` | 19 | optional `bool` | Managed Fleet pools (no `pool`): start a new pool with one warm replica. Unset uses `CUA_FLEET_WARM`. Existing pools are never resized. |+| `fleet_max_pool_size` | 20 | `uint32` | Managed Fleet pools: autoscaling ceiling. 0 uses the default (`CUA_FLEET_MAX_POOL_SIZE`, 10). |+| `command` | 21 | repeated `string` | The sandbox's command (argv), replacing the image's entrypoint. Empty lets the image decide. Local containers: ENTRYPOINT; local Linux VMs: run by cloud-init; cloud pod runtimes: the template command. Cloud VMs (KubeVirt) and macOS guests reject it. |+| `sidecars` | 22 | repeated [`Sidecar`](#sidecar) | Sidecar containers sharing the sandbox's network namespace. Local containers and cloud container sandboxes; VMs reject them. |+| `registry_secret` | 23 | [`RegistrySecret`](#registrysecret) | Credentials for a private `image` (and sidecar images on its registry): local pulls use them; the cloud stores them as the sandbox's registry pull Secret. Never logged or returned. |+| `build` | 24 | [`ImageBuild`](#imagebuild) | Image layers built on top of `image` before the sandbox starts. |+| `container_runtime` | 25 | `string` | Deprecated. Deprecated: use `runtime`. Local container sandboxes: `runc` or `gvisor`, used when `runtime` is empty. Cloud sandboxes ignore it. |+| `fleet_apply` | 26 | `bool` | With `pool`: update that pool's template to the sandbox fields given here (image, command, env, services, sidecars, cpus, memory) instead of failing with POOL_SPEC_MISMATCH when they differ. Managed pools refuse. |+| `owner_pid` | 27 | `uint32` | The client process that owns an ephemeral sandbox (no `name`). The daemon records it in the sandbox's lease, so a local ephemeral sandbox is reaped after its client dies even while the daemon runs. 0: the daemon itself owns it. |+| `network` | 28 | `string` | Guest network: empty or `default` gives outbound network (like a Docker container); `none` cuts egress while published ports still work. Only local QEMU VMs honour `none`; containers, Lume and cloud sandboxes reject it. |+| `location` | 29 | `string` | Where it runs: "local", "cloud", "direct:<addr>" (an existing machine running cua-spacesd), or a registered provider (SANDBOX_PROVIDER_CONTRIB, e.g. "e2b"). Empty uses the default (`default.on` in the config, `CUA_DEFAULT_ON`, else "local"); clients resolve the default on their side and send it explicitly. |+| `kind` | 30 | `string` | What kind of machine: "auto" (empty), "container" or "vm". Auto decides from the image: macOS and Windows images are VMs, an image with a container rootfs is a container, a disk-only image is a VM. |+| `runtime` | 31 | `string` | Which engine: "auto" (empty) or one the location offers for the kind. Local: "gvisor", "runc" (containers), "qemu", "lume" (VMs). Cloud: "gvisor" (containers), "kubevirt" (VMs). A registered provider offers its own engines. Anything else is DAEMON_ERROR_REASON_INVALID_PLACEMENT, listing the valid values. |+| `keep_on_failure` | 32 | `bool` | Keep a named sandbox whose readiness check fails (its cloud claim, VM or container, and its record) for debugging. False: a failed create deletes what it made and releases the claim. Ephemeral sandboxes are always deleted. |+| `gpu` | 33 | `string` | A GPU option of the runtime it runs on (`GetGpuSupport`): "paravirtual" (a macOS VM on Lume: GPU acceleration, experimental), "virgl" (QEMU on Linux), "nvidia" (a runc container on Linux), a contrib provider's GPU type; "auto" picks the runtime's own. Empty: no GPU. An option the runtime does not offer here is DAEMON_ERROR_REASON_INVALID_ARGUMENT or _UNSUPPORTED, saying why. |++### CreateSandboxResponse++Response for `SandboxService.CreateSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `sandbox` | 1 | [`Sandbox`](#sandbox) | The sandbox. |++### CreateSandboxStreamRequest++Request for `SandboxService.CreateSandboxStream`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `create` | 1 | [`CreateSandboxRequest`](#createsandboxrequest) | The create, as for `CreateSandbox`. |++### CreateSandboxStreamResponse++One message of `SandboxService.CreateSandboxStream`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `progress` | 1 | [`CreateSpaceProgress`](#createspaceprogress) (oneof `event`) | What the create is doing now (`space` is empty). |+| `result` | 2 | [`CreateSandboxResponse`](#createsandboxresponse) (oneof `event`) | The created sandbox (the last message). |++### GetSandboxRequest++Request for `SandboxService.GetSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |++### GetSandboxResponse++Response for `SandboxService.GetSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `sandbox` | 1 | [`Sandbox`](#sandbox) | The sandbox. |++### CancelCreateSandboxRequest++Request for `SandboxService.CancelCreateSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | The sandbox's name. |++### CancelCreateSandboxResponse++Response for `SandboxService.CancelCreateSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `cancelled` | 1 | `bool` | A create of that name was running and was stopped. |+| `message` | 2 | `string` | What was removed and what stays, for people. |++### DeleteSandboxRequest++Request for `SandboxService.DeleteSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |++### DeleteSandboxResponse++Response for `SandboxService.DeleteSandbox`.++No fields.++### ConnectSandboxRequest++Request for `SandboxService.ConnectSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |++### ConnectSandboxResponse++Response for `SandboxService.ConnectSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `sandbox` | 1 | [`Sandbox`](#sandbox) | The sandbox. |++### SuspendSandboxRequest++Request for `SandboxService.SuspendSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |++### SuspendSandboxResponse++Response for `SandboxService.SuspendSandbox`.++No fields.++### ResumeSandboxRequest++Request for `SandboxService.ResumeSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |++### ResumeSandboxResponse++Response for `SandboxService.ResumeSandbox`.++No fields.++### RestartSandboxRequest++Request for `SandboxService.RestartSandbox`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |++### RestartSandboxResponse++Response for `SandboxService.RestartSandbox`.++No fields.++### KeepAliveRequest++Request for `SandboxService.KeepAlive`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `duration` | 2 | `google.protobuf.Duration` | How long to extend the lease by. |++### KeepAliveResponse++Response for `SandboxService.KeepAlive`.++No fields.++### WaitReadyRequest++Request for `SandboxService.WaitReady`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `probes` | 2 | repeated [`ReadinessProbe`](#readinessprobe) | Probes to wait for. |+| `timeout` | 3 | `google.protobuf.Duration` | Total budget. |++### WaitReadyResponse++Response for `SandboxService.WaitReady`.++No fields.++### HttpHeader++One HTTP header.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Header name. |+| `value` | 2 | `string` | Header value. |++### ServiceRequestRequest++Request for `SandboxService.ServiceRequest`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `service` | 2 | `string` | Logical service name, for example "env" or "server". |+| `method` | 3 | `string` | HTTP method. Empty means GET. |+| `path` | 4 | `string` | Path (and query) under the service. |+| `body` | 5 | `bytes` | Request body. |+| `timeout` | 6 | `google.protobuf.Duration` | Timeout. Unset means 30 seconds. |+| `headers` | 7 | repeated [`HttpHeader`](#httpheader) | Request headers (for example content-type, or accept and mcp-session-id for MCP). On Fleet the gateway bearer and claim header are added by the daemon and may not be set here. |++### ServiceRequestResponse++Response for `SandboxService.ServiceRequest`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `status` | 1 | `uint32` | HTTP status. |+| `headers` | 2 | repeated [`HttpHeader`](#httpheader) | Response headers. |+| `body` | 3 | `bytes` | Response body. |++### ForwardPortRequest++Request for `SandboxService.ForwardPort`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `port` | 2 | `uint32` | Guest port. |++### ForwardPortResponse++Response for `SandboxService.ForwardPort`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `forward_id` | 1 | `string` | Forward id for `CloseForward`. Empty when no listener was started (the port is only reachable as `url`). |+| `guest_port` | 2 | `uint32` | Guest port. |+| `local_addr` | 3 | `string` | Loopback `host:port` accepting connections, when a TCP forward runs. |+| `url` | 4 | `string` | URL to use (a loopback URL, or the Fleet gateway URL of the port's service). |++### CloseForwardRequest++Request for `SandboxService.CloseForward`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `forward_id` | 1 | `string` | Forward id. |++### CloseForwardResponse++Response for `SandboxService.CloseForward`.++No fields.++### GetEnvEndpointRequest++Request for `SandboxService.GetEnvEndpoint`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `probe_timeout` | 2 | `google.protobuf.Duration` | Probe timeout. Unset uses the daemon default. |++### GetServiceEndpointRequest++Request for `SandboxService.GetServiceEndpoint`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `service` | 2 | `string` | Service name, for example "mcp". |++### GetServiceEndpointResponse++Response for `SandboxService.GetServiceEndpoint`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `url` | 1 | `string` | Base URL, for example "http://127.0.0.1:52011/v1/sandboxes/dev/svc/mcp". Append the path. |+| `headers` | 2 | repeated [`HttpHeader`](#httpheader) | Headers every request needs (the daemon's loopback bearer). |++### GetEnvEndpointResponse++Response for `SandboxService.GetEnvEndpoint`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `url` | 1 | `string` | Loopback passthrough base URL, for example "http://127.0.0.1:52011/v1/sandboxes/dev/env". Append the gRPC path. |+| `token` | 2 | `string` | Bearer token for the passthrough (the daemon's loopback token). |+| `spacesd_version` | 3 | `string` | spacesd version reported by the probe. |++### GetServiceUrlRequest++Request for `SandboxService.GetServiceUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `service` | 2 | `string` | Logical service name. |++### GetServiceUrlResponse++Response for `SandboxService.GetServiceUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `url` | 1 | `string` | The URL (no trailing slash). |++### PublicUrl++A shareable, expiring URL of a sandbox service.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Id for `RevokePublicUrl`. |+| `url` | 2 | `string` | The URL. |+| `expires_at` | 3 | `google.protobuf.Timestamp` | When it stops working. |+| `sandbox` | 4 | `string` | Sandbox name. |+| `service` | 5 | `string` | Logical service name. |+| `provider_details` | 6 | map of `string` to `string` | Provider internals (cloud: namespace, claim; local: upstream). |++### CreatePublicUrlRequest++Request for `SandboxService.CreatePublicUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref or unique name (with `upstream_url`, only recorded). |+| `service` | 2 | `string` | Logical service name. |+| `ttl` | 3 | `google.protobuf.Duration` | Lifetime, 60 s to 24 h. Unset means 1 h. |+| `label` | 4 | `string` | Label shown in listings (cloud). |+| `upstream_url` | 5 | `string` | Share this loopback `http://` URL instead of resolving `name` and `service` (an embedded SDK runtime asking the daemon to host its URL). |++### CreatePublicUrlResponse++Response for `SandboxService.CreatePublicUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `public_url` | 1 | [`PublicUrl`](#publicurl) | The URL. |++### RevokePublicUrlRequest++Request for `SandboxService.RevokePublicUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox ref ("local:<name>", "cloud:<name>", "direct:<host:port>", a legacy id) or a name that is unique across locations. |+| `id` | 2 | `string` | `PublicUrl.id`. |++### RevokePublicUrlResponse++Response for `SandboxService.RevokePublicUrl`.++No fields.++### SandboxProvider++Where a sandbox comes from. Deprecated: requests use the `location`+string (`local`, `cloud`, `direct:<addr>`), which also names third-party+providers; responses carry `Sandbox.location`.++| Value | # | Description |+| --- | --- | --- |+| `SANDBOX_PROVIDER_UNSPECIFIED` | 0 | Not set. |+| `SANDBOX_PROVIDER_FLEET` | 1 | Claimed from a Fleet pool. |+| `SANDBOX_PROVIDER_LOCAL` | 2 | Run locally through cua-vmm (Lume, QEMU, container). |+| `SANDBOX_PROVIDER_DIRECT` | 3 | An existing machine reached by URL and token. |+| `SANDBOX_PROVIDER_CONTRIB` | 4 | A contrib provider (third-party platform). |++### SandboxState++Sandbox lifecycle state.++| Value | # | Description |+| --- | --- | --- |+| `SANDBOX_STATE_UNSPECIFIED` | 0 | Not reported. |+| `SANDBOX_STATE_PROVISIONING` | 1 | Being created or booted. |+| `SANDBOX_STATE_RUNNING` | 2 | Running and ready (per its readiness probes). |+| `SANDBOX_STATE_STOPPED` | 3 | Suspended or stopped; can resume. |+| `SANDBOX_STATE_DELETING` | 4 | Being deleted. |+| `SANDBOX_STATE_FAILED` | 5 | Failed; see `Sandbox.error`. |++## Types in `cua/daemon/v1/runtime.proto`++### RuntimeCheck++One doctor check.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Component, for example "lume", "qemu", "docker", "runsc". |+| `status` | 2 | [`CheckStatus`](#checkstatus) | Status. |+| `version` | 3 | `string` | Detected version, when present. |+| `detail` | 4 | `string` | Explanation or remediation. |++### DoctorRequest++Request for `RuntimeService.Doctor`.++No fields.++### DoctorResponse++Response for `RuntimeService.Doctor`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `checks` | 1 | repeated [`RuntimeCheck`](#runtimecheck) | Checks, in a stable order. |+| `report_json` | 2 | `string` | The full host report (cua-vmm `DoctorReport`) as JSON. |++### SetupRequest++Request for `RuntimeService.Setup`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `components` | 1 | repeated `string` | Components to set up. Empty means every installable component. |+| `dry_run` | 2 | `bool` | Report the plan without changing anything. |++### SetupStep++One setup step.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Component. |+| `status` | 2 | [`CheckStatus`](#checkstatus) | Status after the step. |+| `detail` | 3 | `string` | What was done, or would be done on a dry run. |++### SetupResponse++Response for `RuntimeService.Setup`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `steps` | 1 | repeated [`SetupStep`](#setupstep) | Steps, in execution order. |++### LocalImage++A local image.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `reference` | 1 | `string` | Reference. |+| `kind` | 2 | `string` | `container` or `vm`. |+| `location` | 3 | `string` | Local disk path (VM images) or engine image reference (containers). |+| `size_bytes` | 4 | `uint64` | Size in bytes, when known. |++### PullImageRequest++Request for `RuntimeService.PullImage`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `reference` | 1 | `string` | Reference, with an optional backend prefix (`container:`, `vm:`). |++### PullImageResponse++Response for `RuntimeService.PullImage`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `image` | 1 | [`LocalImage`](#localimage) | The pulled image. |++### BuildImageRequest++Request for `RuntimeService.BuildImage`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `spec_json` | 1 | `string` | `images.cua.ai/v1alpha1` Image resource as JSON. |+| `base` | 2 | `string` | Base image, with an optional backend prefix (`container:`, `vm:`, `disk:`). |+| `push` | 3 | `string` | Push the result to this reference. Empty keeps it local. |++### BuildImageResponse++Response for `RuntimeService.BuildImage`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `result` | 1 | `string` | `reference@digest` when pushed, else the local output directory. |++### PushImageRequest++Request for `RuntimeService.PushImage`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `reference` | 1 | `string` | Source reference. |+| `destination` | 2 | `string` | Destination reference. |++### PushImageResponse++Response for `RuntimeService.PushImage`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `digest` | 1 | `string` | Pushed manifest digest. |++### CheckStatus++Status of one local runtime component.++| Value | # | Description |+| --- | --- | --- |+| `CHECK_STATUS_UNSPECIFIED` | 0 | Not reported. |+| `CHECK_STATUS_OK` | 1 | Present and usable. |+| `CHECK_STATUS_INSTALLABLE` | 2 | Missing, but `cua runtime setup` can install it. |+| `CHECK_STATUS_ERROR` | 3 | Missing or broken and needs user action. |+| `CHECK_STATUS_NOT_APPLICABLE` | 4 | Not applicable on this host. |++## Types in `cua/daemon/v1/spaces.proto`++### Space++A registered Space.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Space id, for example "space://direct/10.0.0.5:3211". |+| `name` | 2 | `string` | Display name. |+| `spacesd_version` | 3 | `string` | spacesd version reported at the last handshake. |+| `features` | 4 | repeated `string` | Supported feature names reported at the last handshake. |+| `added_at` | 5 | `google.protobuf.Timestamp` | When it was added. |+| `os` | 6 | `string` | Guest OS family at the last handshake (GetCapabilities): "linux", "macos" or "windows"; empty when not reported. |+| `services` | 7 | repeated `string` | Services the Space declares (never "env"), for example "mcp". A Space without cua-spacesd has an empty feature list and reaches these through generic MCP (`list_tools` / `call_tool` with `service`). |+| `os_name` | 8 | `string` | Guest OS product or distribution at the last handshake (GetCapabilities `os.name`), for example "Ubuntu" or "macOS"; empty when not reported. The Spaces app picks the OS icon from it. |+| `os_pretty_name` | 9 | `string` | The guest's full OS string at the last handshake (GetCapabilities `os.pretty_name`), for example "Ubuntu 24.04.3 LTS"; empty when the driver does not report one. |+| `image` | 10 | `string` | The image the sandbox runs, as requested (local and cloud Spaces), for example "ghcr.io/trycua/linux:24.04"; empty when unknown (a Space added by address). |+| `image_digest` | 11 | `string` | The digest of the variant that runs ("sha256:..."), when known. |+| `kind` | 12 | `string` | Container or virtual machine: "container" or "vm" (the guest's runtime at the last handshake, else the local sandbox's record); empty when unknown. |+| `arch` | 13 | `string` | The guest's CPU architecture: "arm64" or "amd64" (GetCapabilities `arch` at the last handshake, else the local sandbox's record); empty when unknown. |+| `host` | 14 | `string` | For a Space a host provides (`relay:<machine>` created with `on="host:<machine>"`): the relay machine id of that host; for one a host added by its direct address created (`direct:<addr>:<port>`): that host's Space id (`direct:<addr>:<port>`); empty otherwise. Lists group these Spaces under their host. |+| `host_name` | 15 | `string` | The display name of `host`, when known. |+| `power` | 16 | `string` | How the Space turns off and on again (`stop_space` / `start_space`): "suspend" (its memory is kept), "stop" (its disk is kept), or empty when it cannot. Filled in when listed, not stored. |+| `power_state` | 17 | `string` | "running", "suspended" or "stopped" as cua last recorded it; empty when unknown. Filled in when listed, not stored. |+| `cloud` | 18 | `string` | A Space in the owner's own cloud: the provider ("aws", "gcp", "modal"); empty otherwise. |+| `cloud_place` | 19 | `string` | Where it runs, for people ("AWS · us-west-2"); empty otherwise. |+| `cloud_delete` | 20 | `string` | How this device would delete it permanently: "here" (this cua home created it and records it), "host:<machine>" (ask the device that created it, through the relay) or "elsewhere" (only from the device that created it). Empty for other Spaces. |+| `stop_reason` | 21 | `string` | Why a local Space stopped without being asked to, in plain words: "out of memory", "killed", "exited" or "exited with code N". Empty otherwise, and once it is started again. Filled in when listed, not stored. |++### AddSpaceRequest++Request for `SpaceService.AddSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `url` | 1 | `string` | Space URL. |+| `token` | 2 | `string` | spacesd token (direct Spaces). |+| `name` | 3 | `string` | Display name. Empty derives one. |+| `service` | 4 | `string` | When `url` is not a cua-spacesd but an MCP endpoint: the service name it is registered under. Empty means "mcp". |++### AddSpaceResponse++Response for `SpaceService.AddSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`Space`](#space) | The Space. |++### ListSpacesRequest++Request for `SpaceService.ListSpaces`.++No fields.++### ListSpacesResponse++Response for `SpaceService.ListSpaces`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `spaces` | 1 | repeated [`Space`](#space) | Spaces. |++### RemoveSpaceRequest++Request for `SpaceService.RemoveSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Space id. |++### RemoveSpaceResponse++Response for `SpaceService.RemoveSpace`.++No fields.++### ResolveSpaceRequest++Request for `SpaceService.ResolveSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | Id, legacy id, URL or display name. |++### ResolveSpaceResponse++Response for `SpaceService.ResolveSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`Space`](#space) | The registered Space. |++### ClaimFleetSpaceRequest++Request for `SpaceService.ClaimFleetSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `image` | 1 | `string` | Image. Empty uses the default Spaces image for the runtime. |+| `runtime` | 2 | `string` | Fleet runtime (`kubevirt`, `gvisor`). Empty picks from the image. |+| `name` | 3 | `string` | Display name. |+| `wait` | 4 | optional `bool` | Wait for the claim to bind (default true when unset). |+| `reuse` | 5 | `bool` | Reuse a reachable registered Fleet Space for the same image first. |+| `command` | 6 | repeated `string` | Entrypoint override (pod runtimes). Empty keeps the image's. |+| `env` | 7 | map of `string` to `string` | Guest environment. |+| `services` | 8 | map of `string` to `uint32` | Named services (name -> guest port), for example {"mcp": 8765}. |+| `spacesd` | 9 | optional `bool` | Whether the image runs cua-spacesd. Unset: yes for the Spaces images, no for any other image. |++### ClaimFleetSpaceResponse++Response for `SpaceService.ClaimFleetSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`Space`](#space) | The Space, once bound. |+| `pending_json` | 2 | `string` | With `wait = false`: the pending claim as JSON (`{namespace, claim, pool, ...}`). |+| `reused` | 3 | `bool` | A registered Space was reused. |++### ProvisionLocalSpaceRequest++Request for `SpaceService.ProvisionLocalSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `image` | 1 | `string` | Image. Empty uses the default Spaces image. |+| `name` | 2 | `string` | Name. Empty generates one. |+| `cpus` | 3 | `uint32` | vCPUs (0 = 2). |+| `memory_mb` | 4 | `uint64` | Memory in MiB (0 = 4096). |+| `timeout` | 5 | `google.protobuf.Duration` | Provisioning budget (default 600 s). |+| `command` | 6 | repeated `string` | Entrypoint override. Empty keeps the image's. |+| `env` | 7 | map of `string` to `string` | Guest environment. |+| `services` | 8 | map of `string` to `uint32` | Named services (name -> guest port), for example {"mcp": 8765}. |+| `spacesd` | 9 | optional `bool` | Whether the image runs cua-spacesd. Unset: yes for the Spaces images, no for any other image. |++### ProvisionLocalSpaceResponse++Response for `SpaceService.ProvisionLocalSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`Space`](#space) | The Space. |++### ReleaseSpaceRequest++Request for `SpaceService.ReleaseSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | Space. |++### ReleaseSpaceResponse++Response for `SpaceService.ReleaseSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `message` | 1 | `string` | What happened, for humans. |++### ConnectSpaceRequest++Request for `SpaceService.ConnectSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | Space. |++### ConnectSpaceResponse++Response for `SpaceService.ConnectSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`Space`](#space) | The Space. |+| `env_url` | 2 | `string` | env passthrough base URL (speaks `cua.env.v1`, gRPC and gRPC-Web, and relays the `/media` and `/tunnel` WebSockets). |+| `token` | 3 | `string` | Bearer for `env_url` (the daemon's loopback token). |+| `capabilities` | 4 | `bytes` | `cua.env.v1.GetCapabilitiesResponse` of the Space, protobuf-encoded. |+| `services` | 5 | repeated [`SpaceServiceEndpoint`](#spaceserviceendpoint) | The Space's declared services through the daemon (same bearer as `env_url`). `env_url` is empty when the Space runs no cua-spacesd. |++### SpaceServiceEndpoint++A declared service of a Space, reachable through the daemon.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Service name, for example "mcp". |+| `url` | 2 | `string` | Base URL: requests to `<url><path>` reach `<path>` on the service. |+| `mcp_path` | 3 | `string` | Its MCP endpoint path, for example "/mcp". |++### ListSpaceToolsRequest++Request for `SpaceService.ListSpaceTools`.++No fields.++### ListSpaceToolsResponse++Response for `SpaceService.ListSpaceTools`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `tools_json` | 1 | `string` | MCP `tools/list` result as JSON. |++### CallSpaceToolRequest++Request for `SpaceService.CallSpaceTool`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Tool name from the Spaces contract. |+| `arguments_json` | 2 | `string` | Arguments as a JSON object. Empty means `{}`. |++### CallSpaceToolResponse++Response for `SpaceService.CallSpaceTool`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `content_json` | 1 | `string` | MCP content parts as a JSON array. |+| `structured_json` | 2 | `string` | MCP structured content as JSON, when present. |+| `is_error` | 3 | `bool` | The call failed as a tool error. |+| `meta_json` | 4 | `string` | The result's `_meta` as JSON, when present (forwarded verbatim from an in-Space MCP service). |++### CreateSpaceRequest++Request for `SpaceService.CreateSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `image` | 1 | `string` | Image. Empty uses the canonical Linux image. |+| `location` | 2 | `string` | Where it runs: "local", "cloud" or a registered provider. Empty uses the default (`default.on` in the config, `CUA_DEFAULT_ON`, else "local"); clients resolve the default on their side. |+| `kind` | 3 | `string` | What kind of machine: "auto" (empty), "container" or "vm". |+| `runtime` | 4 | `string` | Which engine: "auto" (empty), or one the location offers for the kind ("gvisor", "runc", "qemu", "lume" locally; "gvisor", "kubevirt" in the cloud). |+| `name` | 5 | `string` | Name. Empty generates `space-<hex>`. |+| `cpus` | 6 | `uint32` | vCPUs (0 = the default, 2). |+| `memory_mb` | 7 | `uint64` | Memory in MiB (0 = the default, 4096). |+| `timeout` | 8 | `google.protobuf.Duration` | Readiness budget (default 600 s). |+| `wait` | 9 | optional `bool` | Wait until the Space is ready (default true when unset). With false the response carries only its id and phase "starting". |+| `reuse` | 10 | `bool` | Return a reachable registered Space with the same image, location, kind and runtime instead of creating one (get-or-create). |+| `command` | 11 | repeated `string` | Entrypoint override. Empty keeps the image's. |+| `env` | 12 | map of `string` to `string` | Guest environment. |+| `services` | 13 | map of `string` to `uint32` | Named services (name -> guest port), for example {"mcp": 8765}. |+| `spacesd` | 14 | optional `bool` | Whether the image runs cua-spacesd. Unset: yes for the canonical images, no for any other image. |+| `disk_gb` | 15 | `uint32` | Grow the VM's disk to this many GiB (local VMs only; 0 keeps the image's size). Lume grows the macOS APFS container before the first boot; Linux images grow their root partition at boot (cloud-init growpart). |+| `gpu` | 16 | `string` | A GPU option of the runtime the Space runs on (`GetGpuSupport`): "paravirtual" (a macOS VM on Lume: GPU acceleration, experimental), "virgl", "nvidia", a provider's GPU type; "auto" picks the runtime's own. Empty: no GPU. Kept with the Space. |+| `create_id` | 17 | `string` | The caller's own key for this create (an app's pending row id), for `CancelCreateSpace` before the Space's id is known. |++### CreateSpaceResponse++Response for `SpaceService.CreateSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`Space`](#space) | The Space (with `wait = false`: only its id). |+| `phase` | 2 | `string` | "ready", or "starting" with `wait = false`. |+| `reused` | 3 | `bool` | `reuse` returned an existing Space. |++### CreateSpaceStreamRequest++Request for `SpaceService.CreateSpaceStream`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `create` | 1 | [`CreateSpaceRequest`](#createspacerequest) | The create, as for `CreateSpace`. `wait` is ignored: the stream always runs until the Space is ready or the create fails. |++### CreateSpaceProgress++What a create is doing.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `phase` | 1 | `string` | "preparing", "pulling", "creating", "booting", "waiting_for_services", "connecting" or "ready", in that order. |+| `fraction` | 2 | optional `double` | How far through the phase, 0.0 to 1.0, when its size is known (an image pull). |+| `detail` | 3 | `string` | One short line, for example the image being pulled. |+| `bytes_done` | 4 | optional `uint64` | Bytes downloaded so far, when the step counts them (an image pull). |+| `bytes_total` | 5 | optional `uint64` | Bytes the download has in all. |+| `bytes_per_second` | 6 | optional `double` | Smoothed download rate, bytes per second. |+| `space` | 7 | `string` | The id the Space will have (`local:<name>`), for `CancelCreateSpace`. |++### CreateSpaceStreamResponse++One message of `SpaceService.CreateSpaceStream`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `progress` | 1 | [`CreateSpaceProgress`](#createspaceprogress) (oneof `event`) | What the create is doing now. |+| `result` | 2 | [`CreateSpaceResponse`](#createspaceresponse) (oneof `event`) | The created Space (the last message). |++### CancelCreateSpaceRequest++Request for `SpaceService.CancelCreateSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | The create's `create_id`, the id the Space will have, or its name. |++### CancelCreateSpaceResponse++Response for `SpaceService.CancelCreateSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | The Space id the create had, when known. |+| `state` | 2 | `string` | "cancelled", "not_creating" (nothing by that key is running) or "already_created" (it finished; delete it instead). |+| `message` | 3 | `string` | What was removed and what stays, for people. |++### GetGpuSupportRequest++Request for `SpaceService.GetGpuSupport`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `location` | 1 | `string` | "local" (empty) or "cloud". |++### GpuOption++One GPU option of a runtime.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | What to pass as `gpu`. |+| `label` | 2 | `string` | How a person names it ("GPU acceleration"). |+| `experimental` | 3 | `bool` | Experimental. |+| `supported` | 4 | `bool` | Works on this host (and account) now. |+| `reason` | 5 | `string` | Why not, one short line. |+| `learn_more` | 6 | `string` | A page that explains it. |+| `usd_per_hour` | 7 | optional `double` | Estimated cost per hour while it runs (cloud GPU types). |++### GpuSupport++The GPU options of one runtime.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `runtime` | 1 | `string` | "lume", "qemu", "container", "gvisor", "fleet", a provider's name. |+| `options` | 2 | repeated [`GpuOption`](#gpuoption) | Its options; empty: none. |+| `reason` | 3 | `string` | Why it has none. |++### GetGpuSupportResponse++Response for `SpaceService.GetGpuSupport`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `runtimes` | 1 | repeated [`GpuSupport`](#gpusupport) | One entry per runtime of the location. |++### DeleteSpaceRequest++Request for `SpaceService.DeleteSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | Space. |++### DeleteSpaceResponse++Response for `SpaceService.DeleteSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `message` | 1 | `string` | What happened, for humans. |++### ListHostsRequest++Request for `SpaceService.ListHosts`.++No fields.++### SpacesHostLimit++One limit of a host and how much of it is used.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `resource` | 1 | `string` | `spaces` (every Space it provides) or `macos_vms` (macOS VMs on that Mac). |+| `used` | 2 | `uint32` | In use now. |+| `limit` | 3 | `uint32` | The limit (0: none). |+| `reason` | 4 | `string` | Why the limit exists, for people. |++### SpacesHost++One of your machines that provides Spaces.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | What `on="host:<id>"` takes: the relay machine id, or the name a direct host was added as. |+| `name` | 2 | `string` | Its name. |+| `via` | 3 | `string` | `relay` or `direct`. |+| `online` | 4 | `bool` | It answered. |+| `os` | 5 | `string` | Its operating system (`macos`, `linux`, `windows`), when it answered. |+| `limits` | 6 | repeated [`SpacesHostLimit`](#spaceshostlimit) | Its limits, when it answered. |++### ListHostsResponse++Response for `SpaceService.ListHosts`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `hosts` | 1 | repeated [`SpacesHost`](#spaceshost) | In order: relay hosts, then direct ones. |++### GetSpaceThumbnailRequest++Request for `SpaceService.GetSpaceThumbnail`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | Space. |+| `max_age` | 2 | `google.protobuf.Duration` | How old a cached thumbnail may be (unset: any age; zero: always capture). |++### GetSpaceThumbnailResponse++Response for `SpaceService.GetSpaceThumbnail`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `image` | 1 | `bytes` | Encoded image. |+| `format` | 2 | `string` | "jpeg". |+| `width` | 3 | `uint32` | Pixel width. |+| `height` | 4 | `uint32` | Pixel height. |+| `captured_at` | 5 | `google.protobuf.Timestamp` | When it was captured. |++## Types in `cua/daemon/v1/daemon.proto`++### DaemonErrorInfo++Structured error detail of daemon RPCs.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `reason` | 1 | [`DaemonErrorReason`](#daemonerrorreason) | Reason. |+| `message` | 2 | `string` | Human-readable message. |+| `metadata` | 3 | map of `string` to `string` | Extra context. |++### GetInfoRequest++Request for `DaemonService.GetInfo`.++No fields.++### GetInfoResponse++Response for `DaemonService.GetInfo`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `version` | 1 | `string` | cua-daemon version. |+| `pid` | 2 | `uint32` | Process id. |+| `socket_path` | 3 | `string` | Unix socket path, when listening on one. |+| `loopback_url` | 4 | `string` | Loopback base URL (`http://127.0.0.1:<port>`) serving the same services, the env passthrough and the media bridge. |+| `loopback_token` | 5 | `string` | Bearer token of the loopback listener. |+| `features` | 6 | repeated `string` | Compiled-in SDK features, for example "env", "fleet", "local". |+| `started_at` | 7 | `google.protobuf.Timestamp` | When the daemon started. |+| `executable` | 8 | `string` | The daemon's executable (symlinks resolved), so a client bound to an app bundle can tell its own daemon from another app's. Empty from daemons that predate it. |+| `build_id` | 9 | `string` | The executable's build as it was when the daemon started (version, size and modification time), so a client can tell a daemon whose executable was rebuilt or updated since. Empty from daemons that predate it. |++### OpenMediaBridgeRequest++Request for `DaemonService.OpenMediaBridge`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Sandbox name. |+| `open_media_json` | 2 | `string` | `cua.env.v1.OpenMediaRequest` in canonical proto3 JSON. Empty opens the primary display with defaults. |++### OpenMediaBridgeResponse++Response for `DaemonService.OpenMediaBridge`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `ws_url` | 1 | `string` | Loopback WebSocket URL, for example "ws://127.0.0.1:52011/v1/bridge/media?ticket=...". Speaks rcdp wire v2 unchanged. |+| `ticket` | 2 | `string` | Bridge ticket (also in `ws_url`). |+| `expires_at` | 3 | `google.protobuf.Timestamp` | When the bridge ticket stops accepting new attaches. |+| `open_media_response_json` | 4 | `string` | `cua.env.v1.OpenMediaResponse` in canonical proto3 JSON, with the upstream ticket removed. |++### ShutdownRequest++Request for `DaemonService.Shutdown`.++No fields.++### ShutdownResponse++Response for `DaemonService.Shutdown`.++No fields.++### DaemonErrorReason++Why a daemon call failed. Packed as `DaemonErrorInfo` in the+`google.rpc.Status` details of every daemon error.++| Value | # | Description |+| --- | --- | --- |+| `DAEMON_ERROR_REASON_UNSPECIFIED` | 0 | Unknown. |+| `DAEMON_ERROR_REASON_INVALID_ARGUMENT` | 1 | Bad input. |+| `DAEMON_ERROR_REASON_NOT_FOUND` | 2 | No such sandbox, forward or bridge. |+| `DAEMON_ERROR_REASON_PROVIDER_NOT_CONFIGURED` | 3 | The provider is not configured in the daemon (for example no Fleet credentials). |+| `DAEMON_ERROR_REASON_UNSUPPORTED` | 4 | The provider or build cannot do this. |+| `DAEMON_ERROR_REASON_SPACESD_NOT_AVAILABLE` | 5 | No cua-spacesd answered in the sandbox. |+| `DAEMON_ERROR_REASON_TIMEOUT` | 6 | A deadline elapsed. |+| `DAEMON_ERROR_REASON_FLEET` | 7 | Fleet API failure. |+| `DAEMON_ERROR_REASON_RUNTIME` | 8 | Local runtime failure. |+| `DAEMON_ERROR_REASON_ENV` | 9 | spacesd call failure. |+| `DAEMON_ERROR_REASON_HTTP` | 10 | HTTP failure talking to a sandbox service. |+| `DAEMON_ERROR_REASON_INTERNAL` | 11 | Daemon bug or I/O failure. |+| `DAEMON_ERROR_REASON_UNAUTHENTICATED` | 12 | Missing or wrong daemon token. |+| `DAEMON_ERROR_REASON_CAPABILITY_MISSING` | 13 | The Space's spacesd reports a feature the call needs as unsupported. |+| `DAEMON_ERROR_REASON_HOST_CAPABILITY_MISSING` | 14 | A host-side prerequisite (app-session providers, an operator display, a local runtime) is not available. |+| `DAEMON_ERROR_REASON_TELEPORT_REFUSED` | 15 | The teleport consent gate refused. |+| `DAEMON_ERROR_REASON_POOL_SPEC_MISMATCH` | 16 | A named cloud pool's template differs from the requested sandbox fields (pass apply to update it). |+| `DAEMON_ERROR_REASON_CLAIM_SECRETS_NOT_DELIVERED` | 17 | A claim bound but its per-claim secrets never reached the sandbox; the claim was released. |+| `DAEMON_ERROR_REASON_AMBIGUOUS_SANDBOX` | 18 | A bare sandbox name matches sandboxes in more than one location. The qualified candidates are in `DaemonErrorInfo.metadata["candidates"]` (comma-separated, for example "local:box,cloud:box"). |+| `DAEMON_ERROR_REASON_INSUFFICIENT_DISK` | 19 | A pull, build or VM create would leave less than the configured minimum free disk space; nothing was written (`cua cache prune` frees space). |+| `DAEMON_ERROR_REASON_INVALID_PLACEMENT` | 20 | A location, kind or runtime that does not exist, or a combination of them (or with the image) that does not. The accepted values are in `DaemonErrorInfo.metadata["valid"]` (comma-separated, for example "auto,gvisor,runc") and the axis in `metadata["axis"]` ("on", "kind", "runtime" or "image"). |+| `DAEMON_ERROR_REASON_FLEET_ADMISSION_DENIED` | 21 | Fleet's admission refused a write, for example a sandbox size over the account's limits. The message is Fleet's and names the limit. |+| `DAEMON_ERROR_REASON_CLOUD_CREDIT_EXHAUSTED` | 22 | The account is out of Cua Cloud credit (no credit left, and no card or plan): new cloud sandboxes are refused, running ones keep running. The message ends with the website billing page's URL. |+| `DAEMON_ERROR_REASON_CANCELLED` | 23 | The create was cancelled (`CancelCreateSpace`, or its caller went away); what it made is gone. The message says what was removed and what stays (finished image downloads stay cached). |+| `DAEMON_ERROR_REASON_CLOUD` | 24 | Your own cloud account (AWS, Google Cloud, Modal) refused or failed a call Cua made there: a missing permission, a quota, a region without the machine type. The message names the cloud's own error. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-common.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-common.mdxdeleted file mode 100644index 431fce08cc..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/env-common.mdx+++ /dev/null@@ -1,186 +0,0 @@-----title: "Shared types and errors"-description: "The cua.env.v1 types every spacesd service shares: ErrorInfo, principals and geometry."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--Errors (`google.rpc.Status` carrying `ErrorInfo`), principals and geometry, used by every `cua.env.v1` service.--Source: `libs/cua/proto/cua/env/v1/common.proto`.--## Types in `cua/env/v1/common.proto`--### Point--A point in a two-dimensional coordinate space. Which space is always stated-by the enclosing message (see `CoordinateSpace`).--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `x` | 1 | `double` | Horizontal coordinate, growing to the right. |-| `y` | 2 | `double` | Vertical coordinate, growing downward. |--### Rect--An axis-aligned rectangle in a coordinate space stated by the enclosing-message.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `x` | 1 | `double` | Left edge. |-| `y` | 2 | `double` | Top edge. |-| `width` | 3 | `double` | Width. Never negative. |-| `height` | 4 | `double` | Height. Never negative. |--### PixelSize--A size in device (physical) pixels.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `width` | 1 | `uint32` | Width in pixels. |-| `height` | 2 | `uint32` | Height in pixels. |--### WindowRef--Opaque, server-issued reference to a window.--Native window identifiers (CGWindowID, HWND, X11 Window, portal tokens) are-never exposed. `id` stays stable for the life of the native window. `epoch`-changes whenever the server recycles an `id` or the window's identity is no-longer trustworthy (for example, the owning process restarted). A request-with a stale epoch fails with FAILED_PRECONDITION and-`ERROR_REASON_STALE_HANDLE`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Opaque window identifier. Compare only for equality. |-| `epoch` | 2 | `uint64` | Identity generation of `id`. |--### Display--A display (monitor) attached to the guest desktop.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Opaque, stable display identifier. The alias "primary" is accepted wherever a display id is expected. |-| `name` | 2 | `string` | Human-readable name, for example "Built-in Retina Display" or "XVFB-0". |-| `primary` | 3 | `bool` | True for the primary display. |-| `bounds` | 4 | [`Rect`](#rect) | Display bounds in global logical points (`COORDINATE_SPACE_SCREEN`). |-| `native_size` | 5 | [`PixelSize`](#pixelsize) | Size of the display's framebuffer in physical pixels. |-| `scale_factor` | 6 | `double` | Physical pixels per logical point (for example 2.0 on Retina, 1.0 on most Linux framebuffers). |-| `refresh_rate_hz` | 7 | `uint32` | Nominal refresh rate in hertz, 0 when unknown (for example Xvfb). |-| `rotation_degrees` | 8 | `uint32` | Clockwise rotation in degrees: 0, 90, 180 or 270. |--### DeliveryReport--What the server actually did for an input or action request.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `delivery` | 1 | [`Delivery`](#delivery) | The delivery mode that was used. Never `DELIVERY_AUTO` or unspecified. |-| `focus_changed` | 2 | `bool` | True if the focused window or frontmost app changed as a result. |-| `pointer_moved` | 3 | `bool` | True if the user-visible pointer moved as a result. |-| `detail` | 4 | `string` | Free-form, human-readable note (for example which platform path was used). Not for programmatic use. |--### Principal--Who is making a call. Sent as serialized bytes in the `x-cua-principal-bin`-metadata entry.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Stable identifier chosen by the client (for example a user id or an agent run id). |-| `display_name` | 2 | `string` | Name shown to other participants. |-| `color` | 3 | `string` | Preferred cursor color as `#RRGGBB`. The server may substitute a different color to keep participants distinguishable. |-| `kind` | 4 | [`PrincipalKind`](#principalkind) | Whether the principal is a human or an automated agent. |--### ErrorInfo--Machine-readable error detail, packed as `google.protobuf.Any` inside the-`google.rpc.Status` in the `grpc-status-details-bin` trailer.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `reason` | 1 | [`ErrorReason`](#errorreason) | The specific reason. More precise than the gRPC status code. |-| `message` | 2 | `string` | Human-readable description. Not for programmatic use. |-| `feature` | 3 | `string` | Capability feature name involved, when `reason` is `ERROR_REASON_FEATURE_UNSUPPORTED` (for example "a11y"). |-| `metadata` | 4 | map of `string` to `string` | Structured context. Well-known keys: "expected_sequence", "expected_offset", "path", "pid", "tag", "retry_after_ms". |--### KeepAlive--Periodic empty message sent on long-lived server streams so proxies (the-Fleet gateway, load balancers) do not time out an idle stream. Clients-ignore it apart from resetting their own liveness timers.--No fields.--### CoordinateSpace--The coordinate space a `Point` or `Rect` is expressed in.--| Value | # | Description |-| --- | --- | --- |-| `COORDINATE_SPACE_UNSPECIFIED` | 0 | Not set. Servers treat it as `COORDINATE_SPACE_SCREEN`. |-| `COORDINATE_SPACE_SCREEN` | 1 | Global desktop space in logical points, origin at the top-left of the primary display. This is the space `Display.bounds` uses. |-| `COORDINATE_SPACE_WINDOW` | 2 | Logical points relative to the top-left corner of the target window's frame. Requires a target window on the request. |-| `COORDINATE_SPACE_SCREENSHOT` | 3 | Pixels of a screenshot previously returned by `ComputerService.Screenshot`, identified by `screenshot_id` on the request. The server performs the one conversion to native coordinates and fails with `ERROR_REASON_STALE_GEOMETRY` if the display or window geometry changed since the screenshot was taken. |-| `COORDINATE_SPACE_NORMALIZED` | 4 | Normalized coordinates in [0, 1] relative to the target window, or the target display when no window is given. |--### Delivery--How synthetic input or an action is delivered to the guest.--| Value | # | Description |-| --- | --- | --- |-| `DELIVERY_UNSPECIFIED` | 0 | Not set. Servers treat it as `DELIVERY_AUTO`. |-| `DELIVERY_AUTO` | 1 | Prefer background delivery and fall back to foreground delivery when the platform or target cannot receive background input. |-| `DELIVERY_BACKGROUND` | 2 | Deliver without moving the user-visible pointer, changing the focused window or activating the target app. Fails with `ERROR_REASON_WOULD_REQUIRE_ACTIVATION` rather than falling back. |-| `DELIVERY_FOREGROUND` | 3 | Activate the target (if any) and deliver through the global input stream, moving the real pointer and focus. |--### PrincipalKind--Kind of principal behind a call.--| Value | # | Description |-| --- | --- | --- |-| `PRINCIPAL_KIND_UNSPECIFIED` | 0 | Not set. Servers treat it as `PRINCIPAL_KIND_HUMAN`. |-| `PRINCIPAL_KIND_HUMAN` | 1 | A person driving a client UI. |-| `PRINCIPAL_KIND_AGENT` | 2 | An automated agent. |--### ErrorReason--Machine-readable error reasons shared by every service.--| Value | # | Description |-| --- | --- | --- |-| `ERROR_REASON_UNSPECIFIED` | 0 | Not set. |-| `ERROR_REASON_UNAUTHENTICATED` | 1 | Missing or wrong bearer token, or an expired ticket. |-| `ERROR_REASON_FEATURE_UNSUPPORTED` | 2 | The operation needs a feature the guest does not support. See `ErrorInfo.feature` and `SystemService.GetCapabilities`. |-| `ERROR_REASON_PERMISSION_DENIED` | 3 | The guest OS denied permission (for example macOS TCC, UAC, AT-SPI disabled). |-| `ERROR_REASON_STALE_HANDLE` | 4 | A `WindowRef` epoch no longer matches. |-| `ERROR_REASON_STALE_GEOMETRY` | 5 | Geometry changed since the referenced screenshot or media frame. |-| `ERROR_REASON_STALE_SNAPSHOT` | 6 | An accessibility element's snapshot is no longer current. |-| `ERROR_REASON_WOULD_REQUIRE_ACTIVATION` | 7 | `DELIVERY_BACKGROUND` was requested but only foreground delivery could reach the target. |-| `ERROR_REASON_TARGET_UNAVAILABLE` | 8 | The target window, app, display or element is gone. |-| `ERROR_REASON_DELIVERY_FAILED` | 9 | The platform accepted the request but native delivery failed. |-| `ERROR_REASON_PROCESS_NOT_FOUND` | 10 | No process matches the given pid or tag. |-| `ERROR_REASON_PATH_NOT_FOUND` | 11 | The path does not exist. |-| `ERROR_REASON_PATH_EXISTS` | 12 | The path already exists and overwrite was not requested. |-| `ERROR_REASON_NOT_A_DIRECTORY` | 13 | A directory was required. |-| `ERROR_REASON_IS_A_DIRECTORY` | 14 | A regular file was required. |-| `ERROR_REASON_DISK_FULL` | 15 | The guest disk is full (HTTP 507 on the `/files` route). |-| `ERROR_REASON_CHECKSUM_MISMATCH` | 16 | Received content does not match the declared SHA-256. |-| `ERROR_REASON_SESSION_NOT_FOUND` | 17 | Unknown or expired upload, transfer, watcher, media session or forward. |-| `ERROR_REASON_OFFSET_MISMATCH` | 18 | A chunk arrived at the wrong offset. `metadata["expected_offset"]` holds the offset the server expects next. |-| `ERROR_REASON_SEQUENCE_GAP` | 19 | A sequenced input chunk skipped ahead. `metadata["expected_sequence"]` holds the sequence the server expects next. |-| `ERROR_REASON_RATE_LIMITED` | 20 | Too many requests. `metadata["retry_after_ms"]` may hint a delay. |-| `ERROR_REASON_LIMIT_EXCEEDED` | 21 | A request limit was exceeded (chunk size, message size, tree depth). |-| `ERROR_REASON_NOT_INITIALIZED` | 22 | `SystemService.Init` has not configured a required default yet. |-| `ERROR_REASON_INTERNAL` | 23 | An internal server error. Report a bug. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-computer.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-computer.mdxindex c851c7f77a..bf95fd6507 100644--- a/docs/content/docs/cua-sdk/reference/protocol/env-computer.mdx+++ b/docs/content/docs/cua-sdk/reference/protocol/env-computer.mdx@@ -1,6 +1,6 @@----title: "Computer and driver"-description: "cua.env.v1 ComputerService and DriverService: screenshots, pointer, keyboard, clipboard, displays and Cua Driver tools."+title: "Computer, windows and accessibility"+description: "cua.env.v1 ComputerService, DriverService, WindowsService and AccessibilityService: screenshots, input, clipboard, displays, Cua Driver tools, windows and the accessibility tree."---{/*@@ -12,7 +12,7 @@ description: "cua.env.v1 ComputerService and DriverService: screenshots, pointerDesktop control. These services need the desktop provider; input goes through Cua Driver, which `DriverService` also exposes tool by tool.-Source: `libs/cua/proto/cua/env/v1/computer.proto`, `libs/cua/proto/cua/env/v1/driver.proto`.+Source: `libs/cua/proto/cua/env/v1/computer.proto`, `libs/cua/proto/cua/env/v1/driver.proto`, `libs/cua/proto/cua/env/v1/windows.proto`, `libs/cua/proto/cua/env/v1/accessibility.proto`.## ComputerService@@ -110,6 +110,134 @@ Lists the tools the linked cua-driver registry exposes on this platform.Invokes one tool.+## WindowsService++`cua.env.v1.WindowsService`++Window enumeration, window management and app launching.++Windows are addressed with opaque `WindowRef` handles (id + epoch). Native+handles never cross the wire. Nothing here goes through a shell: apps are+launched by identifier with an explicit argument vector.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`ListWindows`](#windowsservicelistwindows) | [`ListWindowsRequest`](#listwindowsrequest) | [`ListWindowsResponse`](#listwindowsresponse) | unary |+| [`WatchWindows`](#windowsservicewatchwindows) | [`WatchWindowsRequest`](#watchwindowsrequest) | [`WatchWindowsResponse`](#watchwindowsresponse) | server stream |+| [`GetWindow`](#windowsservicegetwindow) | [`GetWindowRequest`](#getwindowrequest) | [`GetWindowResponse`](#getwindowresponse) | unary |+| [`ActivateWindow`](#windowsserviceactivatewindow) | [`ActivateWindowRequest`](#activatewindowrequest) | [`ActivateWindowResponse`](#activatewindowresponse) | unary |+| [`SetWindowBounds`](#windowsservicesetwindowbounds) | [`SetWindowBoundsRequest`](#setwindowboundsrequest) | [`SetWindowBoundsResponse`](#setwindowboundsresponse) | unary |+| [`MinimizeWindow`](#windowsserviceminimizewindow) | [`MinimizeWindowRequest`](#minimizewindowrequest) | [`MinimizeWindowResponse`](#minimizewindowresponse) | unary |+| [`MaximizeWindow`](#windowsservicemaximizewindow) | [`MaximizeWindowRequest`](#maximizewindowrequest) | [`MaximizeWindowResponse`](#maximizewindowresponse) | unary |+| [`RestoreWindow`](#windowsservicerestorewindow) | [`RestoreWindowRequest`](#restorewindowrequest) | [`RestoreWindowResponse`](#restorewindowresponse) | unary |+| [`CloseWindow`](#windowsserviceclosewindow) | [`CloseWindowRequest`](#closewindowrequest) | [`CloseWindowResponse`](#closewindowresponse) | unary |+| [`LaunchApp`](#windowsservicelaunchapp) | [`LaunchAppRequest`](#launchapprequest) | [`LaunchAppResponse`](#launchappresponse) | unary |+| [`Open`](#windowsserviceopen) | [`OpenRequest`](#openrequest) | [`OpenResponse`](#openresponse) | unary |++### WindowsService.ListWindows++`/cua.env.v1.WindowsService/ListWindows`, unary: [`ListWindowsRequest`](#listwindowsrequest) to [`ListWindowsResponse`](#listwindowsresponse).++Lists windows matching a filter.++### WindowsService.WatchWindows++`/cua.env.v1.WindowsService/WatchWindows`, server stream: [`WatchWindowsRequest`](#watchwindowsrequest) to [`WatchWindowsResponse`](#watchwindowsresponse).++Streams window lifecycle changes. Starts with a snapshot of all matching+windows so clients never race between a list and a watch.++### WindowsService.GetWindow++`/cua.env.v1.WindowsService/GetWindow`, unary: [`GetWindowRequest`](#getwindowrequest) to [`GetWindowResponse`](#getwindowresponse).++Returns one window.++### WindowsService.ActivateWindow++`/cua.env.v1.WindowsService/ActivateWindow`, unary: [`ActivateWindowRequest`](#activatewindowrequest) to [`ActivateWindowResponse`](#activatewindowresponse).++Brings a window to the front and gives it keyboard focus.++### WindowsService.SetWindowBounds++`/cua.env.v1.WindowsService/SetWindowBounds`, unary: [`SetWindowBoundsRequest`](#setwindowboundsrequest) to [`SetWindowBoundsResponse`](#setwindowboundsresponse).++Moves and/or resizes a window.++### WindowsService.MinimizeWindow++`/cua.env.v1.WindowsService/MinimizeWindow`, unary: [`MinimizeWindowRequest`](#minimizewindowrequest) to [`MinimizeWindowResponse`](#minimizewindowresponse).++Minimizes (iconifies) a window.++### WindowsService.MaximizeWindow++`/cua.env.v1.WindowsService/MaximizeWindow`, unary: [`MaximizeWindowRequest`](#maximizewindowrequest) to [`MaximizeWindowResponse`](#maximizewindowresponse).++Maximizes (zooms) a window.++### WindowsService.RestoreWindow++`/cua.env.v1.WindowsService/RestoreWindow`, unary: [`RestoreWindowRequest`](#restorewindowrequest) to [`RestoreWindowResponse`](#restorewindowresponse).++Restores a minimized or maximized window to its normal state.++### WindowsService.CloseWindow++`/cua.env.v1.WindowsService/CloseWindow`, unary: [`CloseWindowRequest`](#closewindowrequest) to [`CloseWindowResponse`](#closewindowresponse).++Asks a window to close (like clicking its close button), or force-closes+it.++### WindowsService.LaunchApp++`/cua.env.v1.WindowsService/LaunchApp`, unary: [`LaunchAppRequest`](#launchapprequest) to [`LaunchAppResponse`](#launchappresponse).++Launches an application.++### WindowsService.Open++`/cua.env.v1.WindowsService/Open`, unary: [`OpenRequest`](#openrequest) to [`OpenResponse`](#openresponse).++Opens a URL or path with its default (or a given) application.++## AccessibilityService++`cua.env.v1.AccessibilityService`++The guest accessibility tree (macOS AX, Windows UI Automation, Linux+AT-SPI via cua-driver platform-linux).++Every read returns a snapshot id. Element ids are only meaningful together+with the snapshot id they came from; acting on an element from an older+snapshot fails with `ERROR_REASON_STALE_SNAPSHOT` unless the server can+prove the element is unchanged. Requires capability "a11y".++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`GetTree`](#accessibilityservicegettree) | [`GetTreeRequest`](#gettreerequest) | [`GetTreeResponse`](#gettreeresponse) | unary |+| [`Find`](#accessibilityservicefind) | [`FindRequest`](#findrequest) | [`FindResponse`](#findresponse) | unary |+| [`Act`](#accessibilityserviceact) | [`ActRequest`](#actrequest) | [`ActResponse`](#actresponse) | unary |++### AccessibilityService.GetTree++`/cua.env.v1.AccessibilityService/GetTree`, unary: [`GetTreeRequest`](#gettreerequest) to [`GetTreeResponse`](#gettreeresponse).++Returns the accessibility tree of a window (or the focused window).++### AccessibilityService.Find++`/cua.env.v1.AccessibilityService/Find`, unary: [`FindRequest`](#findrequest) to [`FindResponse`](#findresponse).++Finds elements matching a query.++### AccessibilityService.Act++`/cua.env.v1.AccessibilityService/Act`, unary: [`ActRequest`](#actrequest) to [`ActResponse`](#actresponse).++Performs an accessibility action on an element.+## Types in `cua/env/v1/computer.proto`### ScreenshotRequest@@ -119,8 +247,8 @@ Request for `ComputerService.Screenshot`.| Field | # | Type | Description || --- | --- | --- | --- || `display_id` | 1 | `string` (oneof `source`) | A display id, or "primary". |-| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) (oneof `source`) | A single window. Captured without occluding windows where the platform supports it (see capability "window_stream"). |-| `region` | 3 | [`Rect`](/cua-sdk/reference/protocol/env-common#rect) | Sub-region in logical points, relative to the source's top-left corner. Unset captures the whole source. |+| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) (oneof `source`) | A single window. Captured without occluding windows where the platform supports it (see capability "window_stream"). |+| `region` | 3 | [`Rect`](/cua-sdk/reference/protocol/env-system#rect) | Sub-region in logical points, relative to the source's top-left corner. Unset captures the whole source. || `format` | 4 | [`ImageFormat`](#imageformat) | Output format. || `quality` | 5 | `uint32` | Quality 1 to 100 for lossy formats. 0 means 80. || `max_dimension` | 6 | `uint32` | Downscale so the longer edge is at most this many pixels, preserving aspect ratio. 0 means no limit (native resolution). |@@ -134,10 +262,10 @@ Response for `ComputerService.Screenshot`.| --- | --- | --- | --- || `image` | 1 | `bytes` | Encoded image bytes. || `format` | 2 | [`ImageFormat`](#imageformat) | Format of `image`. |-| `image_size` | 3 | [`PixelSize`](/cua-sdk/reference/protocol/env-common#pixelsize) | Pixel size of `image` (after any downscale). |-| `native_size` | 4 | [`PixelSize`](/cua-sdk/reference/protocol/env-common#pixelsize) | Pixel size of the captured area at native (physical) resolution. |+| `image_size` | 3 | [`PixelSize`](/cua-sdk/reference/protocol/env-system#pixelsize) | Pixel size of `image` (after any downscale). |+| `native_size` | 4 | [`PixelSize`](/cua-sdk/reference/protocol/env-system#pixelsize) | Pixel size of the captured area at native (physical) resolution. || `scale` | 5 | `double` | Image pixels per logical point. To convert an image pixel to a screen point: `screen = logical_bounds.origin + pixel / scale`. |-| `logical_bounds` | 6 | [`Rect`](/cua-sdk/reference/protocol/env-common#rect) | The captured area in global logical points (`COORDINATE_SPACE_SCREEN`). |+| `logical_bounds` | 6 | [`Rect`](/cua-sdk/reference/protocol/env-system#rect) | The captured area in global logical points (`COORDINATE_SPACE_SCREEN`). || `screenshot_id` | 7 | `string` | Id to reference this capture's pixel space in later input requests (`COORDINATE_SPACE_SCREENSHOT`). Valid until the geometry of the source changes; the server keeps at least the 16 most recent ids. || `display_id` | 8 | `string` | Display the capture came from (for a window capture, the display containing most of the window). || `captured_at` | 9 | `google.protobuf.Timestamp` | When the frame was captured. |@@ -148,10 +276,10 @@ Where and how an input request is delivered.| Field | # | Type | Description || --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Window to deliver to. Unset delivers to whatever is under the pointer (pointer) or focused (keyboard). Required for `DELIVERY_BACKGROUND` on most platforms and for `COORDINATE_SPACE_WINDOW`. |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Window to deliver to. Unset delivers to whatever is under the pointer (pointer) or focused (keyboard). Required for `DELIVERY_BACKGROUND` on most platforms and for `COORDINATE_SPACE_WINDOW`. || `display_id` | 2 | `string` | Display for `COORDINATE_SPACE_NORMALIZED` without a window. Empty means the primary display. |-| `delivery` | 3 | [`Delivery`](/cua-sdk/reference/protocol/env-common#delivery) | Delivery mode. |-| `space` | 4 | [`CoordinateSpace`](/cua-sdk/reference/protocol/env-common#coordinatespace) | Coordinate space of every point in the request. |+| `delivery` | 3 | [`Delivery`](/cua-sdk/reference/protocol/env-system#delivery) | Delivery mode. |+| `space` | 4 | [`CoordinateSpace`](/cua-sdk/reference/protocol/env-system#coordinatespace) | Coordinate space of every point in the request. || `screenshot_id` | 5 | `string` | Required with `COORDINATE_SPACE_SCREENSHOT`: which screenshot's pixel space the points refer to. |### PointerClick@@ -160,7 +288,7 @@ Click (press and release) one or more times.| Field | # | Type | Description || --- | --- | --- | --- |-| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Where to click. Unset clicks at the current pointer position. |+| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Where to click. Unset clicks at the current pointer position. || `button` | 2 | [`MouseButton`](#mousebutton) | Which button. || `count` | 3 | `uint32` | Number of clicks: 1 single, 2 double, 3 triple. 0 means 1. || `modifiers` | 4 | repeated [`Key`](#key) | Modifier keys held during the click. |@@ -171,7 +299,7 @@ Move the pointer.| Field | # | Type | Description || --- | --- | --- | --- |-| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Destination. |+| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Destination. || `duration` | 2 | `google.protobuf.Duration` | Animate the move over this duration. Unset jumps instantly. |### PointerDown@@ -180,7 +308,7 @@ Press a button without releasing it.| Field | # | Type | Description || --- | --- | --- | --- |-| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Where to press. Unset presses at the current position. |+| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Where to press. Unset presses at the current position. || `button` | 2 | [`MouseButton`](#mousebutton) | Which button. |### PointerUp@@ -189,7 +317,7 @@ Release a pressed button.| Field | # | Type | Description || --- | --- | --- | --- |-| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Where to release. Unset releases at the current position. |+| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Where to release. Unset releases at the current position. || `button` | 2 | [`MouseButton`](#mousebutton) | Which button. |### PointerDrag@@ -198,9 +326,9 @@ Press at `from`, move along `path` to `to`, release.| Field | # | Type | Description || --- | --- | --- | --- |-| `from` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Start point. |-| `to` | 2 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | End point. |-| `path` | 3 | repeated [`Point`](/cua-sdk/reference/protocol/env-common#point) | Optional intermediate points, in order. |+| `from` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Start point. |+| `to` | 2 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | End point. |+| `path` | 3 | repeated [`Point`](/cua-sdk/reference/protocol/env-system#point) | Optional intermediate points, in order. || `button` | 4 | [`MouseButton`](#mousebutton) | Which button. || `duration` | 5 | `google.protobuf.Duration` | Total drag duration. Unset means 300 ms. || `modifiers` | 6 | repeated [`Key`](#key) | Modifier keys held during the drag. |@@ -211,7 +339,7 @@ Scroll by a delta.| Field | # | Type | Description || --- | --- | --- | --- |-| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Where to scroll. Unset scrolls at the current pointer position. The pointer is not moved for background delivery. |+| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Where to scroll. Unset scrolls at the current pointer position. The pointer is not moved for background delivery. || `delta_x` | 2 | `double` | Horizontal delta; positive scrolls content right. || `delta_y` | 3 | `double` | Vertical delta; positive scrolls content down. || `unit` | 4 | [`ScrollUnit`](#scrollunit) | Unit of the deltas. |@@ -236,8 +364,8 @@ Response for `ComputerService.Pointer`.| Field | # | Type | Description || --- | --- | --- | --- |-| `report` | 1 | [`DeliveryReport`](/cua-sdk/reference/protocol/env-common#deliveryreport) | What actually happened. |-| `cursor_position` | 2 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | User-visible pointer position afterwards, in screen points. |+| `report` | 1 | [`DeliveryReport`](/cua-sdk/reference/protocol/env-system#deliveryreport) | What actually happened. |+| `cursor_position` | 2 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | User-visible pointer position afterwards, in screen points. |### KeyInput@@ -312,7 +440,7 @@ Response for `ComputerService.Keyboard`.| Field | # | Type | Description || --- | --- | --- | --- |-| `report` | 1 | [`DeliveryReport`](/cua-sdk/reference/protocol/env-common#deliveryreport) | What actually happened. |+| `report` | 1 | [`DeliveryReport`](/cua-sdk/reference/protocol/env-system#deliveryreport) | What actually happened. |### ClipboardContent@@ -367,7 +495,7 @@ Response for `ComputerService.GetCursorPosition`.| Field | # | Type | Description || --- | --- | --- | --- |-| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Position in global logical points (`COORDINATE_SPACE_SCREEN`). |+| `position` | 1 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Position in global logical points (`COORDINATE_SPACE_SCREEN`). || `display_id` | 2 | `string` | Display containing the pointer. |### ListDisplaysRequest@@ -382,7 +510,7 @@ Response for `ComputerService.ListDisplays`.| Field | # | Type | Description || --- | --- | --- | --- |-| `displays` | 1 | repeated [`Display`](/cua-sdk/reference/protocol/env-common#display) | Attached displays, primary first. |+| `displays` | 1 | repeated [`Display`](/cua-sdk/reference/protocol/env-system#display) | Attached displays, primary first. |### ImageFormat@@ -657,3 +785,417 @@ dispatched (unknown tool, invalid JSON, timeout).| `content` | 1 | repeated [`ToolContent`](#toolcontent) | Result parts in order. || `structured_json` | 2 | `string` | Structured result as JSON text, when the tool declares an output schema. || `is_error` | 3 | `bool` | True if the tool reported a failure. |++## Types in `cua/env/v1/windows.proto`++### AppInfo++Application that owns a window.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Display name, for example "Firefox". |+| `app_id` | 2 | `string` | Platform app identifier: bundle id on macOS, .desktop id on Linux, AppUserModelID or executable name on Windows. Empty when unknown. |+| `pid` | 3 | `uint32` | Guest process id of the owning process. Guest-local; never a host id. |++### WindowInfo++Description of a window.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `ref` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Handle. |+| `title` | 2 | `string` | Title. |+| `app` | 3 | [`AppInfo`](#appinfo) | Owning application. |+| `bounds` | 4 | [`Rect`](/cua-sdk/reference/protocol/env-system#rect) | Frame in global logical points. Advisory: it is a snapshot and may be stale by the time it is used. Media sessions and screenshots report their own authoritative geometry. |+| `display_id` | 5 | `string` | Display containing most of the window. |+| `state` | 6 | [`WindowState`](#windowstate) | State. |+| `kind` | 7 | [`WindowKind`](#windowkind) | Role. |+| `focused` | 8 | `bool` | True if this window has keyboard focus. |+| `on_screen` | 9 | `bool` | True if any part is on screen (not minimized, hidden or off-desktop). |+| `z_order` | 10 | `uint32` | Front-to-back stacking order among listed windows, 0 is frontmost. |++### WindowFilter++Filter for window listing and watching. All set fields must match.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `title_contains` | 1 | `string` | Case-insensitive substring of the title. |+| `app_name_contains` | 2 | `string` | Case-insensitive substring of the app name. |+| `app_id` | 3 | `string` | Exact `AppInfo.app_id`. |+| `pid` | 4 | `uint32` | Owning process id. |+| `display_id` | 5 | `string` | Only windows on this display. |+| `on_screen_only` | 6 | `bool` | Only on-screen windows. |+| `include_system` | 7 | `bool` | Include `WINDOW_KIND_SYSTEM` and `WINDOW_KIND_PHANTOM` windows, which are omitted by default. |++### ListWindowsRequest++Request for `WindowsService.ListWindows`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `filter` | 1 | [`WindowFilter`](#windowfilter) | Filter. |++### ListWindowsResponse++Response for `WindowsService.ListWindows`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `windows` | 1 | repeated [`WindowInfo`](#windowinfo) | Matching windows, front to back. |++### WatchWindowsRequest++Request for `WindowsService.WatchWindows`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `filter` | 1 | [`WindowFilter`](#windowfilter) | Filter applied to every event. |+| `keepalive_interval` | 2 | `google.protobuf.Duration` | Interval between `keepalive` messages. Unset means 30 seconds. |++### WindowSnapshot++Initial state of a window watch.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `windows` | 1 | repeated [`WindowInfo`](#windowinfo) | All matching windows, front to back. |++### WindowClosed++A window was closed or no longer matches the filter.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `ref` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | The window. |++### WatchWindowsResponse++One message of the `WindowsService.WatchWindows` stream.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `snapshot` | 1 | [`WindowSnapshot`](#windowsnapshot) (oneof `event`) | First message: current matching windows. |+| `created` | 2 | [`WindowInfo`](#windowinfo) (oneof `event`) | A new window appeared (or started matching). |+| `updated` | 3 | [`WindowInfo`](#windowinfo) (oneof `event`) | A window changed title, bounds, state, focus or z-order. Carries the full new description. |+| `closed` | 4 | [`WindowClosed`](#windowclosed) (oneof `event`) | A window closed. |+| `keepalive` | 5 | [`KeepAlive`](/cua-sdk/reference/protocol/env-system#keepalive) (oneof `event`) | Idle stream heartbeat. |++### GetWindowRequest++Request for `WindowsService.GetWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |++### GetWindowResponse++Response for `WindowsService.GetWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowInfo`](#windowinfo) | The window. |++### ActivateWindowRequest++Request for `WindowsService.ActivateWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |++### ActivateWindowResponse++Response for `WindowsService.ActivateWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |++### SetWindowBoundsRequest++Request for `WindowsService.SetWindowBounds`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |+| `position` | 2 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | New top-left corner in global logical points. Unset keeps the position. |+| `width` | 3 | optional `double` | New width in logical points. Unset keeps the width. |+| `height` | 4 | optional `double` | New height in logical points. Unset keeps the height. |++### SetWindowBoundsResponse++Response for `WindowsService.SetWindowBounds`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. Its bounds may differ from the request when the window manager or app constrains them. |++### MinimizeWindowRequest++Request for `WindowsService.MinimizeWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |++### MinimizeWindowResponse++Response for `WindowsService.MinimizeWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |++### MaximizeWindowRequest++Request for `WindowsService.MaximizeWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |++### MaximizeWindowResponse++Response for `WindowsService.MaximizeWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |++### RestoreWindowRequest++Request for `WindowsService.RestoreWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |++### RestoreWindowResponse++Response for `WindowsService.RestoreWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |++### CloseWindowRequest++Request for `WindowsService.CloseWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Which window. |+| `force` | 2 | `bool` | Destroy the window without giving the app a chance to object (for example to an unsaved-changes prompt). On most platforms this kills the owning process. |++### CloseWindowResponse++Response for `WindowsService.CloseWindow`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `closed` | 1 | `bool` | True if the window is gone. False when the app kept it open (for example it showed a save prompt). |++### AppSpec++Identifies an application to launch.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `app_id` | 1 | `string` (oneof `app`) | Platform app identifier: macOS bundle id ("org.mozilla.firefox"), Linux .desktop id ("firefox.desktop"), Windows AppUserModelID. |+| `executable` | 2 | `string` (oneof `app`) | Executable name (resolved on PATH) or absolute path. |+| `name` | 3 | `string` (oneof `app`) | Display name, resolved by the platform (for example "Firefox"). The least precise option. |++### LaunchAppRequest++Request for `WindowsService.LaunchApp`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `app` | 1 | [`AppSpec`](#appspec) | What to launch. |+| `args` | 2 | repeated `string` | Arguments passed verbatim, never through a shell. |+| `env` | 3 | map of `string` to `string` | Extra environment variables. |+| `cwd` | 4 | `string` | Working directory. Empty means the user's home. |+| `delivery` | 5 | [`Delivery`](/cua-sdk/reference/protocol/env-system#delivery) | `DELIVERY_BACKGROUND` launches without activating the app or stealing focus (where the platform allows). `DELIVERY_FOREGROUND` activates it. |+| `wait_for_window` | 6 | `google.protobuf.Duration` | Wait up to this long for the app's first window and return it. Unset returns immediately after the process starts. |++### LaunchAppResponse++Response for `WindowsService.LaunchApp`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `pid` | 1 | `uint32` | Guest process id of the launched (or already running, for single- instance apps) process. 0 when the platform does not report it. |+| `windows` | 2 | repeated [`WindowInfo`](#windowinfo) | Windows that appeared within `wait_for_window`. |++### OpenRequest++Request for `WindowsService.Open`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `url` | 1 | `string` (oneof `target`) | A URL, for example "https://example.com" or "mailto:a@b". |+| `path` | 2 | `string` (oneof `target`) | A guest file or directory path. |+| `with_app` | 3 | [`AppSpec`](#appspec) | Open with this app instead of the default handler. |+| `delivery` | 4 | [`Delivery`](/cua-sdk/reference/protocol/env-system#delivery) | Delivery, as for `LaunchAppRequest.delivery`. |++### OpenResponse++Response for `WindowsService.Open`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `pid` | 1 | `uint32` | Guest process id of the handling app, 0 when unknown. |++### WindowState++Window state.++| Value | # | Description |+| --- | --- | --- |+| `WINDOW_STATE_UNSPECIFIED` | 0 | Not reported. |+| `WINDOW_STATE_NORMAL` | 1 | Normal (neither minimized, maximized nor fullscreen). |+| `WINDOW_STATE_MINIMIZED` | 2 | Minimized / iconified. |+| `WINDOW_STATE_MAXIMIZED` | 3 | Maximized / zoomed. |+| `WINDOW_STATE_FULLSCREEN` | 4 | Fullscreen. |+| `WINDOW_STATE_HIDDEN` | 5 | Hidden (app hidden, withdrawn, or on another virtual desktop). |++### WindowKind++Broad window role.++| Value | # | Description |+| --- | --- | --- |+| `WINDOW_KIND_UNSPECIFIED` | 0 | Not reported. |+| `WINDOW_KIND_STANDARD` | 1 | A normal application window. |+| `WINDOW_KIND_DIALOG` | 2 | A dialog or sheet. |+| `WINDOW_KIND_PANEL` | 3 | A floating panel or utility window. |+| `WINDOW_KIND_MENU` | 4 | A menu or popup. |+| `WINDOW_KIND_TOOLTIP` | 5 | A tooltip. |+| `WINDOW_KIND_SYSTEM` | 6 | Desktop chrome: dock, menu bar strip, panel, wallpaper. |+| `WINDOW_KIND_PHANTOM` | 7 | Invisible or indicator surfaces (for example the macOS screen-recording indicator, 1x1 helper windows). Hidden unless `include_system` is set. |++## Types in `cua/env/v1/accessibility.proto`++### AccessibilityNode++One accessibility element. Trees are returned flattened in pre-order+(parents before children) to avoid unbounded message nesting.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `element_id` | 1 | `string` | Element id, unique within its snapshot. |+| `parent_id` | 2 | `string` | Parent element id, empty for the root. |+| `depth` | 3 | `uint32` | Depth below the root (root is 0). |+| `role` | 4 | `string` | Normalized role, for example "button", "text_field", "menu_item", "window". Platform roles are mapped to one vocabulary. |+| `native_role` | 5 | `string` | The platform's native role string (for example "AXButton", "ControlType.Button", "push button"), for debugging. |+| `name` | 6 | `string` | Accessible name / label. |+| `value` | 7 | `string` | Current value (text content, slider value), when it has one. |+| `description` | 8 | `string` | Accessible description / help text. |+| `bounds` | 9 | [`Rect`](/cua-sdk/reference/protocol/env-system#rect) | Frame in global logical points, when known. |+| `states` | 10 | repeated `string` | Normalized states, for example "focused", "enabled", "selected", "checked", "expanded", "editable", "offscreen". |+| `actions` | 11 | repeated [`AccessibilityAction`](#accessibilityaction) | Actions the element supports (see `AccessibilityAction`). |+| `attributes` | 12 | map of `string` to `string` | Other attributes the platform exposes, stringified. |++### GetTreeRequest++Request for `AccessibilityService.GetTree`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Window whose tree to read. Unset means the focused window. |+| `max_depth` | 2 | `uint32` | Maximum depth below the root. 0 means unlimited (subject to the server's node limit). |+| `include_hidden` | 3 | `bool` | Include elements that are offscreen or not visible. |+| `max_nodes` | 4 | `uint32` | Stop after this many nodes. 0 means the server limit (normally 5000). |++### GetTreeResponse++Response for `AccessibilityService.GetTree`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `snapshot_id` | 1 | `string` | Snapshot id for later `Act` calls. |+| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | The window the tree belongs to. |+| `nodes` | 3 | repeated [`AccessibilityNode`](#accessibilitynode) | Nodes in pre-order. |+| `truncated` | 4 | `bool` | True if `max_depth` or `max_nodes` cut the tree short. |++### AccessibilityQuery++Query for `AccessibilityService.Find`. All set fields must match.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `role` | 1 | `string` | Normalized role. |+| `name` | 2 | `string` | Exact accessible name. |+| `name_contains` | 3 | `string` | Case-insensitive substring of the accessible name. |+| `value_contains` | 4 | `string` | Case-insensitive substring of the value. |+| `states` | 5 | repeated `string` | Required states. |++### FindRequest++Request for `AccessibilityService.Find`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Window to search. Unset means the focused window. |+| `query` | 2 | [`AccessibilityQuery`](#accessibilityquery) | What to look for. |+| `max_results` | 3 | `uint32` | Maximum matches. 0 means 50. |++### FindResponse++Response for `AccessibilityService.Find`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `snapshot_id` | 1 | `string` | Snapshot id for later `Act` calls. |+| `nodes` | 2 | repeated [`AccessibilityNode`](#accessibilitynode) | Matching elements (their `parent_id` refers to elements not necessarily included). |++### ElementRef++Reference to an element within a snapshot.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `snapshot_id` | 1 | `string` | Snapshot the element id came from. |+| `element_id` | 2 | `string` | Element id. |++### ActRequest++Request for `AccessibilityService.Act`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `element` | 1 | [`ElementRef`](#elementref) | Which element. |+| `action` | 2 | [`AccessibilityAction`](#accessibilityaction) | Which action. |+| `value` | 3 | `string` | New value for `ACCESSIBILITY_ACTION_SET_VALUE`. |+| `custom_action` | 4 | `string` | Native action name for `ACCESSIBILITY_ACTION_CUSTOM`. |+| `delivery` | 5 | [`Delivery`](/cua-sdk/reference/protocol/env-system#delivery) | Delivery mode. Accessibility actions are background-safe on most platforms; `DELIVERY_FOREGROUND` activates the window first. |++### ActResponse++Response for `AccessibilityService.Act`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `report` | 1 | [`DeliveryReport`](/cua-sdk/reference/protocol/env-system#deliveryreport) | What actually happened. |++### AccessibilityAction++Accessibility action.++| Value | # | Description |+| --- | --- | --- |+| `ACCESSIBILITY_ACTION_UNSPECIFIED` | 0 | Not set. Rejected. |+| `ACCESSIBILITY_ACTION_PRESS` | 1 | Press / invoke / click. |+| `ACCESSIBILITY_ACTION_FOCUS` | 2 | Move keyboard focus to the element. |+| `ACCESSIBILITY_ACTION_SET_VALUE` | 3 | Replace the element's value with `ActRequest.value`. |+| `ACCESSIBILITY_ACTION_INCREMENT` | 4 | Increment (sliders, steppers). |+| `ACCESSIBILITY_ACTION_DECREMENT` | 5 | Decrement. |+| `ACCESSIBILITY_ACTION_SHOW_MENU` | 6 | Open the element's context menu. |+| `ACCESSIBILITY_ACTION_EXPAND` | 7 | Expand (tree items, disclosure triangles, combo boxes). |+| `ACCESSIBILITY_ACTION_COLLAPSE` | 8 | Collapse. |+| `ACCESSIBILITY_ACTION_SELECT` | 9 | Select (list items, tabs). |+| `ACCESSIBILITY_ACTION_SCROLL_INTO_VIEW` | 10 | Scroll the element into view. |+| `ACCESSIBILITY_ACTION_CUSTOM` | 11 | A platform-specific action named by `ActRequest.custom_action`. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-diagnose.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-diagnose.mdxdeleted file mode 100644index db5cf975d9..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/env-diagnose.mdx+++ /dev/null@@ -1,230 +0,0 @@-----title: "Diagnose"-description: "cua.env.v1 Diagnose: the image self-test report `SystemService.Diagnose` streams."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--The report of the image self-test (`SystemService.Diagnose` / `DiagnoseOnce`): checks, their evidence and the summary.--Source: `libs/cua/proto/cua/env/v1/diagnose.proto`.--## Types in `cua/env/v1/diagnose.proto`--### DiagnoseOptions--Options shared by `Diagnose` and `DiagnoseOnce`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `strict` | 1 | `bool` | Treat warnings (and skips not allowed by the manifest) as failures. |-| `only` | 2 | repeated `string` | Run only checks whose id equals, or starts with `<entry>.`, one of these (for example "stream" or "auth.token_file"). Empty runs all. |-| `skip` | 3 | repeated `string` | Skip checks matched the same way as `only`. |-| `effects` | 4 | [`DiagnoseEffects`](#diagnoseeffects) | Which checks may change guest state. Unspecified means `NONE`. |-| `expect_manifest` | 5 | `bytes` | A manifest (JSON, same schema as `/etc/cua-image/manifest.json`) to check against instead of the one baked into the image. Empty uses the image's own. |-| `timeout` | 6 | `google.protobuf.Duration` | Overall budget. Unset means 120 seconds. Checks still running when it expires fail with a timeout. |-| `host_time` | 7 | `google.protobuf.Timestamp` | The caller's wall clock, for the clock-skew check. Unset skips the comparison. |--### DiagnoseRequest--Request for `SystemService.Diagnose`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `options` | 1 | [`DiagnoseOptions`](#diagnoseoptions) | What to run. |--### DiagnoseResponse--One event of `SystemService.Diagnose`: `started`, then `check`, for each-check, and a final `report`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `started` | 1 | [`DiagnoseCheckStarted`](#diagnosecheckstarted) (oneof `event`) | A check began. |-| `check` | 2 | [`DiagnoseCheck`](#diagnosecheck) (oneof `event`) | A check finished. |-| `report` | 3 | [`DiagnoseReport`](#diagnosereport) (oneof `event`) | The run finished. Always the last message. |--### DiagnoseCheckStarted--A check began.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Check id, for example "stream.encode.openh264". |-| `group` | 2 | `string` | Check group, the id's first segment. |--### DiagnoseOnceRequest--Request for `SystemService.DiagnoseOnce`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `options` | 1 | [`DiagnoseOptions`](#diagnoseoptions) | What to run. |--### DiagnoseOnceResponse--Response for `SystemService.DiagnoseOnce`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `report` | 1 | [`DiagnoseReport`](#diagnosereport) | The final report. |--### DiagnoseCheck--The result of one check.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `id` | 1 | `string` | Stable id, `<group>.<name>[.<detail>]`. |-| `group` | 2 | `string` | Group, the id's first segment (for example "auth"). |-| `status` | 3 | [`CheckStatus`](#checkstatus) | Outcome after severity is applied. |-| `severity` | 4 | [`CheckSeverity`](#checkseverity) | Severity from the manifest. |-| `claimed_by` | 5 | repeated `string` | Manifest claims that make this check matter, for example "feature:desktop_stream" or "auth_mode:local". |-| `message` | 6 | `string` | What happened, in one line. |-| `remediation` | 7 | `string` | What to do about a warning or failure. Empty on pass. |-| `duration_ms` | 8 | `uint32` | Wall time of the check in milliseconds. |-| `facts` | 9 | map of `string` to `string` | Measured values (for example {"backend": "openh264", "psnr_db": "41.2"}). |-| `artifacts` | 10 | repeated [`DiagnoseArtifact`](#diagnoseartifact) | Evidence files. |--### DiagnoseArtifact--Evidence produced by a check.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | File name, unique within the report (for example "screenshot.display0.png"). |-| `media_type` | 2 | `string` | Media type, for example "image/png". |-| `data` | 3 | `bytes` | Contents, when small enough to inline (at most 1 MiB). Empty otherwise. |-| `path` | 4 | `string` | Where the full file was written in the guest. Empty when not written. |--### DiagnoseReport--The whole report.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `schema_version` | 1 | `uint32` | Report schema version. Always 1 for this message. |-| `spacesd` | 2 | [`DiagnoseSpacesd`](#diagnosespacesd) | The daemon that ran the checks. Unset when a shim produced the report for an image without cua-spacesd. |-| `image` | 3 | [`DiagnoseImage`](#diagnoseimage) | The image under test. |-| `environment` | 4 | [`DiagnoseEnvironment`](#diagnoseenvironment) | Where the guest runs. |-| `summary` | 5 | [`DiagnoseSummary`](#diagnosesummary) | Totals. |-| `checks` | 6 | repeated [`DiagnoseCheck`](#diagnosecheck) | Every check, in run order. |-| `fidelity` | 7 | [`DiagnoseFidelity`](#diagnosefidelity) | Facts that make a task behave differently between variants of one image. Compared key by key by the eval-parity lane. |-| `producer` | 8 | `string` | What produced the report: "cua-spacesd", or "cua-doctor-shim/<target>". |-| `started_at` | 9 | `google.protobuf.Timestamp` | When the run started. |--### DiagnoseSpacesd--The daemon that ran the checks.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `version` | 1 | `string` | cua-spacesd version. |-| `protocol_revision` | 2 | `uint32` | `cua.env.v1` protocol revision it serves. |-| `git_sha` | 3 | `string` | Source revision of the build, when known. |-| `cua_driver_version` | 4 | `string` | Version of the linked cua-driver core. |--### DiagnoseImage--The image under test.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Image name from the manifest, for example "linux". |-| `ref` | 2 | `string` | Reference the image was built as, when the manifest records it. |-| `variant` | 3 | `string` | "rootfs" (container) or "containerdisk" (VM). |-| `os` | 4 | `string` | "linux", "windows" or "macos". |-| `manifest_sha256` | 5 | `string` | SHA-256 of the manifest the checks ran against. Empty without one. |-| `manifest_source` | 6 | `string` | Where the manifest came from: a guest path, "request", or empty when there is none. |--### DiagnoseEnvironment--Where the guest runs.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `runtime` | 1 | `string` | Runtime: "container", "gvisor", "qemu", "kubevirt", "lume", "hyperv", "bare" or "unknown". |-| `runtime_detail` | 2 | `string` | Free-form runtime detail, for example "runsc". |-| `arch` | 3 | `string` | "x86_64" or "arm64". |-| `init` | 4 | `string` | Init system: "systemd", "supervisord", "launchd", "scm" or "unknown". |-| `display_server` | 5 | `string` | "x11", "wayland", "quartz", "win32" or "none". |-| `os` | 6 | `string` | OS name and version, for example "Ubuntu 24.04". |--### DiagnoseSummary--Totals of a report.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `status` | 1 | [`CheckStatus`](#checkstatus) | Worst outcome: fail if any check failed, warn if any warned (fail under `strict`), else pass. |-| `pass` | 2 | `uint32` | Passed checks. |-| `warn` | 3 | `uint32` | Warnings. |-| `fail` | 4 | `uint32` | Failures. |-| `skip` | 5 | `uint32` | Skipped checks. |-| `duration_ms` | 6 | `uint32` | Wall time of the whole run in milliseconds. |-| `strict` | 7 | `bool` | True when the run used `strict`. |--### DiagnoseFidelity--Facts that change how a task behaves. Every key is always present; an-unknown value is the empty string.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `display` | 1 | `string` | Primary display, "<width>x<height>@<scale>". |-| `fonts_sha256` | 2 | `string` | SHA-256 over the sorted list of installed font files. |-| `tz` | 3 | `string` | Time zone name. |-| `locale` | 4 | `string` | Locale, for example "C.UTF-8". |-| `clock_skew_ms` | 5 | `int64` | Guest clock minus the caller's clock, in milliseconds. 0 when the caller sent no `host_time`. |-| `encoder` | 6 | `string` | Video encoder the stream would use, for example "openh264". |-| `a11y_backend` | 7 | `string` | Accessibility backend, for example "atspi". |-| `audio_backend` | 8 | `string` | Audio backend, for example "pipewire". |-| `cpu_model` | 9 | `string` | CPU model string. |-| `cpu_count` | 10 | `uint32` | Logical CPUs. |-| `memory_mib` | 11 | `uint64` | Total memory in MiB. |-| `gpu` | 12 | `string` | GPU description, or "none". |-| `kernel` | 13 | `string` | Kernel release. |-| `runtime` | 14 | `string` | Runtime, as in `DiagnoseEnvironment.runtime`. |-| `init` | 15 | `string` | Init system, as in `DiagnoseEnvironment.init`. |-| `packages_sha256` | 16 | `string` | SHA-256 over the installed package list (name and version). |-| `app_versions` | 17 | map of `string` to `string` | Versions of the apps the manifest lists (for example {"firefox": "130.0"}). |-| `tool_versions` | 18 | map of `string` to `string` | Versions of the tools the manifest lists (dev tiers, for example {"node": "v22.20.0"}). |-| `simulator_runtimes` | 19 | repeated `string` | Available simulator runtimes, sorted (for example "iOS 26.0"). Empty unless the manifest claims some. |--### DiagnoseEffects--Which checks may act on the guest.--| Value | # | Description |-| --- | --- | --- |-| `DIAGNOSE_EFFECTS_UNSPECIFIED` | 0 | Not set. Same as `DIAGNOSE_EFFECTS_NONE`. |-| `DIAGNOSE_EFFECTS_NONE` | 1 | Read-only checks. Input, window and fixture checks are skipped. |-| `DIAGNOSE_EFFECTS_VIRTUAL_ONLY` | 2 | Effectful checks run, but only against fixture windows the doctor itself launched on the guest's virtual display. Refused on bare hosts. |--### CheckStatus--Outcome of one check.--| Value | # | Description |-| --- | --- | --- |-| `CHECK_STATUS_UNSPECIFIED` | 0 | Not reported. |-| `CHECK_STATUS_PASS` | 1 | Works as claimed. |-| `CHECK_STATUS_WARN` | 2 | Works with a caveat, or something unclaimed is off. |-| `CHECK_STATUS_FAIL` | 3 | Broken. |-| `CHECK_STATUS_SKIP` | 4 | Not run; `message` says why. |--### CheckSeverity--How much a check matters for this image, derived from the manifest.--| Value | # | Description |-| --- | --- | --- |-| `CHECK_SEVERITY_UNSPECIFIED` | 0 | Not reported. |-| `CHECK_SEVERITY_REQUIRED` | 1 | The image claims it: a failure fails the report. |-| `CHECK_SEVERITY_RECOMMENDED` | 2 | Optional in the manifest: a failure is reported as a warning. |-| `CHECK_SEVERITY_INFO` | 3 | Not claimed: a failure is reported as a warning. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-filesystem.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-filesystem.mdxdeleted file mode 100644index 25d0b2f0f2..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/env-filesystem.mdx+++ /dev/null@@ -1,578 +0,0 @@-----title: "Filesystem"-description: "cua.env.v1 FilesystemService: stat, list, watch, read, chunked upload and signed URLs."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';--File and directory operations, watchers, chunked transfers and signed HTTP URLs.--Source: `libs/cua/proto/cua/env/v1/filesystem.proto`.--## FilesystemService--`cua.env.v1.FilesystemService`--Guest filesystem access.--Paths are absolute, or relative to the default working directory set by-`SystemService.Init`. A leading "~" expands to the acting user's home.-Operations run as the `Init` default user.--Large payloads: there is no total size cap. Reads stream in chunks-(`ReadFile`). Writes use either the native-gRPC client stream-(`WriteFile`) or the gRPC-Web-safe, resumable unary chunk protocol-(`BeginUpload` / `UploadChunk` / `CommitUpload`). Browsers and `<img>` tags-can use signed URLs on the plain-HTTP `/files` route instead-(`CreateSignedUrl`).--Writes are atomic: data goes to a temporary file in the destination-directory and is renamed into place on success.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`Stat`](#filesystemservicestat) | [`StatRequest`](#statrequest) | [`StatResponse`](#statresponse) | unary |-| [`ListDir`](#filesystemservicelistdir) | [`ListDirRequest`](#listdirrequest) | [`ListDirResponse`](#listdirresponse) | unary |-| [`MakeDir`](#filesystemservicemakedir) | [`MakeDirRequest`](#makedirrequest) | [`MakeDirResponse`](#makedirresponse) | unary |-| [`Move`](#filesystemservicemove) | [`MoveRequest`](#moverequest) | [`MoveResponse`](#moveresponse) | unary |-| [`Remove`](#filesystemserviceremove) | [`RemoveRequest`](#removerequest) | [`RemoveResponse`](#removeresponse) | unary |-| [`WatchDir`](#filesystemservicewatchdir) | [`WatchDirRequest`](#watchdirrequest) | [`WatchDirResponse`](#watchdirresponse) | server stream |-| [`CreateWatcher`](#filesystemservicecreatewatcher) | [`CreateWatcherRequest`](#createwatcherrequest) | [`CreateWatcherResponse`](#createwatcherresponse) | unary |-| [`GetWatcherEvents`](#filesystemservicegetwatcherevents) | [`GetWatcherEventsRequest`](#getwatchereventsrequest) | [`GetWatcherEventsResponse`](#getwatchereventsresponse) | unary |-| [`RemoveWatcher`](#filesystemserviceremovewatcher) | [`RemoveWatcherRequest`](#removewatcherrequest) | [`RemoveWatcherResponse`](#removewatcherresponse) | unary |-| [`ReadFile`](#filesystemservicereadfile) | [`ReadFileRequest`](#readfilerequest) | [`ReadFileResponse`](#readfileresponse) | server stream |-| [`WriteFile`](#filesystemservicewritefile) | [`WriteFileRequest`](#writefilerequest) | [`WriteFileResponse`](#writefileresponse) | client stream |-| [`BeginUpload`](#filesystemservicebeginupload) | [`BeginUploadRequest`](#beginuploadrequest) | [`BeginUploadResponse`](#beginuploadresponse) | unary |-| [`UploadChunk`](#filesystemserviceuploadchunk) | [`UploadChunkRequest`](#uploadchunkrequest) | [`UploadChunkResponse`](#uploadchunkresponse) | unary |-| [`CommitUpload`](#filesystemservicecommitupload) | [`CommitUploadRequest`](#commituploadrequest) | [`CommitUploadResponse`](#commituploadresponse) | unary |-| [`AbortUpload`](#filesystemserviceabortupload) | [`AbortUploadRequest`](#abortuploadrequest) | [`AbortUploadResponse`](#abortuploadresponse) | unary |-| [`CreateSignedUrl`](#filesystemservicecreatesignedurl) | [`CreateSignedUrlRequest`](#createsignedurlrequest) | [`CreateSignedUrlResponse`](#createsignedurlresponse) | unary |--### FilesystemService.Stat--`/cua.env.v1.FilesystemService/Stat`, unary: [`StatRequest`](#statrequest) to [`StatResponse`](#statresponse).--Returns metadata for one path.--### FilesystemService.ListDir--`/cua.env.v1.FilesystemService/ListDir`, unary: [`ListDirRequest`](#listdirrequest) to [`ListDirResponse`](#listdirresponse).--Lists a directory, optionally recursively.--### FilesystemService.MakeDir--`/cua.env.v1.FilesystemService/MakeDir`, unary: [`MakeDirRequest`](#makedirrequest) to [`MakeDirResponse`](#makedirresponse).--Creates a directory.--### FilesystemService.Move--`/cua.env.v1.FilesystemService/Move`, unary: [`MoveRequest`](#moverequest) to [`MoveResponse`](#moveresponse).--Moves or renames a file or directory.--### FilesystemService.Remove--`/cua.env.v1.FilesystemService/Remove`, unary: [`RemoveRequest`](#removerequest) to [`RemoveResponse`](#removeresponse).--Removes a file or directory.--### FilesystemService.WatchDir--`/cua.env.v1.FilesystemService/WatchDir`, server stream: [`WatchDirRequest`](#watchdirrequest) to [`WatchDirResponse`](#watchdirresponse).--Streams change events under a directory. The first message is-`WatchStarted`, sent once the watch is armed, so changes made after it-arrives are guaranteed to be observed.--### FilesystemService.CreateWatcher--`/cua.env.v1.FilesystemService/CreateWatcher`, unary: [`CreateWatcherRequest`](#createwatcherrequest) to [`CreateWatcherResponse`](#createwatcherresponse).--Polling alternative to `WatchDir` for clients that cannot hold a stream:-creates a server-side watcher that buffers events.--### FilesystemService.GetWatcherEvents--`/cua.env.v1.FilesystemService/GetWatcherEvents`, unary: [`GetWatcherEventsRequest`](#getwatchereventsrequest) to [`GetWatcherEventsResponse`](#getwatchereventsresponse).--Drains buffered events from a watcher.--### FilesystemService.RemoveWatcher--`/cua.env.v1.FilesystemService/RemoveWatcher`, unary: [`RemoveWatcherRequest`](#removewatcherrequest) to [`RemoveWatcherResponse`](#removewatcherresponse).--Deletes a watcher. Watchers not polled for 5 minutes are deleted-automatically.--### FilesystemService.ReadFile--`/cua.env.v1.FilesystemService/ReadFile`, server stream: [`ReadFileRequest`](#readfilerequest) to [`ReadFileResponse`](#readfileresponse).--Streams a file (or a byte range of it) in chunks.--### FilesystemService.WriteFile--`/cua.env.v1.FilesystemService/WriteFile`, client stream: [`WriteFileRequest`](#writefilerequest) to [`WriteFileResponse`](#writefileresponse).--Writes a file from a client stream. Native gRPC only; gRPC-Web clients-use `BeginUpload` / `UploadChunk` / `CommitUpload`. The first message-must be a `WriteFileHeader`.--<Callout type="info">gRPC-Web cannot carry client streams. Over gRPC-Web, call the unary [`UploadChunk`](#filesystemserviceuploadchunk) instead (`/cua.env.v1.FilesystemService/UploadChunk`).</Callout>--### FilesystemService.BeginUpload--`/cua.env.v1.FilesystemService/BeginUpload`, unary: [`BeginUploadRequest`](#beginuploadrequest) to [`BeginUploadResponse`](#beginuploadresponse).--Starts, or resumes, a resumable chunked upload.--### FilesystemService.UploadChunk--`/cua.env.v1.FilesystemService/UploadChunk`, unary: [`UploadChunkRequest`](#uploadchunkrequest) to [`UploadChunkResponse`](#uploadchunkresponse).--Appends one chunk to an upload.--### FilesystemService.CommitUpload--`/cua.env.v1.FilesystemService/CommitUpload`, unary: [`CommitUploadRequest`](#commituploadrequest) to [`CommitUploadResponse`](#commituploadresponse).--Verifies and atomically publishes an upload at its destination path.--### FilesystemService.AbortUpload--`/cua.env.v1.FilesystemService/AbortUpload`, unary: [`AbortUploadRequest`](#abortuploadrequest) to [`AbortUploadResponse`](#abortuploadresponse).--Discards an upload and its partial data.--### FilesystemService.CreateSignedUrl--`/cua.env.v1.FilesystemService/CreateSignedUrl`, unary: [`CreateSignedUrlRequest`](#createsignedurlrequest) to [`CreateSignedUrlResponse`](#createsignedurlresponse).--Mints a time-limited URL on the plain-HTTP `/files` route for GET-(download) or PUT (upload) of one path.--## Types in `cua/env/v1/filesystem.proto`--### EntryInfo--Metadata for one filesystem entry.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Final path component. |-| `path` | 2 | `string` | Absolute, normalized path. |-| `type` | 3 | [`FileType`](#filetype) | Entry type. |-| `size` | 4 | `uint64` | Size in bytes (0 for directories). |-| `mode` | 5 | `uint32` | Unix permission bits (for example 0o644). Synthesized on Windows. |-| `owner` | 6 | `string` | Owning user name. |-| `group` | 7 | `string` | Owning group name (empty on Windows). |-| `modified_at` | 8 | `google.protobuf.Timestamp` | Last modification time. |-| `symlink_target` | 9 | `string` | Target of a symbolic link, when `type` is `FILE_TYPE_SYMLINK`. |--### StatRequest--Request for `FilesystemService.Stat`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Path to inspect. |-| `no_follow_symlinks` | 2 | `bool` | Report the link itself rather than its target. |--### StatResponse--Response for `FilesystemService.Stat`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entry` | 1 | [`EntryInfo`](#entryinfo) | The entry. |--### ListDirRequest--Request for `FilesystemService.ListDir`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Directory to list. |-| `depth` | 2 | `uint32` | Recursion depth. 0 and 1 both list direct children only; 2 includes grandchildren, and so on. Symbolic links are never followed during recursion. |-| `include_hidden` | 3 | `bool` | Include entries whose name starts with "." (and hidden entries on Windows). |-| `page_size` | 4 | `uint32` | Maximum entries per page. 0 means 1000. At most 10000. |-| `page_token` | 5 | `string` | Continuation token from a previous `ListDirResponse`. |--### ListDirResponse--Response for `FilesystemService.ListDir`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entries` | 1 | repeated [`EntryInfo`](#entryinfo) | Entries in depth-first order, directories before their contents. |-| `next_page_token` | 2 | `string` | Token for the next page, empty on the last page. |--### MakeDirRequest--Request for `FilesystemService.MakeDir`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Directory to create. |-| `parents` | 2 | `bool` | Create missing parents too. |-| `mode` | 3 | `uint32` | Permission bits. 0 means 0o755. |--### MakeDirResponse--Response for `FilesystemService.MakeDir`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entry` | 1 | [`EntryInfo`](#entryinfo) | The directory. |-| `created` | 2 | `bool` | False if it already existed (not an error). |--### MoveRequest--Request for `FilesystemService.Move`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `source` | 1 | `string` | Existing path. |-| `destination` | 2 | `string` | New path. |-| `overwrite` | 3 | `bool` | Replace an existing destination. Without it an existing destination fails with ALREADY_EXISTS / `ERROR_REASON_PATH_EXISTS`. |-| `create_parents` | 4 | `bool` | Create missing parents of `destination`. |--### MoveResponse--Response for `FilesystemService.Move`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entry` | 1 | [`EntryInfo`](#entryinfo) | The entry at its new path. |--### RemoveRequest--Request for `FilesystemService.Remove`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Path to remove. |-| `recursive` | 2 | `bool` | Remove a non-empty directory and its contents. |-| `missing_ok` | 3 | `bool` | Succeed when the path does not exist. |--### RemoveResponse--Response for `FilesystemService.Remove`.--No fields.--### FsEvent--One filesystem change.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Absolute path of the affected entry. |-| `type` | 2 | [`FsEventType`](#fseventtype) | What happened. |-| `old_path` | 3 | `string` | Previous path for renames, when the platform reports it. |-| `observed_at` | 4 | `google.protobuf.Timestamp` | When the server observed the change. |--### WatchDirRequest--Request for `FilesystemService.WatchDir`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Directory to watch. |-| `recursive` | 2 | `bool` | Watch the whole subtree. |-| `keepalive_interval` | 3 | `google.protobuf.Duration` | Interval between `keepalive` messages. Unset means 30 seconds. |--### WatchStarted--Sent once when a watch is armed.--No fields.--### WatchOverflow--Sent when the kernel event queue overflowed and events were lost. Clients-should rescan.--No fields.--### WatchDirResponse--One message of the `FilesystemService.WatchDir` stream.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `started` | 1 | [`WatchStarted`](#watchstarted) (oneof `message`) | First message: the watch is armed. |-| `event` | 2 | [`FsEvent`](#fsevent) (oneof `message`) | A change. |-| `overflow` | 3 | [`WatchOverflow`](#watchoverflow) (oneof `message`) | Events were dropped. |-| `keepalive` | 4 | [`KeepAlive`](/cua-sdk/reference/protocol/env-common#keepalive) (oneof `message`) | Idle stream heartbeat. |--### CreateWatcherRequest--Request for `FilesystemService.CreateWatcher`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Directory to watch. |-| `recursive` | 2 | `bool` | Watch the whole subtree. |--### CreateWatcherResponse--Response for `FilesystemService.CreateWatcher`. The watcher is armed when-this returns.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `watcher_id` | 1 | `string` | Watcher id for `GetWatcherEvents` and `RemoveWatcher`. |--### GetWatcherEventsRequest--Request for `FilesystemService.GetWatcherEvents`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `watcher_id` | 1 | `string` | Which watcher. |-| `max_events` | 2 | `uint32` | Maximum events to return. 0 means all buffered. |--### GetWatcherEventsResponse--Response for `FilesystemService.GetWatcherEvents`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `events` | 1 | repeated [`FsEvent`](#fsevent) | Buffered events, oldest first. Returned events are removed from the buffer. |-| `overflowed` | 2 | `bool` | True if the watcher's buffer (10000 events) overflowed since the last poll and events were dropped. Clients should rescan. |--### RemoveWatcherRequest--Request for `FilesystemService.RemoveWatcher`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `watcher_id` | 1 | `string` | Which watcher. |--### RemoveWatcherResponse--Response for `FilesystemService.RemoveWatcher`.--No fields.--### ReadFileRequest--Request for `FilesystemService.ReadFile`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | File to read. |-| `offset` | 2 | `uint64` | First byte to read. |-| `length` | 3 | `uint64` | Maximum bytes to read. 0 means to end of file. |-| `chunk_size` | 4 | `uint32` | Preferred chunk size. 0 means `Limits.preferred_chunk_bytes` (1 MiB). Clamped to `Limits.max_chunk_bytes`. |-| `compute_sha256` | 5 | `bool` | Compute the SHA-256 of the bytes sent and report it in `ReadFileEnd`. |--### ReadFileResponse--One message of the `FilesystemService.ReadFile` stream: `entry` first,-then zero or more `chunk`s in order, then `end`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entry` | 1 | [`EntryInfo`](#entryinfo) (oneof `message`) | File metadata, sent first. |-| `chunk` | 2 | [`FileChunk`](#filechunk) (oneof `message`) | File content. |-| `end` | 3 | [`ReadFileEnd`](#readfileend) (oneof `message`) | Sent last. |--### FileChunk--A slice of file content.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `offset` | 1 | `uint64` | Absolute file offset of `data[0]`. |-| `data` | 2 | `bytes` | The bytes. |--### ReadFileEnd--Final message of a `ReadFile` stream.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `bytes_read` | 1 | `uint64` | Bytes sent in chunks. |-| `sha256` | 2 | `string` | Lowercase hex SHA-256 of the bytes sent, when requested. |--### WriteFileHeader--Destination and options for a write.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Destination path. |-| `mode` | 2 | [`WriteMode`](#writemode) | How to treat an existing file. |-| `permissions` | 3 | `uint32` | Permission bits for a new file. 0 means 0o644. |-| `create_parents` | 4 | `bool` | Create missing parent directories. |-| `expected_size` | 5 | `uint64` | Expected total size in bytes, 0 if unknown. Checked on completion when non-zero. |-| `expected_sha256` | 6 | `string` | Expected lowercase hex SHA-256 of the full content. Checked on completion when set; a mismatch discards the data and fails with `ERROR_REASON_CHECKSUM_MISMATCH`. |--### WriteFileRequest--One message of the `FilesystemService.WriteFile` client stream.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `header` | 1 | [`WriteFileHeader`](#writefileheader) (oneof `message`) | First message only. |-| `data` | 2 | `bytes` (oneof `message`) | File content, strictly sequential. Each chunk is at most `Limits.max_chunk_bytes`. |--### WriteFileResponse--Response for `FilesystemService.WriteFile`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entry` | 1 | [`EntryInfo`](#entryinfo) | The written file. |-| `sha256` | 2 | `string` | Lowercase hex SHA-256 of the bytes received. |--### BeginUploadRequest--Request for `FilesystemService.BeginUpload`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `header` | 1 | [`WriteFileHeader`](#writefileheader) | Destination and options. `expected_sha256` is strongly recommended. |-| `upload_id` | 2 | `string` | Client-chosen id that makes this call idempotent and resumable. If an unexpired upload with this id exists for the same path, the call returns its current `received_bytes` instead of starting over. Empty lets the server generate an id (not resumable after the response is lost). |-| `ttl` | 3 | `google.protobuf.Duration` | How long partial data is kept without progress. Unset means 1 hour. At most 24 hours. |--### BeginUploadResponse--Response for `FilesystemService.BeginUpload`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `upload_id` | 1 | `string` | Upload id for later calls. |-| `received_bytes` | 2 | `uint64` | Bytes already received. 0 for a new upload; the resume point otherwise. |-| `max_chunk_bytes` | 3 | `uint32` | Largest chunk the server accepts. |-| `expires_at` | 4 | `google.protobuf.Timestamp` | When the partial upload expires if no further chunks arrive. |--### UploadChunkRequest--Request for `FilesystemService.UploadChunk`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `upload_id` | 1 | `string` | Which upload. |-| `offset` | 2 | `uint64` | Offset of `data[0]`. Must equal the server's `received_bytes`; a chunk wholly below it is acknowledged as a duplicate, anything else fails with `ERROR_REASON_OFFSET_MISMATCH` and `metadata["expected_offset"]`. |-| `data` | 3 | `bytes` | The bytes. At most `max_chunk_bytes`. |--### UploadChunkResponse--Response for `FilesystemService.UploadChunk`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `received_bytes` | 1 | `uint64` | Total bytes received so far. |-| `duplicate` | 2 | `bool` | True if the chunk was a retry and was not written again. |-| `expires_at` | 3 | `google.protobuf.Timestamp` | New expiry of the partial upload. |--### CommitUploadRequest--Request for `FilesystemService.CommitUpload`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `upload_id` | 1 | `string` | Which upload. |-| `sha256` | 2 | `string` | Expected lowercase hex SHA-256, overriding the header's. Optional. |--### CommitUploadResponse--Response for `FilesystemService.CommitUpload`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `entry` | 1 | [`EntryInfo`](#entryinfo) | The published file. |-| `sha256` | 2 | `string` | Lowercase hex SHA-256 of the committed content. |--### AbortUploadRequest--Request for `FilesystemService.AbortUpload`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `upload_id` | 1 | `string` | Which upload. |--### AbortUploadResponse--Response for `FilesystemService.AbortUpload`.--No fields.--### CreateSignedUrlRequest--Request for `FilesystemService.CreateSignedUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Path the URL grants access to. Exactly this path; no traversal. |-| `method` | 2 | [`SignedUrlMethod`](#signedurlmethod) | Allowed method. |-| `ttl` | 3 | `google.protobuf.Duration` | Validity. Required; at most 24 hours. |-| `content_type` | 4 | `string` | For GET: `Content-Type` to serve. Empty means guessed from the name. |-| `download_name` | 5 | `string` | For GET: serve with `Content-Disposition: attachment` using this file name. Empty means inline. |--### CreateSignedUrlResponse--Response for `FilesystemService.CreateSignedUrl`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `url_path` | 1 | `string` | Path and query to append to the spacesd's base URL, for example "/files?path=%2Fhome%2Fu%2Fa.png&method=GET&exp=1767225600&sig=…". The server does not know how it is addressed (direct, Fleet gateway, relay), so it never returns an absolute URL. The signature is HMAC-SHA256 over method, path and expiry with a key derived from the access token; rotating the token revokes every outstanding URL. |-| `expires_at` | 2 | `google.protobuf.Timestamp` | When the URL stops working. |--### FileType--Type of a filesystem entry.--| Value | # | Description |-| --- | --- | --- |-| `FILE_TYPE_UNSPECIFIED` | 0 | Not reported. |-| `FILE_TYPE_FILE` | 1 | Regular file. |-| `FILE_TYPE_DIRECTORY` | 2 | Directory. |-| `FILE_TYPE_SYMLINK` | 3 | Symbolic link (only when not following links). |-| `FILE_TYPE_OTHER` | 4 | Anything else (socket, FIFO, device). |--### FsEventType--Kind of filesystem change.--| Value | # | Description |-| --- | --- | --- |-| `FS_EVENT_TYPE_UNSPECIFIED` | 0 | Not reported. |-| `FS_EVENT_TYPE_CREATE` | 1 | Entry created. |-| `FS_EVENT_TYPE_WRITE` | 2 | File content written. |-| `FS_EVENT_TYPE_REMOVE` | 3 | Entry removed. |-| `FS_EVENT_TYPE_RENAME` | 4 | Entry renamed or moved. `path` is the new path when known. |-| `FS_EVENT_TYPE_CHMOD` | 5 | Permissions or ownership changed. |--### WriteMode--How `WriteFile` and uploads treat an existing destination.--| Value | # | Description |-| --- | --- | --- |-| `WRITE_MODE_UNSPECIFIED` | 0 | Not set. Treated as `WRITE_MODE_OVERWRITE`. |-| `WRITE_MODE_OVERWRITE` | 1 | Replace any existing file atomically. |-| `WRITE_MODE_CREATE_NEW` | 2 | Fail with `ERROR_REASON_PATH_EXISTS` if the destination exists. |-| `WRITE_MODE_APPEND` | 3 | Append to the existing file (created if missing). Not atomic. |--### SignedUrlMethod--HTTP method a signed URL is valid for.--| Value | # | Description |-| --- | --- | --- |-| `SIGNED_URL_METHOD_UNSPECIFIED` | 0 | Not set. Rejected. |-| `SIGNED_URL_METHOD_GET` | 1 | Download with `GET` (supports `Range`). |-| `SIGNED_URL_METHOD_PUT` | 2 | Upload with `PUT` (the body replaces the file atomically). |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-host-spaces.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-host-spaces.mdxdeleted file mode 100644index a0803fa2db..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/env-host-spaces.mdx+++ /dev/null@@ -1,288 +0,0 @@-----title: "Host Spaces"-description: "cua.env.v1 HostSpacesService: Spaces a host creates for its owner's devices through the relay."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--Spaces a machine set up with `cua host setup --provide-spaces` creates for its owner's enrolled devices: settings, capacity, create and delete. The host's cua-spacesd forwards each call to its cua daemon.--Source: `libs/cua/proto/cua/env/v1/host.proto`.--## HostSpacesService--`cua.env.v1.HostSpacesService`--Spaces a host provides: a machine set up with `cua host setup---provide-spaces` creates Spaces (macOS VMs with Lume on a Mac, Linux-containers with Docker, whatever else runs locally) for the owner's-enrolled devices and the accounts it is shared with, through the relay.--The host's cua-spacesd serves this service only in `join` mode with a host-policy, and only to relay-asserted editors (the owner, or an account on-the machine's allowlist) and the local token holder: a view-only share is-refused. It forwards each call to the host's cua daemon, which creates and-deletes the Spaces with its own runtimes, attaches each new Space to the-relay as its own machine, and records every create and delete in the-host's hash-chained audit log (`~/.cua/host/spaces-audit.jsonl`).--Providing Spaces never exposes the host's own desktop or files: with the-host setting `share_desktop` off, a relayed caller reaches only this-service and `SystemService` `GetCapabilities` / `Health`.--A host set up with `cua host setup --direct <ip:port> --provide-spaces`-serves this service on its direct listener too, without the relay: the-caller is the holder of the host's env token (the owner), and by default-only loopback, Tailscale (100.64.0.0/10, fd7a:115c:a1e0::/48) and private-LAN addresses may call it. A Space created with `direct` set is not-attached to the relay: the host forwards a TCP port on its own address-(`HostSpace.direct_port`) to the Space's cua-spacesd.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`GetHostSpaces`](#hostspacesservicegethostspaces) | [`GetHostSpacesRequest`](#gethostspacesrequest) | [`GetHostSpacesResponse`](#gethostspacesresponse) | unary |-| [`CreateHostSpace`](#hostspacesservicecreatehostspace) | [`CreateHostSpaceRequest`](#createhostspacerequest) | [`CreateHostSpaceResponse`](#createhostspaceresponse) | unary |-| [`DeleteHostSpace`](#hostspacesservicedeletehostspace) | [`DeleteHostSpaceRequest`](#deletehostspacerequest) | [`DeleteHostSpaceResponse`](#deletehostspaceresponse) | unary |-| [`CancelHostSpace`](#hostspacesservicecancelhostspace) | [`CancelHostSpaceRequest`](#cancelhostspacerequest) | [`CancelHostSpaceResponse`](#cancelhostspaceresponse) | unary |-| [`SetHostSpacePower`](#hostspacesservicesethostspacepower) | [`SetHostSpacePowerRequest`](#sethostspacepowerrequest) | [`SetHostSpacePowerResponse`](#sethostspacepowerresponse) | unary |-| [`DeleteCloudSpace`](#hostspacesservicedeletecloudspace) | [`DeleteCloudSpaceRequest`](#deletecloudspacerequest) | [`DeleteCloudSpaceResponse`](#deletecloudspaceresponse) | unary |--### HostSpacesService.GetHostSpaces--`/cua.env.v1.HostSpacesService/GetHostSpaces`, unary: [`GetHostSpacesRequest`](#gethostspacesrequest) to [`GetHostSpacesResponse`](#gethostspacesresponse).--This host's settings, capacity, the Spaces it provides to the caller-(every one for the owner) and, for the owner, its recent audit.--### HostSpacesService.CreateHostSpace--`/cua.env.v1.HostSpacesService/CreateHostSpace`, unary: [`CreateHostSpaceRequest`](#createhostspacerequest) to [`CreateHostSpaceResponse`](#createhostspaceresponse).--Creates one Space on this host and attaches it to the relay as the-machine the caller registered for it (`attach`). Fails with-`RESOURCE_EXHAUSTED` when the host is at capacity (two macOS VMs per-Mac, by Apple's license, or the host's `max_spaces`).--### HostSpacesService.DeleteHostSpace--`/cua.env.v1.HostSpacesService/DeleteHostSpace`, unary: [`DeleteHostSpaceRequest`](#deletehostspacerequest) to [`DeleteHostSpaceResponse`](#deletehostspaceresponse).--Deletes a Space this host provides (its sandbox and its relay machine).-The owner deletes any; another account only the ones it created.--### HostSpacesService.CancelHostSpace--`/cua.env.v1.HostSpacesService/CancelHostSpace`, unary: [`CancelHostSpaceRequest`](#cancelhostspacerequest) to [`CancelHostSpaceResponse`](#cancelhostspaceresponse).--Cancels a `CreateHostSpace` the caller started, by the relay machine-it registered for it (`attach.machine_id`): the create stops (an image-download, a boot) and what it made is removed; one that already-finished is deleted, since the caller gave up on it. Idempotent.--### HostSpacesService.SetHostSpacePower--`/cua.env.v1.HostSpacesService/SetHostSpacePower`, unary: [`SetHostSpacePowerRequest`](#sethostspacepowerrequest) to [`SetHostSpacePowerResponse`](#sethostspacepowerresponse).--Turns a Space this host provides off or on. Off stops it with its disk-kept, freeing the host's memory (a runtime that cannot start it again,-QEMU, suspends it instead); on boots it again and re-attaches it to its-relay machine. The owner powers any; another account only the ones it-created.--### HostSpacesService.DeleteCloudSpace--`/cua.env.v1.HostSpacesService/DeleteCloudSpace`, unary: [`DeleteCloudSpaceRequest`](#deletecloudspacerequest) to [`DeleteCloudSpaceResponse`](#deletecloudspaceresponse).--Deletes a Space in the owner's own cloud that this machine created (an-AWS, Google Cloud or Modal sandbox, by the relay machine it joined as):-its cloud resources, through this machine's ownership records, and its-relay machine. Only the owner. Lets another of the owner's devices-delete it permanently without the cloud's credentials. Works whether or-not this machine provides Spaces.--## Types in `cua/env/v1/host.proto`--### HostSpacesSettings--The host's two independent settings and its limits.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `share_desktop` | 1 | `bool` | The host's own desktop is a Space too (screen, input, shell, files). |-| `provide_spaces` | 2 | `bool` | The host accepts Space create, list and delete requests. |-| `max_spaces` | 3 | `uint32` | At most this many provided Spaces at once (0: no limit besides the runtimes' own). |-| `max_macos_vms` | 4 | `uint32` | At most this many macOS VMs at once on this Mac (Apple's license allows two; 0 on a host that cannot run macOS VMs). |--### HostSpacesCapacity--How much of one limit is in use.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `resource` | 1 | `string` | `spaces` (every provided Space) or `macos_vms` (macOS VMs on this Mac, provided or not). |-| `used` | 2 | `uint32` | In use now. |-| `limit` | 3 | `uint32` | The limit (0: none). |-| `reason` | 4 | `string` | Why the limit exists, for people ("Apple's macOS license allows two macOS VMs per Mac"). |--### HostSpace--A Space this host provides.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `relay_machine` | 1 | `string` | The relay machine the Space is reached as (`relay:<machine>`). |-| `local_space` | 2 | `string` | The Space on the host (`local:<name>`). |-| `name` | 3 | `string` | Display name. |-| `image` | 4 | `string` | The image it runs, as requested. |-| `os` | 5 | `string` | Guest OS family: `linux`, `macos` or `windows` (empty when unknown). |-| `kind` | 6 | `string` | `container` or `vm` (empty when unknown). |-| `runtime` | 7 | `string` | Engine: `lume`, `runc`, `gvisor`, `qemu` (empty when unknown). |-| `created_by` | 8 | `string` | The account that created it (id, or email when the relay shares it). |-| `created_at_ms` | 9 | `int64` | When it was created (Unix milliseconds). |-| `direct_port` | 10 | `uint32` | A Space created with `CreateHostSpaceRequest.direct`: the TCP port on the host's own address that the host forwards to the Space's cua-spacesd (`direct:<host address>:<direct_port>`). 0 for a Space reached through the relay. |-| `direct_token` | 11 | `string` | The Space's cua-spacesd token, set only in the `CreateHostSpace` response of a direct Space (the caller stores it like any direct Space's token). Empty otherwise. |--### HostSpacesAuditEvent--One line of the host's Spaces audit log.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `ts_ms` | 1 | `int64` | Unix milliseconds. |-| `action` | 2 | `string` | `create`, `delete`, `refused`, or `config`. |-| `who` | 3 | `string` | Who: an account (`name <email> (id)`), or `local` for this machine. |-| `space` | 4 | `string` | The relay machine or Space the event is about. |-| `detail` | 5 | `string` | Detail for people. |--### GetHostSpacesRequest--Request for `HostSpacesService.GetHostSpaces`.--No fields.--### GetHostSpacesResponse--Response for `HostSpacesService.GetHostSpaces`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | This host's display name. |-| `os` | 2 | `string` | The host's operating system (`macos`, `linux`, `windows`). |-| `settings` | 3 | [`HostSpacesSettings`](#hostspacessettings) | Settings and limits. |-| `capacity` | 4 | repeated [`HostSpacesCapacity`](#hostspacescapacity) | Current use of each limit. |-| `spaces` | 5 | repeated [`HostSpace`](#hostspace) | Spaces this host provides: every one for the owner, the caller's own otherwise. |-| `audit` | 6 | repeated [`HostSpacesAuditEvent`](#hostspacesauditevent) | The most recent audit events, newest first (the owner only). |-| `images` | 7 | repeated `string` | Image aliases this host resolves (`macos`, `linux`, ...), for clients to offer. |-| `creating` | 8 | repeated [`HostSpaceCreating`](#hostspacecreating) | The creates this host is running now (`CreateHostSpace` calls that have not returned), each with what it is doing: every one for the owner, the caller's own otherwise. A client polls this while its create runs, to show the download and the boot. Empty from a host that predates it. |--### HostSpaceCreating--A create a host is running, and what it is doing now. The progress-fields are those of `cua.daemon.v1.CreateSpaceProgress`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `key` | 1 | `string` | The create's key: `CreateHostSpaceRequest.create_key`, else the relay machine it attaches to (`attach.machine_id`). |-| `phase` | 2 | `string` | "preparing", "pulling", "creating", "booting", "waiting_for_services", "connecting" or "ready", in that order. |-| `fraction` | 3 | optional `double` | How far through the phase, 0.0 to 1.0, when its size is known (an image pull). |-| `detail` | 4 | `string` | One short line, for example the image being pulled. |-| `bytes_done` | 5 | optional `uint64` | Bytes downloaded so far, when the step counts them (an image pull). |-| `bytes_total` | 6 | optional `uint64` | Bytes the download has in all. |-| `bytes_per_second` | 7 | optional `double` | Smoothed download rate, bytes per second. |--### CreateHostSpaceRequest--Request for `HostSpacesService.CreateHostSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `image` | 1 | `string` | Image: a registry reference or an alias (`macos`, `macos:26`, `linux`). Empty uses the canonical Linux image. |-| `kind` | 2 | `string` | "auto" (empty), "container" or "vm". |-| `runtime` | 3 | `string` | "auto" (empty) or a runtime this host offers ("lume", "runc", ...). |-| `name` | 4 | `string` | Name on the host. Empty generates `space-<hex>`. |-| `cpus` | 5 | `uint32` | vCPUs (0: the default). |-| `memory_mb` | 6 | `uint64` | Memory in MiB (0: the default). |-| `disk_gb` | 7 | `uint32` | Disk in GiB for a VM (0: the image's). |-| `attach` | 8 | [`AttachRelayRequest`](/cua-sdk/reference/protocol/env-system#attachrelayrequest) | The relay machine the caller registered for this Space: the host attaches the new Space's driver to it (`SystemService.AttachRelay`), so the Space is reached as `relay:<machine_id>` and the host never holds an account credential. Empty when `direct` is set. |-| `direct` | 9 | `bool` | Create the Space without the relay (a host set up with `--direct`): it is reached at the host's address on `HostSpace.direct_port`, with `HostSpace.direct_token`. `attach` must be empty. |-| `create_key` | 10 | `string` | A key of the caller's for this create, under which `GetHostSpacesResponse.creating` lists its progress (a direct create has no relay machine to name it). Empty: `attach.machine_id`. |--### CreateHostSpaceResponse--Response for `HostSpacesService.CreateHostSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | [`HostSpace`](#hostspace) | The new Space. |--### DeleteHostSpaceRequest--Request for `HostSpacesService.DeleteHostSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | The relay machine of the Space (or its `local:<name>` on the host). |--### DeleteHostSpaceResponse--Response for `HostSpacesService.DeleteHostSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `message` | 1 | `string` | What happened, for people. |--### DeleteCloudSpaceRequest--Request for `HostSpacesService.DeleteCloudSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | The relay machine the cloud Space joined as. |--### DeleteCloudSpaceResponse--Response for `HostSpacesService.DeleteCloudSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `message` | 1 | `string` | What was deleted, for people. |--### CancelHostSpaceRequest--Request for `HostSpacesService.CancelHostSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | The relay machine the caller registered for the Space. |--### CancelHostSpaceResponse--Response for `HostSpacesService.CancelHostSpace`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `message` | 1 | `string` | What happened, for people: what was removed and what stays. |--### SetHostSpacePowerRequest--Request for `HostSpacesService.SetHostSpacePower`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `space` | 1 | `string` | The relay machine of the Space (or its `local:<name>` on the host). |-| `on` | 2 | `bool` | True turns it on, false off. |--### SetHostSpacePowerResponse--Response for `HostSpacesService.SetHostSpacePower`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `state` | 1 | `string` | "running", "suspended" or "stopped": the state it is in now. |-| `power` | 2 | `string` | How it turns off: "stop" or "suspend". |-| `message` | 3 | `string` | What happened, for people. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-process.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-process.mdxindex ee6e54c145..251254b1b2 100644--- a/docs/content/docs/cua-sdk/reference/protocol/env-process.mdx+++ b/docs/content/docs/cua-sdk/reference/protocol/env-process.mdx@@ -1,6 +1,6 @@----title: "Processes"-description: "cua.env.v1 ProcessService: start, attach to, feed and signal guest processes."+title: "Processes and files"+description: "cua.env.v1 ProcessService and FilesystemService: guest processes, and stat, list, watch, read, chunked upload and signed URLs."---{/*@@ -12,9 +12,9 @@ description: "cua.env.v1 ProcessService: start, attach to, feed and signal guestimport { Callout } from 'fumadocs-ui/components/callout';-Detached, reattachable guest processes with PTY support and bounded scrollback.+Detached, reattachable guest processes with PTY support and bounded scrollback; file and directory operations, watchers, chunked transfers and signed HTTP URLs.-Source: `libs/cua/proto/cua/env/v1/process.proto`.+Source: `libs/cua/proto/cua/env/v1/process.proto`, `libs/cua/proto/cua/env/v1/filesystem.proto`.## ProcessService@@ -105,6 +105,150 @@ EOF character instead.Resizes a PTY process's terminal (delivers SIGWINCH on Unix).+## FilesystemService++`cua.env.v1.FilesystemService`++Guest filesystem access.++Paths are absolute, or relative to the default working directory set by+`SystemService.Init`. A leading "~" expands to the acting user's home.+Operations run as the `Init` default user.++Large payloads: there is no total size cap. Reads stream in chunks+(`ReadFile`). Writes use either the native-gRPC client stream+(`WriteFile`) or the gRPC-Web-safe, resumable unary chunk protocol+(`BeginUpload` / `UploadChunk` / `CommitUpload`). Browsers and `<img>` tags+can use signed URLs on the plain-HTTP `/files` route instead+(`CreateSignedUrl`).++Writes are atomic: data goes to a temporary file in the destination+directory and is renamed into place on success.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`Stat`](#filesystemservicestat) | [`StatRequest`](#statrequest) | [`StatResponse`](#statresponse) | unary |+| [`ListDir`](#filesystemservicelistdir) | [`ListDirRequest`](#listdirrequest) | [`ListDirResponse`](#listdirresponse) | unary |+| [`MakeDir`](#filesystemservicemakedir) | [`MakeDirRequest`](#makedirrequest) | [`MakeDirResponse`](#makedirresponse) | unary |+| [`Move`](#filesystemservicemove) | [`MoveRequest`](#moverequest) | [`MoveResponse`](#moveresponse) | unary |+| [`Remove`](#filesystemserviceremove) | [`RemoveRequest`](#removerequest) | [`RemoveResponse`](#removeresponse) | unary |+| [`WatchDir`](#filesystemservicewatchdir) | [`WatchDirRequest`](#watchdirrequest) | [`WatchDirResponse`](#watchdirresponse) | server stream |+| [`CreateWatcher`](#filesystemservicecreatewatcher) | [`CreateWatcherRequest`](#createwatcherrequest) | [`CreateWatcherResponse`](#createwatcherresponse) | unary |+| [`GetWatcherEvents`](#filesystemservicegetwatcherevents) | [`GetWatcherEventsRequest`](#getwatchereventsrequest) | [`GetWatcherEventsResponse`](#getwatchereventsresponse) | unary |+| [`RemoveWatcher`](#filesystemserviceremovewatcher) | [`RemoveWatcherRequest`](#removewatcherrequest) | [`RemoveWatcherResponse`](#removewatcherresponse) | unary |+| [`ReadFile`](#filesystemservicereadfile) | [`ReadFileRequest`](#readfilerequest) | [`ReadFileResponse`](#readfileresponse) | server stream |+| [`WriteFile`](#filesystemservicewritefile) | [`WriteFileRequest`](#writefilerequest) | [`WriteFileResponse`](#writefileresponse) | client stream |+| [`BeginUpload`](#filesystemservicebeginupload) | [`BeginUploadRequest`](#beginuploadrequest) | [`BeginUploadResponse`](#beginuploadresponse) | unary |+| [`UploadChunk`](#filesystemserviceuploadchunk) | [`UploadChunkRequest`](#uploadchunkrequest) | [`UploadChunkResponse`](#uploadchunkresponse) | unary |+| [`CommitUpload`](#filesystemservicecommitupload) | [`CommitUploadRequest`](#commituploadrequest) | [`CommitUploadResponse`](#commituploadresponse) | unary |+| [`AbortUpload`](#filesystemserviceabortupload) | [`AbortUploadRequest`](#abortuploadrequest) | [`AbortUploadResponse`](#abortuploadresponse) | unary |+| [`CreateSignedUrl`](#filesystemservicecreatesignedurl) | [`CreateSignedUrlRequest`](#createsignedurlrequest) | [`CreateSignedUrlResponse`](#createsignedurlresponse) | unary |++### FilesystemService.Stat++`/cua.env.v1.FilesystemService/Stat`, unary: [`StatRequest`](#statrequest) to [`StatResponse`](#statresponse).++Returns metadata for one path.++### FilesystemService.ListDir++`/cua.env.v1.FilesystemService/ListDir`, unary: [`ListDirRequest`](#listdirrequest) to [`ListDirResponse`](#listdirresponse).++Lists a directory, optionally recursively.++### FilesystemService.MakeDir++`/cua.env.v1.FilesystemService/MakeDir`, unary: [`MakeDirRequest`](#makedirrequest) to [`MakeDirResponse`](#makedirresponse).++Creates a directory.++### FilesystemService.Move++`/cua.env.v1.FilesystemService/Move`, unary: [`MoveRequest`](#moverequest) to [`MoveResponse`](#moveresponse).++Moves or renames a file or directory.++### FilesystemService.Remove++`/cua.env.v1.FilesystemService/Remove`, unary: [`RemoveRequest`](#removerequest) to [`RemoveResponse`](#removeresponse).++Removes a file or directory.++### FilesystemService.WatchDir++`/cua.env.v1.FilesystemService/WatchDir`, server stream: [`WatchDirRequest`](#watchdirrequest) to [`WatchDirResponse`](#watchdirresponse).++Streams change events under a directory. The first message is+`WatchStarted`, sent once the watch is armed, so changes made after it+arrives are guaranteed to be observed.++### FilesystemService.CreateWatcher++`/cua.env.v1.FilesystemService/CreateWatcher`, unary: [`CreateWatcherRequest`](#createwatcherrequest) to [`CreateWatcherResponse`](#createwatcherresponse).++Polling alternative to `WatchDir` for clients that cannot hold a stream:+creates a server-side watcher that buffers events.++### FilesystemService.GetWatcherEvents++`/cua.env.v1.FilesystemService/GetWatcherEvents`, unary: [`GetWatcherEventsRequest`](#getwatchereventsrequest) to [`GetWatcherEventsResponse`](#getwatchereventsresponse).++Drains buffered events from a watcher.++### FilesystemService.RemoveWatcher++`/cua.env.v1.FilesystemService/RemoveWatcher`, unary: [`RemoveWatcherRequest`](#removewatcherrequest) to [`RemoveWatcherResponse`](#removewatcherresponse).++Deletes a watcher. Watchers not polled for 5 minutes are deleted+automatically.++### FilesystemService.ReadFile++`/cua.env.v1.FilesystemService/ReadFile`, server stream: [`ReadFileRequest`](#readfilerequest) to [`ReadFileResponse`](#readfileresponse).++Streams a file (or a byte range of it) in chunks.++### FilesystemService.WriteFile++`/cua.env.v1.FilesystemService/WriteFile`, client stream: [`WriteFileRequest`](#writefilerequest) to [`WriteFileResponse`](#writefileresponse).++Writes a file from a client stream. Native gRPC only; gRPC-Web clients+use `BeginUpload` / `UploadChunk` / `CommitUpload`. The first message+must be a `WriteFileHeader`.++<Callout type="info">gRPC-Web cannot carry client streams. Over gRPC-Web, call the unary [`UploadChunk`](#filesystemserviceuploadchunk) instead (`/cua.env.v1.FilesystemService/UploadChunk`).</Callout>++### FilesystemService.BeginUpload++`/cua.env.v1.FilesystemService/BeginUpload`, unary: [`BeginUploadRequest`](#beginuploadrequest) to [`BeginUploadResponse`](#beginuploadresponse).++Starts, or resumes, a resumable chunked upload.++### FilesystemService.UploadChunk++`/cua.env.v1.FilesystemService/UploadChunk`, unary: [`UploadChunkRequest`](#uploadchunkrequest) to [`UploadChunkResponse`](#uploadchunkresponse).++Appends one chunk to an upload.++### FilesystemService.CommitUpload++`/cua.env.v1.FilesystemService/CommitUpload`, unary: [`CommitUploadRequest`](#commituploadrequest) to [`CommitUploadResponse`](#commituploadresponse).++Verifies and atomically publishes an upload at its destination path.++### FilesystemService.AbortUpload++`/cua.env.v1.FilesystemService/AbortUpload`, unary: [`AbortUploadRequest`](#abortuploadrequest) to [`AbortUploadResponse`](#abortuploadresponse).++Discards an upload and its partial data.++### FilesystemService.CreateSignedUrl++`/cua.env.v1.FilesystemService/CreateSignedUrl`, unary: [`CreateSignedUrlRequest`](#createsignedurlrequest) to [`CreateSignedUrlResponse`](#createsignedurlresponse).++Mints a time-limited URL on the plain-HTTP `/files` route for GET+(download) or PUT (upload) of one path.+## Types in `cua/env/v1/process.proto`### ProcessConfig@@ -199,7 +343,7 @@ A process lifecycle or output event.| `start` | 1 | [`ProcessStart`](#processstart) (oneof `event`) | The process started (or, on `ConnectProcess`, is known). || `data` | 2 | [`ProcessData`](#processdata) (oneof `event`) | Output bytes. || `end` | 3 | [`ProcessEnd`](#processend) (oneof `event`) | The process ended. |-| `keepalive` | 4 | [`KeepAlive`](/cua-sdk/reference/protocol/env-common#keepalive) (oneof `event`) | Idle stream heartbeat. |+| `keepalive` | 4 | [`KeepAlive`](/cua-sdk/reference/protocol/env-system#keepalive) (oneof `event`) | Idle stream heartbeat. |### ProcessStart@@ -307,7 +451,7 @@ One message of the `ProcessService.StreamInput` client stream.| --- | --- | --- | --- || `process` | 1 | [`ProcessSelector`](#processselector) (oneof `message`) | First message only: which process to write to. || `input` | 2 | [`ProcessInput`](#processinput) (oneof `message`) | Subsequent messages: bytes to write, in order. |-| `keepalive` | 3 | [`KeepAlive`](/cua-sdk/reference/protocol/env-common#keepalive) (oneof `message`) | Heartbeat from the client for long idle input streams. |+| `keepalive` | 3 | [`KeepAlive`](/cua-sdk/reference/protocol/env-system#keepalive) (oneof `message`) | Heartbeat from the client for long idle input streams. |### StreamInputResponse@@ -394,3 +538,420 @@ the guest's native signal number.| `SIGNAL_STOP` | 19 | SIGSTOP. || `SIGNAL_TSTP` | 20 | SIGTSTP. || `SIGNAL_WINCH` | 28 | SIGWINCH. |++## Types in `cua/env/v1/filesystem.proto`++### EntryInfo++Metadata for one filesystem entry.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Final path component. |+| `path` | 2 | `string` | Absolute, normalized path. |+| `type` | 3 | [`FileType`](#filetype) | Entry type. |+| `size` | 4 | `uint64` | Size in bytes (0 for directories). |+| `mode` | 5 | `uint32` | Unix permission bits (for example 0o644). Synthesized on Windows. |+| `owner` | 6 | `string` | Owning user name. |+| `group` | 7 | `string` | Owning group name (empty on Windows). |+| `modified_at` | 8 | `google.protobuf.Timestamp` | Last modification time. |+| `symlink_target` | 9 | `string` | Target of a symbolic link, when `type` is `FILE_TYPE_SYMLINK`. |++### StatRequest++Request for `FilesystemService.Stat`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Path to inspect. |+| `no_follow_symlinks` | 2 | `bool` | Report the link itself rather than its target. |++### StatResponse++Response for `FilesystemService.Stat`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entry` | 1 | [`EntryInfo`](#entryinfo) | The entry. |++### ListDirRequest++Request for `FilesystemService.ListDir`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Directory to list. |+| `depth` | 2 | `uint32` | Recursion depth. 0 and 1 both list direct children only; 2 includes grandchildren, and so on. Symbolic links are never followed during recursion. |+| `include_hidden` | 3 | `bool` | Include entries whose name starts with "." (and hidden entries on Windows). |+| `page_size` | 4 | `uint32` | Maximum entries per page. 0 means 1000. At most 10000. |+| `page_token` | 5 | `string` | Continuation token from a previous `ListDirResponse`. |++### ListDirResponse++Response for `FilesystemService.ListDir`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entries` | 1 | repeated [`EntryInfo`](#entryinfo) | Entries in depth-first order, directories before their contents. |+| `next_page_token` | 2 | `string` | Token for the next page, empty on the last page. |++### MakeDirRequest++Request for `FilesystemService.MakeDir`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Directory to create. |+| `parents` | 2 | `bool` | Create missing parents too. |+| `mode` | 3 | `uint32` | Permission bits. 0 means 0o755. |++### MakeDirResponse++Response for `FilesystemService.MakeDir`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entry` | 1 | [`EntryInfo`](#entryinfo) | The directory. |+| `created` | 2 | `bool` | False if it already existed (not an error). |++### MoveRequest++Request for `FilesystemService.Move`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `source` | 1 | `string` | Existing path. |+| `destination` | 2 | `string` | New path. |+| `overwrite` | 3 | `bool` | Replace an existing destination. Without it an existing destination fails with ALREADY_EXISTS / `ERROR_REASON_PATH_EXISTS`. |+| `create_parents` | 4 | `bool` | Create missing parents of `destination`. |++### MoveResponse++Response for `FilesystemService.Move`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entry` | 1 | [`EntryInfo`](#entryinfo) | The entry at its new path. |++### RemoveRequest++Request for `FilesystemService.Remove`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Path to remove. |+| `recursive` | 2 | `bool` | Remove a non-empty directory and its contents. |+| `missing_ok` | 3 | `bool` | Succeed when the path does not exist. |++### RemoveResponse++Response for `FilesystemService.Remove`.++No fields.++### FsEvent++One filesystem change.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Absolute path of the affected entry. |+| `type` | 2 | [`FsEventType`](#fseventtype) | What happened. |+| `old_path` | 3 | `string` | Previous path for renames, when the platform reports it. |+| `observed_at` | 4 | `google.protobuf.Timestamp` | When the server observed the change. |++### WatchDirRequest++Request for `FilesystemService.WatchDir`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Directory to watch. |+| `recursive` | 2 | `bool` | Watch the whole subtree. |+| `keepalive_interval` | 3 | `google.protobuf.Duration` | Interval between `keepalive` messages. Unset means 30 seconds. |++### WatchStarted++Sent once when a watch is armed.++No fields.++### WatchOverflow++Sent when the kernel event queue overflowed and events were lost. Clients+should rescan.++No fields.++### WatchDirResponse++One message of the `FilesystemService.WatchDir` stream.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `started` | 1 | [`WatchStarted`](#watchstarted) (oneof `message`) | First message: the watch is armed. |+| `event` | 2 | [`FsEvent`](#fsevent) (oneof `message`) | A change. |+| `overflow` | 3 | [`WatchOverflow`](#watchoverflow) (oneof `message`) | Events were dropped. |+| `keepalive` | 4 | [`KeepAlive`](/cua-sdk/reference/protocol/env-system#keepalive) (oneof `message`) | Idle stream heartbeat. |++### CreateWatcherRequest++Request for `FilesystemService.CreateWatcher`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Directory to watch. |+| `recursive` | 2 | `bool` | Watch the whole subtree. |++### CreateWatcherResponse++Response for `FilesystemService.CreateWatcher`. The watcher is armed when+this returns.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `watcher_id` | 1 | `string` | Watcher id for `GetWatcherEvents` and `RemoveWatcher`. |++### GetWatcherEventsRequest++Request for `FilesystemService.GetWatcherEvents`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `watcher_id` | 1 | `string` | Which watcher. |+| `max_events` | 2 | `uint32` | Maximum events to return. 0 means all buffered. |++### GetWatcherEventsResponse++Response for `FilesystemService.GetWatcherEvents`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `events` | 1 | repeated [`FsEvent`](#fsevent) | Buffered events, oldest first. Returned events are removed from the buffer. |+| `overflowed` | 2 | `bool` | True if the watcher's buffer (10000 events) overflowed since the last poll and events were dropped. Clients should rescan. |++### RemoveWatcherRequest++Request for `FilesystemService.RemoveWatcher`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `watcher_id` | 1 | `string` | Which watcher. |++### RemoveWatcherResponse++Response for `FilesystemService.RemoveWatcher`.++No fields.++### ReadFileRequest++Request for `FilesystemService.ReadFile`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | File to read. |+| `offset` | 2 | `uint64` | First byte to read. |+| `length` | 3 | `uint64` | Maximum bytes to read. 0 means to end of file. |+| `chunk_size` | 4 | `uint32` | Preferred chunk size. 0 means `Limits.preferred_chunk_bytes` (1 MiB). Clamped to `Limits.max_chunk_bytes`. |+| `compute_sha256` | 5 | `bool` | Compute the SHA-256 of the bytes sent and report it in `ReadFileEnd`. |++### ReadFileResponse++One message of the `FilesystemService.ReadFile` stream: `entry` first,+then zero or more `chunk`s in order, then `end`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entry` | 1 | [`EntryInfo`](#entryinfo) (oneof `message`) | File metadata, sent first. |+| `chunk` | 2 | [`FileChunk`](#filechunk) (oneof `message`) | File content. |+| `end` | 3 | [`ReadFileEnd`](#readfileend) (oneof `message`) | Sent last. |++### FileChunk++A slice of file content.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `offset` | 1 | `uint64` | Absolute file offset of `data[0]`. |+| `data` | 2 | `bytes` | The bytes. |++### ReadFileEnd++Final message of a `ReadFile` stream.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `bytes_read` | 1 | `uint64` | Bytes sent in chunks. |+| `sha256` | 2 | `string` | Lowercase hex SHA-256 of the bytes sent, when requested. |++### WriteFileHeader++Destination and options for a write.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Destination path. |+| `mode` | 2 | [`WriteMode`](#writemode) | How to treat an existing file. |+| `permissions` | 3 | `uint32` | Permission bits for a new file. 0 means 0o644. |+| `create_parents` | 4 | `bool` | Create missing parent directories. |+| `expected_size` | 5 | `uint64` | Expected total size in bytes, 0 if unknown. Checked on completion when non-zero. |+| `expected_sha256` | 6 | `string` | Expected lowercase hex SHA-256 of the full content. Checked on completion when set; a mismatch discards the data and fails with `ERROR_REASON_CHECKSUM_MISMATCH`. |++### WriteFileRequest++One message of the `FilesystemService.WriteFile` client stream.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `header` | 1 | [`WriteFileHeader`](#writefileheader) (oneof `message`) | First message only. |+| `data` | 2 | `bytes` (oneof `message`) | File content, strictly sequential. Each chunk is at most `Limits.max_chunk_bytes`. |++### WriteFileResponse++Response for `FilesystemService.WriteFile`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entry` | 1 | [`EntryInfo`](#entryinfo) | The written file. |+| `sha256` | 2 | `string` | Lowercase hex SHA-256 of the bytes received. |++### BeginUploadRequest++Request for `FilesystemService.BeginUpload`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `header` | 1 | [`WriteFileHeader`](#writefileheader) | Destination and options. `expected_sha256` is strongly recommended. |+| `upload_id` | 2 | `string` | Client-chosen id that makes this call idempotent and resumable. If an unexpired upload with this id exists for the same path, the call returns its current `received_bytes` instead of starting over. Empty lets the server generate an id (not resumable after the response is lost). |+| `ttl` | 3 | `google.protobuf.Duration` | How long partial data is kept without progress. Unset means 1 hour. At most 24 hours. |++### BeginUploadResponse++Response for `FilesystemService.BeginUpload`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `upload_id` | 1 | `string` | Upload id for later calls. |+| `received_bytes` | 2 | `uint64` | Bytes already received. 0 for a new upload; the resume point otherwise. |+| `max_chunk_bytes` | 3 | `uint32` | Largest chunk the server accepts. |+| `expires_at` | 4 | `google.protobuf.Timestamp` | When the partial upload expires if no further chunks arrive. |++### UploadChunkRequest++Request for `FilesystemService.UploadChunk`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `upload_id` | 1 | `string` | Which upload. |+| `offset` | 2 | `uint64` | Offset of `data[0]`. Must equal the server's `received_bytes`; a chunk wholly below it is acknowledged as a duplicate, anything else fails with `ERROR_REASON_OFFSET_MISMATCH` and `metadata["expected_offset"]`. |+| `data` | 3 | `bytes` | The bytes. At most `max_chunk_bytes`. |++### UploadChunkResponse++Response for `FilesystemService.UploadChunk`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `received_bytes` | 1 | `uint64` | Total bytes received so far. |+| `duplicate` | 2 | `bool` | True if the chunk was a retry and was not written again. |+| `expires_at` | 3 | `google.protobuf.Timestamp` | New expiry of the partial upload. |++### CommitUploadRequest++Request for `FilesystemService.CommitUpload`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `upload_id` | 1 | `string` | Which upload. |+| `sha256` | 2 | `string` | Expected lowercase hex SHA-256, overriding the header's. Optional. |++### CommitUploadResponse++Response for `FilesystemService.CommitUpload`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `entry` | 1 | [`EntryInfo`](#entryinfo) | The published file. |+| `sha256` | 2 | `string` | Lowercase hex SHA-256 of the committed content. |++### AbortUploadRequest++Request for `FilesystemService.AbortUpload`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `upload_id` | 1 | `string` | Which upload. |++### AbortUploadResponse++Response for `FilesystemService.AbortUpload`.++No fields.++### CreateSignedUrlRequest++Request for `FilesystemService.CreateSignedUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Path the URL grants access to. Exactly this path; no traversal. |+| `method` | 2 | [`SignedUrlMethod`](#signedurlmethod) | Allowed method. |+| `ttl` | 3 | `google.protobuf.Duration` | Validity. Required; at most 24 hours. |+| `content_type` | 4 | `string` | For GET: `Content-Type` to serve. Empty means guessed from the name. |+| `download_name` | 5 | `string` | For GET: serve with `Content-Disposition: attachment` using this file name. Empty means inline. |++### CreateSignedUrlResponse++Response for `FilesystemService.CreateSignedUrl`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `url_path` | 1 | `string` | Path and query to append to the spacesd's base URL, for example "/files?path=%2Fhome%2Fu%2Fa.png&method=GET&exp=1767225600&sig=…". The server does not know how it is addressed (direct, Fleet gateway, relay), so it never returns an absolute URL. The signature is HMAC-SHA256 over method, path and expiry with a key derived from the access token; rotating the token revokes every outstanding URL. |+| `expires_at` | 2 | `google.protobuf.Timestamp` | When the URL stops working. |++### FileType++Type of a filesystem entry.++| Value | # | Description |+| --- | --- | --- |+| `FILE_TYPE_UNSPECIFIED` | 0 | Not reported. |+| `FILE_TYPE_FILE` | 1 | Regular file. |+| `FILE_TYPE_DIRECTORY` | 2 | Directory. |+| `FILE_TYPE_SYMLINK` | 3 | Symbolic link (only when not following links). |+| `FILE_TYPE_OTHER` | 4 | Anything else (socket, FIFO, device). |++### FsEventType++Kind of filesystem change.++| Value | # | Description |+| --- | --- | --- |+| `FS_EVENT_TYPE_UNSPECIFIED` | 0 | Not reported. |+| `FS_EVENT_TYPE_CREATE` | 1 | Entry created. |+| `FS_EVENT_TYPE_WRITE` | 2 | File content written. |+| `FS_EVENT_TYPE_REMOVE` | 3 | Entry removed. |+| `FS_EVENT_TYPE_RENAME` | 4 | Entry renamed or moved. `path` is the new path when known. |+| `FS_EVENT_TYPE_CHMOD` | 5 | Permissions or ownership changed. |++### WriteMode++How `WriteFile` and uploads treat an existing destination.++| Value | # | Description |+| --- | --- | --- |+| `WRITE_MODE_UNSPECIFIED` | 0 | Not set. Treated as `WRITE_MODE_OVERWRITE`. |+| `WRITE_MODE_OVERWRITE` | 1 | Replace any existing file atomically. |+| `WRITE_MODE_CREATE_NEW` | 2 | Fail with `ERROR_REASON_PATH_EXISTS` if the destination exists. |+| `WRITE_MODE_APPEND` | 3 | Append to the existing file (created if missing). Not atomic. |++### SignedUrlMethod++HTTP method a signed URL is valid for.++| Value | # | Description |+| --- | --- | --- |+| `SIGNED_URL_METHOD_UNSPECIFIED` | 0 | Not set. Rejected. |+| `SIGNED_URL_METHOD_GET` | 1 | Download with `GET` (supports `Range`). |+| `SIGNED_URL_METHOD_PUT` | 2 | Upload with `PUT` (the body replaces the file atomically). |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-stream.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-stream.mdxindex 9abfcfc62c..5f43103bd2 100644--- a/docs/content/docs/cua-sdk/reference/protocol/env-stream.mdx+++ b/docs/content/docs/cua-sdk/reference/protocol/env-stream.mdx@@ -1,6 +1,6 @@----title: "Streams and presence"-description: "cua.env.v1 StreamService and PresenceService: media sessions and multiplayer cursors."+title: "Streams, teleport, tunnels and host Spaces"+description: "cua.env.v1 StreamService, PresenceService, TeleportService, TunnelService, VolumeService and HostSpacesService."---{/*@@ -10,9 +10,9 @@ description: "cua.env.v1 StreamService and PresenceService: media sessions and mVersion: 0.5.0*/}-Media sessions (video and audio over the media wire, see `libs/cua/proto/MEDIA.md`) and presence for shared sessions.+Media sessions (video and audio over the media wire, see `libs/cua/proto/MEDIA.md`) and presence; the receiving side of teleport (sending lives in the cua SDK), TCP port forwards, the reverse-SOCKS hotspot and the guest mount of Cua Volume; and the Spaces a machine set up with `cua host setup --provide-spaces` creates for its owner's enrolled devices.-Source: `libs/cua/proto/cua/env/v1/stream.proto`, `libs/cua/proto/cua/env/v1/presence.proto`.+Source: `libs/cua/proto/cua/env/v1/stream.proto`, `libs/cua/proto/cua/env/v1/presence.proto`, `libs/cua/proto/cua/env/v1/teleport.proto`, `libs/cua/proto/cua/env/v1/tunnel.proto`, `libs/cua/proto/cua/env/v1/volume.proto`, `libs/cua/proto/cua/env/v1/host.proto`.## StreamService@@ -108,6 +108,282 @@ Publishes the caller's cursor.Leaves presence and ends the caller's `Join` stream.+## TeleportService++`cua.env.v1.TeleportService`++Receiving side of "teleport": moving an app session (browser profile+cookies and storage, editor state) or a set of files from a user's+machine into the guest.++The approval gate (biometric or explicit user consent for sensitive items)+lives on the sending side, in the SDK; the guest never pulls. All uploads+are unary chunks so browsers on gRPC-Web can send them.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`GetManifest`](#teleportservicegetmanifest) | [`GetManifestRequest`](#getmanifestrequest) | [`GetManifestResponse`](#getmanifestresponse) | unary |+| [`ImportSession`](#teleportserviceimportsession) | [`ImportSessionRequest`](#importsessionrequest) | [`ImportSessionResponse`](#importsessionresponse) | unary |+| [`BeginReceiveFiles`](#teleportservicebeginreceivefiles) | [`BeginReceiveFilesRequest`](#beginreceivefilesrequest) | [`BeginReceiveFilesResponse`](#beginreceivefilesresponse) | unary |+| [`ReceiveFilesChunk`](#teleportservicereceivefileschunk) | [`ReceiveFilesChunkRequest`](#receivefileschunkrequest) | [`ReceiveFilesChunkResponse`](#receivefileschunkresponse) | unary |+| [`CommitReceiveFiles`](#teleportservicecommitreceivefiles) | [`CommitReceiveFilesRequest`](#commitreceivefilesrequest) | [`CommitReceiveFilesResponse`](#commitreceivefilesresponse) | unary |+| [`AbortReceiveFiles`](#teleportserviceabortreceivefiles) | [`AbortReceiveFilesRequest`](#abortreceivefilesrequest) | [`AbortReceiveFilesResponse`](#abortreceivefilesresponse) | unary |+| [`WipeImport`](#teleportservicewipeimport) | [`WipeImportRequest`](#wipeimportrequest) | [`WipeImportResponse`](#wipeimportresponse) | unary |++### TeleportService.GetManifest++`/cua.env.v1.TeleportService/GetManifest`, unary: [`GetManifestRequest`](#getmanifestrequest) to [`GetManifestResponse`](#getmanifestresponse).++Describes what the guest can accept for an app: whether the provider+exists, whether the app is installed or running, and which bundle+format version to send.++### TeleportService.ImportSession++`/cua.env.v1.TeleportService/ImportSession`, unary: [`ImportSessionRequest`](#importsessionrequest) to [`ImportSessionResponse`](#importsessionresponse).++Uploads an rcdp-app-session bundle in offset-addressed chunks and, on+the final chunk, verifies and imports it. Resumable: resend from the+returned `received_bytes`.++### TeleportService.BeginReceiveFiles++`/cua.env.v1.TeleportService/BeginReceiveFiles`, unary: [`BeginReceiveFilesRequest`](#beginreceivefilesrequest) to [`BeginReceiveFilesResponse`](#beginreceivefilesresponse).++Starts a file transfer into the guest's Downloads folder by declaring+its manifest. Entries matching ignore rules are dropped here.++### TeleportService.ReceiveFilesChunk++`/cua.env.v1.TeleportService/ReceiveFilesChunk`, unary: [`ReceiveFilesChunkRequest`](#receivefileschunkrequest) to [`ReceiveFilesChunkResponse`](#receivefileschunkresponse).++Uploads one chunk of one declared file.++### TeleportService.CommitReceiveFiles++`/cua.env.v1.TeleportService/CommitReceiveFiles`, unary: [`CommitReceiveFilesRequest`](#commitreceivefilesrequest) to [`CommitReceiveFilesResponse`](#commitreceivefilesresponse).++Verifies every file's SHA-256 and publishes the transfer atomically.++### TeleportService.AbortReceiveFiles++`/cua.env.v1.TeleportService/AbortReceiveFiles`, unary: [`AbortReceiveFilesRequest`](#abortreceivefilesrequest) to [`AbortReceiveFilesResponse`](#abortreceivefilesresponse).++Discards a transfer.++### TeleportService.WipeImport++`/cua.env.v1.TeleportService/WipeImport`, unary: [`WipeImportRequest`](#wipeimportrequest) to [`WipeImportResponse`](#wipeimportresponse).++Removes what a committed import left in the guest: every file and+directory it created and every Keychain item it installed, as recorded+in the import's ledger. Guests that support it advertise the feature+"teleport.wipe". An unknown `import_id` is `NOT_FOUND`.++## TunnelService++`cua.env.v1.TunnelService`++Network tunnels between a client and the guest, carried over WebSocket+upgrades on the spacesd port so they work through the Fleet gateway,+the relay and gRPC-Web-only networks.++- `Forward`: client-to-guest TCP. Each WebSocket connection to+ `ws_path` becomes one TCP connection to the guest port; binary frames+ carry the byte stream in both directions.+- Hotspot: guest-to-client egress (reverse SOCKS5). A SOCKS5 listener on+ guest loopback relays each outbound connection over the client's+ WebSocket, and the client dials it from its own network. Replaces the+ unauthenticated rcdp-socks.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`Forward`](#tunnelserviceforward) | [`ForwardRequest`](#forwardrequest) | [`ForwardResponse`](#forwardresponse) | unary |+| [`ListForwards`](#tunnelservicelistforwards) | [`ListForwardsRequest`](#listforwardsrequest) | [`ListForwardsResponse`](#listforwardsresponse) | unary |+| [`CloseForward`](#tunnelservicecloseforward) | [`CloseForwardRequest`](#closeforwardrequest) | [`CloseForwardResponse`](#closeforwardresponse) | unary |+| [`StartHotspot`](#tunnelservicestarthotspot) | [`StartHotspotRequest`](#starthotspotrequest) | [`StartHotspotResponse`](#starthotspotresponse) | unary |+| [`StopHotspot`](#tunnelservicestophotspot) | [`StopHotspotRequest`](#stophotspotrequest) | [`StopHotspotResponse`](#stophotspotresponse) | unary |+| [`GetHotspotStatus`](#tunnelservicegethotspotstatus) | [`GetHotspotStatusRequest`](#gethotspotstatusrequest) | [`GetHotspotStatusResponse`](#gethotspotstatusresponse) | unary |++### TunnelService.Forward++`/cua.env.v1.TunnelService/Forward`, unary: [`ForwardRequest`](#forwardrequest) to [`ForwardResponse`](#forwardresponse).++Authorizes TCP forwarding to a guest port and returns the WebSocket to+connect to.++### TunnelService.ListForwards++`/cua.env.v1.TunnelService/ListForwards`, unary: [`ListForwardsRequest`](#listforwardsrequest) to [`ListForwardsResponse`](#listforwardsresponse).++Lists active forwards.++### TunnelService.CloseForward++`/cua.env.v1.TunnelService/CloseForward`, unary: [`CloseForwardRequest`](#closeforwardrequest) to [`CloseForwardResponse`](#closeforwardresponse).++Revokes a forward and closes its connections.++### TunnelService.StartHotspot++`/cua.env.v1.TunnelService/StartHotspot`, unary: [`StartHotspotRequest`](#starthotspotrequest) to [`StartHotspotResponse`](#starthotspotresponse).++Starts the reverse-SOCKS hotspot for the calling client.++### TunnelService.StopHotspot++`/cua.env.v1.TunnelService/StopHotspot`, unary: [`StopHotspotRequest`](#stophotspotrequest) to [`StopHotspotResponse`](#stophotspotresponse).++Stops the hotspot.++### TunnelService.GetHotspotStatus++`/cua.env.v1.TunnelService/GetHotspotStatus`, unary: [`GetHotspotStatusRequest`](#gethotspotstatusrequest) to [`GetHotspotStatusResponse`](#gethotspotstatusresponse).++Reports hotspot state and counters.++## VolumeService++`cua.env.v1.VolumeService`++Cua Volume in the guest: the Space's view of the user's volume, mounted+at a fixed path and served by the client (the host that runs the volume).++The client calls `AttachVolume` and opens the returned WebSocket+(`/volume`, ticket-authenticated), which it keeps open. Once it is+attached, cua-spacesd mounts the volume in the guest; the mount's traffic+travels as tunnel streams over that socket (the frame format of the+hotspot, `OPEN` carrying the target `nfs` or `fs`), and the client+answers them from its own copy of the volume, scoped to this Space. The+guest never holds storage keys and never has a network path to the+client. The mount goes away when the socket closes or on+`DetachVolume`.++| Guest | Backend | Mount path |+|---|---|---|+| macOS | `nfs`: the system NFS client | `~/Cua Volume` |+| Linux | `fs`: FUSE (the file operations protocol) | `/volume`, else `~/Cua Volume` |+| Windows | not yet: a preview (`nfs`, Client for NFS, on `V:\`) is off unless the guest sets `CUA_VOLUME_WINDOWS_PREVIEW=1` | |++On Windows a `mount_path` that is not a drive (for example+`C:\Users\<user>\Cua Volume`) becomes a directory symbolic link to the+drive the volume mounts on.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`AttachVolume`](#volumeserviceattachvolume) | [`AttachVolumeRequest`](#attachvolumerequest) | [`AttachVolumeResponse`](#attachvolumeresponse) | unary |+| [`DetachVolume`](#volumeservicedetachvolume) | [`DetachVolumeRequest`](#detachvolumerequest) | [`DetachVolumeResponse`](#detachvolumeresponse) | unary |+| [`GetVolumeStatus`](#volumeservicegetvolumestatus) | [`GetVolumeStatusRequest`](#getvolumestatusrequest) | [`GetVolumeStatusResponse`](#getvolumestatusresponse) | unary |++### VolumeService.AttachVolume++`/cua.env.v1.VolumeService/AttachVolume`, unary: [`AttachVolumeRequest`](#attachvolumerequest) to [`AttachVolumeResponse`](#attachvolumeresponse).++Prepares a mount and returns the WebSocket the client attaches.++### VolumeService.DetachVolume++`/cua.env.v1.VolumeService/DetachVolume`, unary: [`DetachVolumeRequest`](#detachvolumerequest) to [`DetachVolumeResponse`](#detachvolumeresponse).++Unmounts and closes the socket.++### VolumeService.GetVolumeStatus++`/cua.env.v1.VolumeService/GetVolumeStatus`, unary: [`GetVolumeStatusRequest`](#getvolumestatusrequest) to [`GetVolumeStatusResponse`](#getvolumestatusresponse).++Reports the mount.++## HostSpacesService++`cua.env.v1.HostSpacesService`++Spaces a host provides: a machine set up with `cua host setup+--provide-spaces` creates Spaces (macOS VMs with Lume on a Mac, Linux+containers with Docker, whatever else runs locally) for the owner's+enrolled devices and the accounts it is shared with, through the relay.++The host's cua-spacesd serves this service only in `join` mode with a host+policy, and only to relay-asserted editors (the owner, or an account on+the machine's allowlist) and the local token holder: a view-only share is+refused. It forwards each call to the host's cua daemon, which creates and+deletes the Spaces with its own runtimes, attaches each new Space to the+relay as its own machine, and records every create and delete in the+host's hash-chained audit log (`~/.cua/host/spaces-audit.jsonl`).++Providing Spaces never exposes the host's own desktop or files: with the+host setting `share_desktop` off, a relayed caller reaches only this+service and `SystemService` `GetCapabilities` / `Health`.++A host set up with `cua host setup --direct <ip:port> --provide-spaces`+serves this service on its direct listener too, without the relay: the+caller is the holder of the host's env token (the owner), and by default+only loopback, Tailscale (100.64.0.0/10, fd7a:115c:a1e0::/48) and private+LAN addresses may call it. A Space created with `direct` set is not+attached to the relay: the host forwards a TCP port on its own address+(`HostSpace.direct_port`) to the Space's cua-spacesd.++| RPC | Request | Response | Kind |+| --- | --- | --- | --- |+| [`GetHostSpaces`](#hostspacesservicegethostspaces) | [`GetHostSpacesRequest`](#gethostspacesrequest) | [`GetHostSpacesResponse`](#gethostspacesresponse) | unary |+| [`CreateHostSpace`](#hostspacesservicecreatehostspace) | [`CreateHostSpaceRequest`](#createhostspacerequest) | [`CreateHostSpaceResponse`](#createhostspaceresponse) | unary |+| [`DeleteHostSpace`](#hostspacesservicedeletehostspace) | [`DeleteHostSpaceRequest`](#deletehostspacerequest) | [`DeleteHostSpaceResponse`](#deletehostspaceresponse) | unary |+| [`CancelHostSpace`](#hostspacesservicecancelhostspace) | [`CancelHostSpaceRequest`](#cancelhostspacerequest) | [`CancelHostSpaceResponse`](#cancelhostspaceresponse) | unary |+| [`SetHostSpacePower`](#hostspacesservicesethostspacepower) | [`SetHostSpacePowerRequest`](#sethostspacepowerrequest) | [`SetHostSpacePowerResponse`](#sethostspacepowerresponse) | unary |+| [`DeleteCloudSpace`](#hostspacesservicedeletecloudspace) | [`DeleteCloudSpaceRequest`](#deletecloudspacerequest) | [`DeleteCloudSpaceResponse`](#deletecloudspaceresponse) | unary |++### HostSpacesService.GetHostSpaces++`/cua.env.v1.HostSpacesService/GetHostSpaces`, unary: [`GetHostSpacesRequest`](#gethostspacesrequest) to [`GetHostSpacesResponse`](#gethostspacesresponse).++This host's settings, capacity, the Spaces it provides to the caller+(every one for the owner) and, for the owner, its recent audit.++### HostSpacesService.CreateHostSpace++`/cua.env.v1.HostSpacesService/CreateHostSpace`, unary: [`CreateHostSpaceRequest`](#createhostspacerequest) to [`CreateHostSpaceResponse`](#createhostspaceresponse).++Creates one Space on this host and attaches it to the relay as the+machine the caller registered for it (`attach`). Fails with+`RESOURCE_EXHAUSTED` when the host is at capacity (two macOS VMs per+Mac, by Apple's license, or the host's `max_spaces`).++### HostSpacesService.DeleteHostSpace++`/cua.env.v1.HostSpacesService/DeleteHostSpace`, unary: [`DeleteHostSpaceRequest`](#deletehostspacerequest) to [`DeleteHostSpaceResponse`](#deletehostspaceresponse).++Deletes a Space this host provides (its sandbox and its relay machine).+The owner deletes any; another account only the ones it created.++### HostSpacesService.CancelHostSpace++`/cua.env.v1.HostSpacesService/CancelHostSpace`, unary: [`CancelHostSpaceRequest`](#cancelhostspacerequest) to [`CancelHostSpaceResponse`](#cancelhostspaceresponse).++Cancels a `CreateHostSpace` the caller started, by the relay machine+it registered for it (`attach.machine_id`): the create stops (an image+download, a boot) and what it made is removed; one that already+finished is deleted, since the caller gave up on it. Idempotent.++### HostSpacesService.SetHostSpacePower++`/cua.env.v1.HostSpacesService/SetHostSpacePower`, unary: [`SetHostSpacePowerRequest`](#sethostspacepowerrequest) to [`SetHostSpacePowerResponse`](#sethostspacepowerresponse).++Turns a Space this host provides off or on. Off stops it with its disk+kept, freeing the host's memory (a runtime that cannot start it again,+QEMU, suspends it instead); on boots it again and re-attaches it to its+relay machine. The owner powers any; another account only the ones it+created.++### HostSpacesService.DeleteCloudSpace++`/cua.env.v1.HostSpacesService/DeleteCloudSpace`, unary: [`DeleteCloudSpaceRequest`](#deletecloudspacerequest) to [`DeleteCloudSpaceResponse`](#deletecloudspaceresponse).++Deletes a Space in the owner's own cloud that this machine created (an+AWS, Google Cloud or Modal sandbox, by the relay machine it joined as):+its cloud resources, through this machine's ownership records, and its+relay machine. Only the owner. Lets another of the owner's devices+delete it permanently without the cloud's credentials. Works whether or+not this machine provides Spaces.+## Types in `cua/env/v1/stream.proto`### MediaTarget@@ -117,7 +393,7 @@ A streamable target.| Field | # | Type | Description || --- | --- | --- | --- || `display_id` | 1 | `string` (oneof `target`) | A whole display ("desktop" target), by display id or "primary". |-| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) (oneof `target`) | A single window. |+| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) (oneof `target`) | A single window. |### StreamTarget@@ -125,8 +401,8 @@ One entry of `ListTargetsResponse`.| Field | # | Type | Description || --- | --- | --- | --- |-| `display` | 1 | [`Display`](/cua-sdk/reference/protocol/env-common#display) (oneof `target`) | A desktop target. |-| `window` | 2 | [`WindowInfo`](/cua-sdk/reference/protocol/env-windows#windowinfo) (oneof `target`) | A window target. |+| `display` | 1 | [`Display`](/cua-sdk/reference/protocol/env-system#display) (oneof `target`) | A desktop target. |+| `window` | 2 | [`WindowInfo`](/cua-sdk/reference/protocol/env-computer#windowinfo) (oneof `target`) | A window target. || `available` | 3 | `bool` | False when the target is listed but cannot be streamed right now. || `limitation` | 4 | `string` | Why not, when `available` is false (for example "screen recording permission not granted"). || `audio` | 5 | [`AudioSource`](#audiosource) | The audio source that pairs with this target: the desktop mix for a display target, the owning app's audio for a window target (or the desktop mix, with `AudioSource.limitation` set, where per-app capture is unsupported). Unset when the guest has no audio capture. |@@ -140,8 +416,8 @@ A capturable audio source.| `source_id` | 1 | `string` | Opaque id, stable while the source exists. "desktop" always names the desktop mix. || `kind` | 2 | [`AudioSourceKind`](#audiosourcekind) | What the source captures. || `name` | 3 | `string` | Human-readable name, for example "Desktop audio" or "Firefox". |-| `app` | 4 | [`AppInfo`](/cua-sdk/reference/protocol/env-windows#appinfo) | Owning application, for `AUDIO_SOURCE_KIND_APPLICATION`. |-| `windows` | 5 | repeated [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Windows of that application, for pairing with window video targets. |+| `app` | 4 | [`AppInfo`](/cua-sdk/reference/protocol/env-computer#appinfo) | Owning application, for `AUDIO_SOURCE_KIND_APPLICATION`. |+| `windows` | 5 | repeated [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Windows of that application, for pairing with window video targets. || `available` | 6 | `bool` | False when listed but not capturable right now. || `limitation` | 7 | `string` | Why a source is unavailable, or degraded (for example "per-app capture needs Windows 10 2004+; falls back to desktop audio"). || `desktop_fallback` | 8 | `bool` | True if capturing this source actually captures the desktop mix because per-app capture is unsupported. |@@ -153,7 +429,7 @@ Request for `StreamService.ListTargets`.| Field | # | Type | Description || --- | --- | --- | --- || `include_windows` | 1 | `bool` | Include window targets. Desktop targets are always included. |-| `window_filter` | 2 | [`WindowFilter`](/cua-sdk/reference/protocol/env-windows#windowfilter) | Filter for window targets. |+| `window_filter` | 2 | [`WindowFilter`](/cua-sdk/reference/protocol/env-computer#windowfilter) | Filter for window targets. |### ListTargetsResponse@@ -294,9 +570,9 @@ Geometry of a media session's frames.| Field | # | Type | Description || --- | --- | --- | --- |-| `frame_size` | 1 | [`PixelSize`](/cua-sdk/reference/protocol/env-common#pixelsize) | Frame size in pixels. |+| `frame_size` | 1 | [`PixelSize`](/cua-sdk/reference/protocol/env-system#pixelsize) | Frame size in pixels. || `scale` | 2 | `double` | Frame pixels per logical point of the target. |-| `logical_bounds` | 3 | [`Rect`](/cua-sdk/reference/protocol/env-common#rect) | Target bounds in global logical points when the session opened. |+| `logical_bounds` | 3 | [`Rect`](/cua-sdk/reference/protocol/env-system#rect) | Target bounds in global logical points when the session opened. || `geometry_epoch` | 4 | `uint64` | Geometry generation; matches `geometry_epoch` on the media plane. |### OpenMediaResponse@@ -442,7 +718,7 @@ A participant.| Field | # | Type | Description || --- | --- | --- | --- || `participant_id` | 1 | `string` | Server-assigned participant id, unique per `Join`. |-| `principal` | 2 | [`Principal`](/cua-sdk/reference/protocol/env-common#principal) | Who it is. `color` is the server-assigned color, which may differ from the requested one. |+| `principal` | 2 | [`Principal`](/cua-sdk/reference/protocol/env-system#principal) | Who it is. `color` is the server-assigned color, which may differ from the requested one. || `joined_at` | 3 | `google.protobuf.Timestamp` | When it joined. |### CursorPosition@@ -452,8 +728,8 @@ Where a cursor is.| Field | # | Type | Description || --- | --- | --- | --- || `display_id` | 1 | `string` | Target the cursor is over. Unset means the primary desktop. |-| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Window the cursor is over, when the participant is viewing a window stream. |-| `position` | 3 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | Position normalized to [0, 1] within the window (if set) or the display, so viewers at different scales agree. |+| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-system#windowref) | Window the cursor is over, when the participant is viewing a window stream. |+| `position` | 3 | [`Point`](/cua-sdk/reference/protocol/env-system#point) | Position normalized to [0, 1] within the window (if set) or the display, so viewers at different scales agree. || `visible` | 4 | `bool` | False hides the cursor (for example the pointer left the viewer). || `shape` | 5 | [`CursorShape`](#cursorshape) | The pointer shape the guest would show at `position`, computed by the server for participants that joined with `JoinRequest.cursor_shapes`. Ignored in `UpdateCursorRequest`. `CURSOR_SHAPE_UNSPECIFIED` (older daemons, or not probed yet) is drawn as the arrow. || `shape_source` | 6 | [`CursorShapeSource`](#cursorshapesource) | How `shape` was determined. |@@ -464,7 +740,7 @@ Request for `PresenceService.Join`.| Field | # | Type | Description || --- | --- | --- | --- |-| `principal` | 1 | [`Principal`](/cua-sdk/reference/protocol/env-common#principal) | Who is joining. Overrides the `x-cua-principal-bin` metadata. |+| `principal` | 1 | [`Principal`](/cua-sdk/reference/protocol/env-system#principal) | Who is joining. Overrides the `x-cua-principal-bin` metadata. || `keepalive_interval` | 2 | `google.protobuf.Duration` | Interval between `keepalive` events. Unset means 30 seconds. || `cursor_shapes` | 3 | `bool` | Asks the server to compute cursor shapes (`CursorPosition.shape`) and send `CursorShapeChanged`. Honored only when the capability "presence.cursor_shape" is supported; otherwise shapes stay unspecified. || `roster_interval` | 4 | `google.protobuf.Duration` | Interval between `RosterHeartbeat` events, which list everyone present so a client can drop a participant whose leave it missed. Unset or zero means no heartbeats. Clamped to at least one second. |@@ -562,7 +838,7 @@ One message of the `PresenceService.Join` stream.| `participant_joined` | 2 | [`Participant`](#participant) (oneof `event`) | Someone joined. || `participant_left` | 3 | [`ParticipantLeft`](#participantleft) (oneof `event`) | Someone left. || `cursor_moved` | 4 | [`CursorMoved`](#cursormoved) (oneof `event`) | Someone's cursor moved. Coalesced to at most 30 per second per participant. |-| `keepalive` | 5 | [`KeepAlive`](/cua-sdk/reference/protocol/env-common#keepalive) (oneof `event`) | Idle stream heartbeat. |+| `keepalive` | 5 | [`KeepAlive`](/cua-sdk/reference/protocol/env-system#keepalive) (oneof `event`) | Idle stream heartbeat. || `cursor_shape_changed` | 6 | [`CursorShapeChanged`](#cursorshapechanged) (oneof `event`) | Someone's cursor shape changed (only with `JoinRequest.cursor_shapes`). || `roster_heartbeat` | 7 | [`RosterHeartbeat`](#rosterheartbeat) (oneof `event`) | Everyone present (only with `JoinRequest.roster_interval`). || `cursor_batch` | 8 | [`CursorBatch`](#cursorbatch) (oneof `event`) | Cursors that moved in one tick (only with `JoinRequest.cursor_batches`). |@@ -641,3 +917,611 @@ Why a participant left.| `LEAVE_REASON_DISCONNECTED` | 2 | Its `Join` stream ended. || `LEAVE_REASON_TIMEOUT` | 3 | No activity within the server's timeout (agents without a stream). || `LEAVE_REASON_RUN_ENDED` | 4 | The agent run or driver session that owned the cursor ended. |++## Types in `cua/env/v1/teleport.proto`++### GetManifestRequest++Request for `TeleportService.GetManifest`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `app` | 1 | `string` | Provider / app id, for example "firefox", "chromium", "chrome", "vscode". Advertised as capability "teleport.<app>". |+| `scope` | 2 | [`TeleportScope`](#teleportscope) | Requested scope. |++### GetManifestResponse++Response for `TeleportService.GetManifest`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `supported` | 1 | `bool` | True if the guest has a provider for this app. |+| `limitation` | 2 | `string` | Why not, when unsupported. |+| `app_installed` | 3 | `bool` | True if the app is installed in the guest. |+| `app_running` | 4 | `bool` | True if the app is running. Importing may require closing it. |+| `bundle_version` | 5 | `uint32` | Bundle format version the sender must produce. |+| `scopes` | 6 | repeated [`TeleportScope`](#teleportscope) | Scopes this provider can import. |+| `supported_apps` | 7 | repeated `string` | Every app id the guest can import, for discovery. |++### ImportOptions++Options applied when an imported session is committed.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `replace_existing` | 1 | `bool` | Replace existing state instead of merging. |+| `close_running_app` | 2 | `bool` | Close the app (gracefully, then forcefully after 5 seconds) if it is running. |+| `launch_after` | 3 | `bool` | Launch the app after importing. |+| `expires_at_ms` | 4 | `uint64` | Unix time in milliseconds at which the guest wipes the import on its own, as `WipeImport` would. 0 means no expiry. Checked every 60 seconds and when the guest daemon starts, so an expiry survives restarts. |+| `broker_grant` | 5 | `string` | Set by the Cua Keyvault broker when it delivers a session it authorized (a consent grant, an unattended rule or a first-party approval), to `keyvault`; empty for a direct SDK send. Not a secret and not verified by the guest. cua-spacesd counts deliveries with and without it (present or absent) in its opt-in aggregate telemetry; nothing else reads it. |++### ImportSessionRequest++Request for `TeleportService.ImportSession`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `import_id` | 1 | `string` | Client-chosen import id, stable across retries. The first chunk (offset 0) creates the import. |+| `app` | 2 | `string` | App id as in `GetManifestRequest.app`. |+| `scope` | 3 | [`TeleportScope`](#teleportscope) | Scope of the bundle. |+| `offset` | 4 | `uint64` | Offset of `data[0]` in the bundle. Must equal `received_bytes`; a chunk wholly below it is acknowledged as a duplicate. |+| `data` | 5 | `bytes` | Bundle bytes. At most `Limits.max_chunk_bytes`. |+| `commit` | 6 | `bool` | True on the last chunk: verify and import. May carry data. |+| `sha256` | 7 | `string` | Lowercase hex SHA-256 of the whole bundle. Required when `commit`. |+| `options` | 8 | [`ImportOptions`](#importoptions) | Import options, read when `commit`. |++### ImportResult++Outcome of an import, returned on the final chunk.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `imported` | 1 | repeated `string` | Items imported (for example "cookies", "localStorage"). |+| `skipped` | 2 | repeated `string` | Items skipped, with reasons, as "item: reason". |+| `launched` | 3 | `bool` | True if the app was launched. |++### ImportSessionResponse++Response for `TeleportService.ImportSession`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `received_bytes` | 1 | `uint64` | Bundle bytes received so far. |+| `duplicate` | 2 | `bool` | True if the chunk was a retry and was not written again. |+| `result` | 3 | [`ImportResult`](#importresult) | Set on the final chunk once the import completed. |++### TransferEntry++One entry of a file transfer manifest.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `relative_path` | 1 | `string` | Path relative to the transfer root, "/"-separated. No "..", no absolute paths. |+| `directory` | 2 | `bool` | True for a directory (no content). |+| `size` | 3 | `uint64` | File size in bytes. |+| `sha256` | 4 | `string` | Lowercase hex SHA-256 of the file content. |+| `mode` | 5 | `uint32` | Unix permission bits. 0 means 0o644 (files) or 0o755 (directories). |+| `modified_at` | 6 | `google.protobuf.Timestamp` | Modification time to preserve. |++### BeginReceiveFilesRequest++Request for `TeleportService.BeginReceiveFiles`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `transfer_id` | 1 | `string` | Client-chosen transfer id, stable across retries. Repeating the call with the same id returns the current progress. |+| `destination_subdir` | 2 | `string` | Subdirectory of the guest user's Downloads folder to place the transfer in. Empty places entries directly in Downloads. |+| `entries` | 3 | repeated [`TransferEntry`](#transferentry) | All entries. Directories may be listed explicitly or implied by file paths. |+| `ignore_patterns` | 4 | repeated `string` | gitignore-syntax patterns applied relative to the transfer root. |+| `honor_gitignore` | 5 | `bool` | Also honor `.gitignore` files that are part of the transfer (their content must be uploaded first; the server evaluates them at commit). |+| `conflict_policy` | 6 | [`ConflictPolicy`](#conflictpolicy) | What to do with existing files. |+| `ttl` | 7 | `google.protobuf.Duration` | How long partial data is kept without progress. Unset means 1 hour. |++### TransferFileProgress++Progress of one file in a transfer.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `index` | 1 | `uint32` | Index into the accepted entries. |+| `received_bytes` | 2 | `uint64` | Bytes received. |++### BeginReceiveFilesResponse++Response for `TeleportService.BeginReceiveFiles`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `transfer_id` | 1 | `string` | The transfer id. |+| `accepted` | 2 | repeated [`TransferEntry`](#transferentry) | Entries that will be received, in the order indices refer to. |+| `ignored` | 3 | repeated `string` | Relative paths dropped by ignore patterns. |+| `progress` | 4 | repeated [`TransferFileProgress`](#transferfileprogress) | Progress per accepted file, for resuming. |+| `max_chunk_bytes` | 5 | `uint32` | Largest chunk accepted. |++### ReceiveFilesChunkRequest++Request for `TeleportService.ReceiveFilesChunk`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `transfer_id` | 1 | `string` | Which transfer. |+| `index` | 2 | `uint32` | Index into `BeginReceiveFilesResponse.accepted`. |+| `offset` | 3 | `uint64` | Offset of `data[0]` in that file. Must equal its received bytes; a chunk wholly below is a duplicate. |+| `data` | 4 | `bytes` | File bytes. At most `max_chunk_bytes`. |++### ReceiveFilesChunkResponse++Response for `TeleportService.ReceiveFilesChunk`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `received_bytes` | 1 | `uint64` | Bytes received for that file. |+| `duplicate` | 2 | `bool` | True if the chunk was a retry. |++### CommitReceiveFilesRequest++Request for `TeleportService.CommitReceiveFiles`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `transfer_id` | 1 | `string` | Which transfer. |++### ReceivedFile++A file placed by a committed transfer.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `path` | 1 | `string` | Final absolute guest path (after conflict renaming). |+| `size` | 2 | `uint64` | Size in bytes. |+| `sha256` | 3 | `string` | Verified lowercase hex SHA-256. |++### CommitReceiveFilesResponse++Response for `TeleportService.CommitReceiveFiles`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `destination` | 1 | `string` | Absolute guest path of the transfer root. |+| `files` | 2 | repeated [`ReceivedFile`](#receivedfile) | Files placed. |+| `skipped` | 3 | repeated `string` | Relative paths skipped by `CONFLICT_POLICY_SKIP` or by `.gitignore` rules evaluated at commit. |++### AbortReceiveFilesRequest++Request for `TeleportService.AbortReceiveFiles`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `transfer_id` | 1 | `string` | Which transfer. |++### AbortReceiveFilesResponse++Response for `TeleportService.AbortReceiveFiles`.++No fields.++### WipeImportRequest++Request for `TeleportService.WipeImport`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `import_id` | 1 | `string` | Import to wipe, as sent in `ImportSessionRequest.import_id`. Ignored when `all` is set. |+| `all` | 2 | `bool` | Wipe every ledgered import in the guest. |++### WipeImportResponse++Response for `TeleportService.WipeImport`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `wiped_import_ids` | 1 | repeated `string` | Import ids whose ledgers were wiped and removed. |+| `removed_paths` | 2 | repeated `string` | Absolute guest paths removed (files, and directories the import created). |+| `keychain_items_removed` | 3 | `uint32` | Keychain items removed (macOS guests; 0 elsewhere). |+| `cookie_rows_removed` | 4 | `uint32` | Cookie rows deleted out of an existing Cookies database the import merged into (not itself in removed_paths: it was not the import's file to remove). |++### TeleportScope++Which part of an app's state to teleport.++| Value | # | Description |+| --- | --- | --- |+| `TELEPORT_SCOPE_UNSPECIFIED` | 0 | Not set. Treated as `TELEPORT_SCOPE_SESSION`. |+| `TELEPORT_SCOPE_SESSION` | 1 | Sign-in state only: cookies, local storage, session storage. |+| `TELEPORT_SCOPE_PROFILE` | 2 | The whole profile: session plus history, bookmarks, extensions, settings. |++### ConflictPolicy++What to do when a received file already exists.++| Value | # | Description |+| --- | --- | --- |+| `CONFLICT_POLICY_UNSPECIFIED` | 0 | Not set. Treated as `CONFLICT_POLICY_RENAME`. |+| `CONFLICT_POLICY_RENAME` | 1 | Keep both: the new file becomes "name (1).ext". |+| `CONFLICT_POLICY_OVERWRITE` | 2 | Replace the existing file. |+| `CONFLICT_POLICY_SKIP` | 3 | Keep the existing file and drop the new one. |++## Types in `cua/env/v1/tunnel.proto`++### ForwardRequest++Request for `TunnelService.Forward`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `port` | 1 | `uint32` | Guest TCP port to reach. |+| `host` | 2 | `string` | Guest host to connect to. Empty means "127.0.0.1". Only loopback and the guest's own addresses are allowed. |+| `ttl` | 3 | `google.protobuf.Duration` | How long the ticket accepts new connections. Unset means 10 minutes; at most 24 hours. Open connections survive expiry. |++### ForwardResponse++Response for `TunnelService.Forward`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `forward_id` | 1 | `string` | Forward id. |+| `ticket` | 2 | `string` | Ticket accepted by the tunnel WebSocket. Reusable for many connections until expiry. |+| `ws_path` | 3 | `string` | WebSocket path relative to the spacesd base URL, including the ticket, for example "/tunnel?ticket=…". |+| `expires_at` | 4 | `google.protobuf.Timestamp` | When the ticket expires. |++### ForwardInfo++An active forward.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `forward_id` | 1 | `string` | Forward id. |+| `host` | 2 | `string` | Guest host. |+| `port` | 3 | `uint32` | Guest port. |+| `active_connections` | 4 | `uint32` | Open connections. |+| `bytes_in` | 5 | `uint64` | Bytes sent to the guest port. |+| `bytes_out` | 6 | `uint64` | Bytes received from the guest port. |+| `expires_at` | 7 | `google.protobuf.Timestamp` | Ticket expiry. |++### ListForwardsRequest++Request for `TunnelService.ListForwards`.++No fields.++### ListForwardsResponse++Response for `TunnelService.ListForwards`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `forwards` | 1 | repeated [`ForwardInfo`](#forwardinfo) | Active forwards. |++### CloseForwardRequest++Request for `TunnelService.CloseForward`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `forward_id` | 1 | `string` | Which forward. |++### CloseForwardResponse++Response for `TunnelService.CloseForward`.++No fields.++### StartHotspotRequest++Request for `TunnelService.StartHotspot`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `socks_port` | 1 | `uint32` | Guest loopback port for the SOCKS5 listener. 0 means 1080. |+| `set_system_proxy` | 2 | `bool` | Point the guest's system proxy settings (and HTTP(S)_PROXY for new processes) at the hotspot. |+| `bypass` | 3 | repeated `string` | Destinations (CIDRs or host suffixes) that bypass the hotspot and use the guest's own network. |+| `ticket_ttl` | 4 | `google.protobuf.Duration` | How long the ticket accepts the client's WebSocket. Unset means 60 seconds. |++### StartHotspotResponse++Response for `TunnelService.StartHotspot`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `hotspot_id` | 1 | `string` | Hotspot id. |+| `ticket` | 2 | `string` | Ticket for the hotspot WebSocket. |+| `ws_path` | 3 | `string` | WebSocket path relative to the spacesd base URL, including the ticket, for example "/hotspot?ticket=…". The client keeps this socket open; the hotspot stops when it closes. |+| `socks_address` | 4 | `string` | Guest-side SOCKS5 address, for example "127.0.0.1:1080". |++### StopHotspotRequest++Request for `TunnelService.StopHotspot`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `hotspot_id` | 1 | `string` | Which hotspot. |++### StopHotspotResponse++Response for `TunnelService.StopHotspot`.++No fields.++### GetHotspotStatusRequest++Request for `TunnelService.GetHotspotStatus`.++No fields.++### GetHotspotStatusResponse++Response for `TunnelService.GetHotspotStatus`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `state` | 1 | [`HotspotState`](#hotspotstate) | State. |+| `hotspot_id` | 2 | `string` | Hotspot id, when not stopped. |+| `peer_principal_id` | 3 | `string` | Id of the principal whose client provides egress. |+| `socks_address` | 4 | `string` | Guest-side SOCKS5 address. |+| `active_connections` | 5 | `uint32` | Open relayed connections. |+| `bytes_out` | 6 | `uint64` | Bytes sent from the guest through the hotspot. |+| `bytes_in` | 7 | `uint64` | Bytes received into the guest through the hotspot. |++### HotspotState++Hotspot state.++| Value | # | Description |+| --- | --- | --- |+| `HOTSPOT_STATE_UNSPECIFIED` | 0 | Not reported. |+| `HOTSPOT_STATE_STOPPED` | 1 | No hotspot. |+| `HOTSPOT_STATE_WAITING_FOR_PEER` | 2 | Started, waiting for the client WebSocket. |+| `HOTSPOT_STATE_ACTIVE` | 3 | Relaying. |++## Types in `cua/env/v1/volume.proto`++### AttachVolumeRequest++Request for `VolumeService.AttachVolume`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `mount_path` | 1 | `string` | Where to mount. Empty means the guest's default (see the table above). |+| `ticket_ttl` | 2 | `google.protobuf.Duration` | How long the ticket accepts the client's WebSocket. Unset means 60 seconds. |++### AttachVolumeResponse++Response for `VolumeService.AttachVolume`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `volume_id` | 1 | `string` | Volume session id. |+| `ticket` | 2 | `string` | Ticket for the volume WebSocket. |+| `ws_path` | 3 | `string` | WebSocket path relative to the spacesd base URL, including the ticket, for example "/volume?ticket=…". |+| `mount_path` | 4 | `string` | Where the volume will be mounted. |+| `backend` | 5 | `string` | `nfs` or `fs`: the target name the guest's streams carry, which the client answers. |++### DetachVolumeRequest++Request for `VolumeService.DetachVolume`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `volume_id` | 1 | `string` | Which session. Empty means the current one. |++### DetachVolumeResponse++Response for `VolumeService.DetachVolume`.++No fields.++### GetVolumeStatusRequest++Request for `VolumeService.GetVolumeStatus`.++No fields.++### GetVolumeStatusResponse++Response for `VolumeService.GetVolumeStatus`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `state` | 1 | [`VolumeState`](#volumestate) | State. |+| `volume_id` | 2 | `string` | Volume session id (empty when detached). |+| `mount_path` | 3 | `string` | Mount path. |+| `backend` | 4 | `string` | `nfs` or `fs`. |+| `detail` | 5 | `string` | Why, when `state` is `VOLUME_STATE_ERROR`. |+| `active_streams` | 6 | `uint32` | Open streams to the client. |+| `bytes_out` | 7 | `uint64` | Bytes sent from the guest to the client. |+| `bytes_in` | 8 | `uint64` | Bytes received from the client. |++### VolumeState++State of the guest mount.++| Value | # | Description |+| --- | --- | --- |+| `VOLUME_STATE_UNSPECIFIED` | 0 | Not reported. |+| `VOLUME_STATE_DETACHED` | 1 | No volume. |+| `VOLUME_STATE_WAITING_FOR_CLIENT` | 2 | Attached by RPC, waiting for the client WebSocket. |+| `VOLUME_STATE_MOUNTING` | 3 | Mounting. |+| `VOLUME_STATE_MOUNTED` | 4 | Mounted and served. |+| `VOLUME_STATE_ERROR` | 5 | The mount failed; see `detail`. |++## Types in `cua/env/v1/host.proto`++### HostSpacesSettings++The host's two independent settings and its limits.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `share_desktop` | 1 | `bool` | The host's own desktop is a Space too (screen, input, shell, files). |+| `provide_spaces` | 2 | `bool` | The host accepts Space create, list and delete requests. |+| `max_spaces` | 3 | `uint32` | At most this many provided Spaces at once (0: no limit besides the runtimes' own). |+| `max_macos_vms` | 4 | `uint32` | At most this many macOS VMs at once on this Mac (Apple's license allows two; 0 on a host that cannot run macOS VMs). |++### HostSpacesCapacity++How much of one limit is in use.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `resource` | 1 | `string` | `spaces` (every provided Space) or `macos_vms` (macOS VMs on this Mac, provided or not). |+| `used` | 2 | `uint32` | In use now. |+| `limit` | 3 | `uint32` | The limit (0: none). |+| `reason` | 4 | `string` | Why the limit exists, for people ("Apple's macOS license allows two macOS VMs per Mac"). |++### HostSpace++A Space this host provides.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `relay_machine` | 1 | `string` | The relay machine the Space is reached as (`relay:<machine>`). |+| `local_space` | 2 | `string` | The Space on the host (`local:<name>`). |+| `name` | 3 | `string` | Display name. |+| `image` | 4 | `string` | The image it runs, as requested. |+| `os` | 5 | `string` | Guest OS family: `linux`, `macos` or `windows` (empty when unknown). |+| `kind` | 6 | `string` | `container` or `vm` (empty when unknown). |+| `runtime` | 7 | `string` | Engine: `lume`, `runc`, `gvisor`, `qemu` (empty when unknown). |+| `created_by` | 8 | `string` | The account that created it (id, or email when the relay shares it). |+| `created_at_ms` | 9 | `int64` | When it was created (Unix milliseconds). |+| `direct_port` | 10 | `uint32` | A Space created with `CreateHostSpaceRequest.direct`: the TCP port on the host's own address that the host forwards to the Space's cua-spacesd (`direct:<host address>:<direct_port>`). 0 for a Space reached through the relay. |+| `direct_token` | 11 | `string` | The Space's cua-spacesd token, set only in the `CreateHostSpace` response of a direct Space (the caller stores it like any direct Space's token). Empty otherwise. |++### HostSpacesAuditEvent++One line of the host's Spaces audit log.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `ts_ms` | 1 | `int64` | Unix milliseconds. |+| `action` | 2 | `string` | `create`, `delete`, `refused`, or `config`. |+| `who` | 3 | `string` | Who: an account (`name <email> (id)`), or `local` for this machine. |+| `space` | 4 | `string` | The relay machine or Space the event is about. |+| `detail` | 5 | `string` | Detail for people. |++### GetHostSpacesRequest++Request for `HostSpacesService.GetHostSpaces`.++No fields.++### GetHostSpacesResponse++Response for `HostSpacesService.GetHostSpaces`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | This host's display name. |+| `os` | 2 | `string` | The host's operating system (`macos`, `linux`, `windows`). |+| `settings` | 3 | [`HostSpacesSettings`](#hostspacessettings) | Settings and limits. |+| `capacity` | 4 | repeated [`HostSpacesCapacity`](#hostspacescapacity) | Current use of each limit. |+| `spaces` | 5 | repeated [`HostSpace`](#hostspace) | Spaces this host provides: every one for the owner, the caller's own otherwise. |+| `audit` | 6 | repeated [`HostSpacesAuditEvent`](#hostspacesauditevent) | The most recent audit events, newest first (the owner only). |+| `images` | 7 | repeated `string` | Image aliases this host resolves (`macos`, `linux`, ...), for clients to offer. |+| `creating` | 8 | repeated [`HostSpaceCreating`](#hostspacecreating) | The creates this host is running now (`CreateHostSpace` calls that have not returned), each with what it is doing: every one for the owner, the caller's own otherwise. A client polls this while its create runs, to show the download and the boot. Empty from a host that predates it. |++### HostSpaceCreating++A create a host is running, and what it is doing now. The progress+fields are those of `cua.daemon.v1.CreateSpaceProgress`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `key` | 1 | `string` | The create's key: `CreateHostSpaceRequest.create_key`, else the relay machine it attaches to (`attach.machine_id`). |+| `phase` | 2 | `string` | "preparing", "pulling", "creating", "booting", "waiting_for_services", "connecting" or "ready", in that order. |+| `fraction` | 3 | optional `double` | How far through the phase, 0.0 to 1.0, when its size is known (an image pull). |+| `detail` | 4 | `string` | One short line, for example the image being pulled. |+| `bytes_done` | 5 | optional `uint64` | Bytes downloaded so far, when the step counts them (an image pull). |+| `bytes_total` | 6 | optional `uint64` | Bytes the download has in all. |+| `bytes_per_second` | 7 | optional `double` | Smoothed download rate, bytes per second. |++### CreateHostSpaceRequest++Request for `HostSpacesService.CreateHostSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `image` | 1 | `string` | Image: a registry reference or an alias (`macos`, `macos:26`, `linux`). Empty uses the canonical Linux image. |+| `kind` | 2 | `string` | "auto" (empty), "container" or "vm". |+| `runtime` | 3 | `string` | "auto" (empty) or a runtime this host offers ("lume", "runc", ...). |+| `name` | 4 | `string` | Name on the host. Empty generates `space-<hex>`. |+| `cpus` | 5 | `uint32` | vCPUs (0: the default). |+| `memory_mb` | 6 | `uint64` | Memory in MiB (0: the default). |+| `disk_gb` | 7 | `uint32` | Disk in GiB for a VM (0: the image's). |+| `attach` | 8 | [`AttachRelayRequest`](/cua-sdk/reference/protocol/env-system#attachrelayrequest) | The relay machine the caller registered for this Space: the host attaches the new Space's driver to it (`SystemService.AttachRelay`), so the Space is reached as `relay:<machine_id>` and the host never holds an account credential. Empty when `direct` is set. |+| `direct` | 9 | `bool` | Create the Space without the relay (a host set up with `--direct`): it is reached at the host's address on `HostSpace.direct_port`, with `HostSpace.direct_token`. `attach` must be empty. |+| `create_key` | 10 | `string` | A key of the caller's for this create, under which `GetHostSpacesResponse.creating` lists its progress (a direct create has no relay machine to name it). Empty: `attach.machine_id`. |++### CreateHostSpaceResponse++Response for `HostSpacesService.CreateHostSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | [`HostSpace`](#hostspace) | The new Space. |++### DeleteHostSpaceRequest++Request for `HostSpacesService.DeleteHostSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | The relay machine of the Space (or its `local:<name>` on the host). |++### DeleteHostSpaceResponse++Response for `HostSpacesService.DeleteHostSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `message` | 1 | `string` | What happened, for people. |++### DeleteCloudSpaceRequest++Request for `HostSpacesService.DeleteCloudSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | The relay machine the cloud Space joined as. |++### DeleteCloudSpaceResponse++Response for `HostSpacesService.DeleteCloudSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `message` | 1 | `string` | What was deleted, for people. |++### CancelHostSpaceRequest++Request for `HostSpacesService.CancelHostSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | The relay machine the caller registered for the Space. |++### CancelHostSpaceResponse++Response for `HostSpacesService.CancelHostSpace`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `message` | 1 | `string` | What happened, for people: what was removed and what stays. |++### SetHostSpacePowerRequest++Request for `HostSpacesService.SetHostSpacePower`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `space` | 1 | `string` | The relay machine of the Space (or its `local:<name>` on the host). |+| `on` | 2 | `bool` | True turns it on, false off. |++### SetHostSpacePowerResponse++Response for `HostSpacesService.SetHostSpacePower`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `state` | 1 | `string` | "running", "suspended" or "stopped": the state it is in now. |+| `power` | 2 | `string` | How it turns off: "stop" or "suspend". |+| `message` | 3 | `string` | What happened, for people. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-system.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-system.mdxindex 93cbfe367f..54b2f6a6b1 100644--- a/docs/content/docs/cua-sdk/reference/protocol/env-system.mdx+++ b/docs/content/docs/cua-sdk/reference/protocol/env-system.mdx@@ -1,6 +1,6 @@----title: "System"-description: "cua.env.v1 SystemService: capabilities, init, health, shutdown, viewer tickets and relay attach."+title: "System, diagnostics and shared types"+description: "cua.env.v1 SystemService, the image self-test report, and the types every spacesd service shares: ErrorInfo, principals and geometry."---{/*@@ -10,9 +10,9 @@ description: "cua.env.v1 SystemService: capabilities, init, health, shutdown, viVersion: 0.5.0*/}-The handshake (`GetCapabilities`), session init, health, shutdown, viewer tickets and joining a relay (`AttachRelay`).+The handshake (`GetCapabilities`), session init, health, shutdown, viewer tickets and joining a relay (`AttachRelay`); the report of the image self-test (`SystemService.Diagnose` / `DiagnoseOnce`); and the shared types: errors (`google.rpc.Status` carrying `ErrorInfo`), principals and geometry.-Source: `libs/cua/proto/cua/env/v1/system.proto`.+Source: `libs/cua/proto/cua/env/v1/system.proto`, `libs/cua/proto/cua/env/v1/diagnose.proto`, `libs/cua/proto/cua/env/v1/common.proto`.## SystemService@@ -30,8 +30,8 @@ cua-spacesd at all (`sb.spacesd()`), and which features it may rely on.| [`Health`](#systemservicehealth) | [`HealthRequest`](#healthrequest) | [`HealthResponse`](#healthresponse) | unary || [`Metrics`](#systemservicemetrics) | [`MetricsRequest`](#metricsrequest) | [`MetricsResponse`](#metricsresponse) | unary || [`Shutdown`](#systemserviceshutdown) | [`ShutdownRequest`](#shutdownrequest) | [`ShutdownResponse`](#shutdownresponse) | unary |-| [`Diagnose`](#systemservicediagnose) | [`DiagnoseRequest`](/cua-sdk/reference/protocol/env-diagnose#diagnoserequest) | [`DiagnoseResponse`](/cua-sdk/reference/protocol/env-diagnose#diagnoseresponse) | server stream |-| [`DiagnoseOnce`](#systemservicediagnoseonce) | [`DiagnoseOnceRequest`](/cua-sdk/reference/protocol/env-diagnose#diagnoseoncerequest) | [`DiagnoseOnceResponse`](/cua-sdk/reference/protocol/env-diagnose#diagnoseonceresponse) | unary |+| [`Diagnose`](#systemservicediagnose) | [`DiagnoseRequest`](#diagnoserequest) | [`DiagnoseResponse`](#diagnoseresponse) | server stream |+| [`DiagnoseOnce`](#systemservicediagnoseonce) | [`DiagnoseOnceRequest`](#diagnoseoncerequest) | [`DiagnoseOnceResponse`](#diagnoseonceresponse) | unary || [`CreateViewerTicket`](#systemservicecreateviewerticket) | [`CreateViewerTicketRequest`](#createviewerticketrequest) | [`CreateViewerTicketResponse`](#createviewerticketresponse) | unary || [`AttachRelay`](#systemserviceattachrelay) | [`AttachRelayRequest`](#attachrelayrequest) | [`AttachRelayResponse`](#attachrelayresponse) | unary || [`DetachRelay`](#systemservicedetachrelay) | [`DetachRelayRequest`](#detachrelayrequest) | [`DetachRelayResponse`](#detachrelayresponse) | unary |@@ -70,7 +70,7 @@ Stops or restarts the driver, or powers off or reboots the guest.### SystemService.Diagnose-`/cua.env.v1.SystemService/Diagnose`, server stream: [`DiagnoseRequest`](/cua-sdk/reference/protocol/env-diagnose#diagnoserequest) to [`DiagnoseResponse`](/cua-sdk/reference/protocol/env-diagnose#diagnoseresponse).+`/cua.env.v1.SystemService/Diagnose`, server stream: [`DiagnoseRequest`](#diagnoserequest) to [`DiagnoseResponse`](#diagnoseresponse).Runs the image self-test (the checks of `cua-spacesd doctor`) andstreams each check as it finishes, then the report. Requires the token@@ -78,7 +78,7 @@ even in bootstrap modes: the report names paths, versions and units.### SystemService.DiagnoseOnce-`/cua.env.v1.SystemService/DiagnoseOnce`, unary: [`DiagnoseOnceRequest`](/cua-sdk/reference/protocol/env-diagnose#diagnoseoncerequest) to [`DiagnoseOnceResponse`](/cua-sdk/reference/protocol/env-diagnose#diagnoseonceresponse).+`/cua.env.v1.SystemService/DiagnoseOnce`, unary: [`DiagnoseOnceRequest`](#diagnoseoncerequest) to [`DiagnoseOnceResponse`](#diagnoseonceresponse).`Diagnose` as one unary call returning only the final report, forclients that cannot read server streams.@@ -133,7 +133,7 @@ Response for `SystemService.GetCapabilities`.| `runtime_detail` | 6 | `string` | Free-form runtime detail (for example "runsc 20260901" or "kubevirt 1.4 / qemu 9.1"). || `arch` | 7 | [`Architecture`](#architecture) | Guest CPU architecture. || `display_server` | 8 | [`DisplayServer`](#displayserver) | The graphical session type, or `DISPLAY_SERVER_NONE` when headless. |-| `displays` | 9 | repeated [`Display`](/cua-sdk/reference/protocol/env-common#display) | Displays attached to the guest desktop. Empty when headless. |+| `displays` | 9 | repeated [`Display`](#display) | Displays attached to the guest desktop. Empty when headless. || `features` | 10 | repeated [`Feature`](#feature) | Every feature the driver knows about, supported or not. Unsupported features carry a `limitation`. See `Feature` for canonical names. || `hostname` | 11 | `string` | Guest hostname. || `initialized` | 12 | `bool` | True once `Init` has succeeded at least once since the driver started. |@@ -326,7 +326,7 @@ Request for `SystemService.CreateViewerTicket`.| `clipboard` | 3 | `bool` | Allow `ComputerService.GetClipboard` and `SetClipboard`. || `files_root` | 4 | `string` | Guest directory the viewer may read and write through `FilesystemService` (drag-and-drop uploads and folder sharing). Empty means no file access. `~` is the desktop user's home. || `audio_uplink` | 5 | `bool` | Allow a microphone uplink track (still subject to `InitRequest.audio_uplink`). |-| `principal` | 6 | [`Principal`](/cua-sdk/reference/protocol/env-common#principal) | Who is viewing, shown to other participants. The id is prefixed with `viewer:` by the server. |+| `principal` | 6 | [`Principal`](#principal) | Who is viewing, shown to other participants. The id is prefixed with `viewer:` by the server. |### CreateViewerTicketResponse@@ -457,3 +457,389 @@ What `SystemService.Shutdown` stops.| `SHUTDOWN_MODE_DRIVER_RESTART` | 2 | Restart the driver in place (re-exec). || `SHUTDOWN_MODE_GUEST_POWEROFF` | 3 | Power off the guest. || `SHUTDOWN_MODE_GUEST_REBOOT` | 4 | Reboot the guest. |++## Types in `cua/env/v1/diagnose.proto`++### DiagnoseOptions++Options shared by `Diagnose` and `DiagnoseOnce`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `strict` | 1 | `bool` | Treat warnings (and skips not allowed by the manifest) as failures. |+| `only` | 2 | repeated `string` | Run only checks whose id equals, or starts with `<entry>.`, one of these (for example "stream" or "auth.token_file"). Empty runs all. |+| `skip` | 3 | repeated `string` | Skip checks matched the same way as `only`. |+| `effects` | 4 | [`DiagnoseEffects`](#diagnoseeffects) | Which checks may change guest state. Unspecified means `NONE`. |+| `expect_manifest` | 5 | `bytes` | A manifest (JSON, same schema as `/etc/cua-image/manifest.json`) to check against instead of the one baked into the image. Empty uses the image's own. |+| `timeout` | 6 | `google.protobuf.Duration` | Overall budget. Unset means 120 seconds. Checks still running when it expires fail with a timeout. |+| `host_time` | 7 | `google.protobuf.Timestamp` | The caller's wall clock, for the clock-skew check. Unset skips the comparison. |++### DiagnoseRequest++Request for `SystemService.Diagnose`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `options` | 1 | [`DiagnoseOptions`](#diagnoseoptions) | What to run. |++### DiagnoseResponse++One event of `SystemService.Diagnose`: `started`, then `check`, for each+check, and a final `report`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `started` | 1 | [`DiagnoseCheckStarted`](#diagnosecheckstarted) (oneof `event`) | A check began. |+| `check` | 2 | [`DiagnoseCheck`](#diagnosecheck) (oneof `event`) | A check finished. |+| `report` | 3 | [`DiagnoseReport`](#diagnosereport) (oneof `event`) | The run finished. Always the last message. |++### DiagnoseCheckStarted++A check began.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Check id, for example "stream.encode.openh264". |+| `group` | 2 | `string` | Check group, the id's first segment. |++### DiagnoseOnceRequest++Request for `SystemService.DiagnoseOnce`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `options` | 1 | [`DiagnoseOptions`](#diagnoseoptions) | What to run. |++### DiagnoseOnceResponse++Response for `SystemService.DiagnoseOnce`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `report` | 1 | [`DiagnoseReport`](#diagnosereport) | The final report. |++### DiagnoseCheck++The result of one check.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Stable id, `<group>.<name>[.<detail>]`. |+| `group` | 2 | `string` | Group, the id's first segment (for example "auth"). |+| `status` | 3 | [`CheckStatus`](#checkstatus) | Outcome after severity is applied. |+| `severity` | 4 | [`CheckSeverity`](#checkseverity) | Severity from the manifest. |+| `claimed_by` | 5 | repeated `string` | Manifest claims that make this check matter, for example "feature:desktop_stream" or "auth_mode:local". |+| `message` | 6 | `string` | What happened, in one line. |+| `remediation` | 7 | `string` | What to do about a warning or failure. Empty on pass. |+| `duration_ms` | 8 | `uint32` | Wall time of the check in milliseconds. |+| `facts` | 9 | map of `string` to `string` | Measured values (for example {"backend": "openh264", "psnr_db": "41.2"}). |+| `artifacts` | 10 | repeated [`DiagnoseArtifact`](#diagnoseartifact) | Evidence files. |++### DiagnoseArtifact++Evidence produced by a check.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | File name, unique within the report (for example "screenshot.display0.png"). |+| `media_type` | 2 | `string` | Media type, for example "image/png". |+| `data` | 3 | `bytes` | Contents, when small enough to inline (at most 1 MiB). Empty otherwise. |+| `path` | 4 | `string` | Where the full file was written in the guest. Empty when not written. |++### DiagnoseReport++The whole report.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `schema_version` | 1 | `uint32` | Report schema version. Always 1 for this message. |+| `spacesd` | 2 | [`DiagnoseSpacesd`](#diagnosespacesd) | The daemon that ran the checks. Unset when a shim produced the report for an image without cua-spacesd. |+| `image` | 3 | [`DiagnoseImage`](#diagnoseimage) | The image under test. |+| `environment` | 4 | [`DiagnoseEnvironment`](#diagnoseenvironment) | Where the guest runs. |+| `summary` | 5 | [`DiagnoseSummary`](#diagnosesummary) | Totals. |+| `checks` | 6 | repeated [`DiagnoseCheck`](#diagnosecheck) | Every check, in run order. |+| `fidelity` | 7 | [`DiagnoseFidelity`](#diagnosefidelity) | Facts that make a task behave differently between variants of one image. Compared key by key by the eval-parity lane. |+| `producer` | 8 | `string` | What produced the report: "cua-spacesd", or "cua-doctor-shim/<target>". |+| `started_at` | 9 | `google.protobuf.Timestamp` | When the run started. |++### DiagnoseSpacesd++The daemon that ran the checks.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `version` | 1 | `string` | cua-spacesd version. |+| `protocol_revision` | 2 | `uint32` | `cua.env.v1` protocol revision it serves. |+| `git_sha` | 3 | `string` | Source revision of the build, when known. |+| `cua_driver_version` | 4 | `string` | Version of the linked cua-driver core. |++### DiagnoseImage++The image under test.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `name` | 1 | `string` | Image name from the manifest, for example "linux". |+| `ref` | 2 | `string` | Reference the image was built as, when the manifest records it. |+| `variant` | 3 | `string` | "rootfs" (container) or "containerdisk" (VM). |+| `os` | 4 | `string` | "linux", "windows" or "macos". |+| `manifest_sha256` | 5 | `string` | SHA-256 of the manifest the checks ran against. Empty without one. |+| `manifest_source` | 6 | `string` | Where the manifest came from: a guest path, "request", or empty when there is none. |++### DiagnoseEnvironment++Where the guest runs.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `runtime` | 1 | `string` | Runtime: "container", "gvisor", "qemu", "kubevirt", "lume", "hyperv", "bare" or "unknown". |+| `runtime_detail` | 2 | `string` | Free-form runtime detail, for example "runsc". |+| `arch` | 3 | `string` | "x86_64" or "arm64". |+| `init` | 4 | `string` | Init system: "systemd", "supervisord", "launchd", "scm" or "unknown". |+| `display_server` | 5 | `string` | "x11", "wayland", "quartz", "win32" or "none". |+| `os` | 6 | `string` | OS name and version, for example "Ubuntu 24.04". |++### DiagnoseSummary++Totals of a report.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `status` | 1 | [`CheckStatus`](#checkstatus) | Worst outcome: fail if any check failed, warn if any warned (fail under `strict`), else pass. |+| `pass` | 2 | `uint32` | Passed checks. |+| `warn` | 3 | `uint32` | Warnings. |+| `fail` | 4 | `uint32` | Failures. |+| `skip` | 5 | `uint32` | Skipped checks. |+| `duration_ms` | 6 | `uint32` | Wall time of the whole run in milliseconds. |+| `strict` | 7 | `bool` | True when the run used `strict`. |++### DiagnoseFidelity++Facts that change how a task behaves. Every key is always present; an+unknown value is the empty string.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `display` | 1 | `string` | Primary display, "<width>x<height>@<scale>". |+| `fonts_sha256` | 2 | `string` | SHA-256 over the sorted list of installed font files. |+| `tz` | 3 | `string` | Time zone name. |+| `locale` | 4 | `string` | Locale, for example "C.UTF-8". |+| `clock_skew_ms` | 5 | `int64` | Guest clock minus the caller's clock, in milliseconds. 0 when the caller sent no `host_time`. |+| `encoder` | 6 | `string` | Video encoder the stream would use, for example "openh264". |+| `a11y_backend` | 7 | `string` | Accessibility backend, for example "atspi". |+| `audio_backend` | 8 | `string` | Audio backend, for example "pipewire". |+| `cpu_model` | 9 | `string` | CPU model string. |+| `cpu_count` | 10 | `uint32` | Logical CPUs. |+| `memory_mib` | 11 | `uint64` | Total memory in MiB. |+| `gpu` | 12 | `string` | GPU description, or "none". |+| `kernel` | 13 | `string` | Kernel release. |+| `runtime` | 14 | `string` | Runtime, as in `DiagnoseEnvironment.runtime`. |+| `init` | 15 | `string` | Init system, as in `DiagnoseEnvironment.init`. |+| `packages_sha256` | 16 | `string` | SHA-256 over the installed package list (name and version). |+| `app_versions` | 17 | map of `string` to `string` | Versions of the apps the manifest lists (for example {"firefox": "130.0"}). |+| `tool_versions` | 18 | map of `string` to `string` | Versions of the tools the manifest lists (dev tiers, for example {"node": "v22.20.0"}). |+| `simulator_runtimes` | 19 | repeated `string` | Available simulator runtimes, sorted (for example "iOS 26.0"). Empty unless the manifest claims some. |++### DiagnoseEffects++Which checks may act on the guest.++| Value | # | Description |+| --- | --- | --- |+| `DIAGNOSE_EFFECTS_UNSPECIFIED` | 0 | Not set. Same as `DIAGNOSE_EFFECTS_NONE`. |+| `DIAGNOSE_EFFECTS_NONE` | 1 | Read-only checks. Input, window and fixture checks are skipped. |+| `DIAGNOSE_EFFECTS_VIRTUAL_ONLY` | 2 | Effectful checks run, but only against fixture windows the doctor itself launched on the guest's virtual display. Refused on bare hosts. |++### CheckStatus++Outcome of one check.++| Value | # | Description |+| --- | --- | --- |+| `CHECK_STATUS_UNSPECIFIED` | 0 | Not reported. |+| `CHECK_STATUS_PASS` | 1 | Works as claimed. |+| `CHECK_STATUS_WARN` | 2 | Works with a caveat, or something unclaimed is off. |+| `CHECK_STATUS_FAIL` | 3 | Broken. |+| `CHECK_STATUS_SKIP` | 4 | Not run; `message` says why. |++### CheckSeverity++How much a check matters for this image, derived from the manifest.++| Value | # | Description |+| --- | --- | --- |+| `CHECK_SEVERITY_UNSPECIFIED` | 0 | Not reported. |+| `CHECK_SEVERITY_REQUIRED` | 1 | The image claims it: a failure fails the report. |+| `CHECK_SEVERITY_RECOMMENDED` | 2 | Optional in the manifest: a failure is reported as a warning. |+| `CHECK_SEVERITY_INFO` | 3 | Not claimed: a failure is reported as a warning. |++## Types in `cua/env/v1/common.proto`++### Point++A point in a two-dimensional coordinate space. Which space is always stated+by the enclosing message (see `CoordinateSpace`).++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `x` | 1 | `double` | Horizontal coordinate, growing to the right. |+| `y` | 2 | `double` | Vertical coordinate, growing downward. |++### Rect++An axis-aligned rectangle in a coordinate space stated by the enclosing+message.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `x` | 1 | `double` | Left edge. |+| `y` | 2 | `double` | Top edge. |+| `width` | 3 | `double` | Width. Never negative. |+| `height` | 4 | `double` | Height. Never negative. |++### PixelSize++A size in device (physical) pixels.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `width` | 1 | `uint32` | Width in pixels. |+| `height` | 2 | `uint32` | Height in pixels. |++### WindowRef++Opaque, server-issued reference to a window.++Native window identifiers (CGWindowID, HWND, X11 Window, portal tokens) are+never exposed. `id` stays stable for the life of the native window. `epoch`+changes whenever the server recycles an `id` or the window's identity is no+longer trustworthy (for example, the owning process restarted). A request+with a stale epoch fails with FAILED_PRECONDITION and+`ERROR_REASON_STALE_HANDLE`.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Opaque window identifier. Compare only for equality. |+| `epoch` | 2 | `uint64` | Identity generation of `id`. |++### Display++A display (monitor) attached to the guest desktop.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Opaque, stable display identifier. The alias "primary" is accepted wherever a display id is expected. |+| `name` | 2 | `string` | Human-readable name, for example "Built-in Retina Display" or "XVFB-0". |+| `primary` | 3 | `bool` | True for the primary display. |+| `bounds` | 4 | [`Rect`](#rect) | Display bounds in global logical points (`COORDINATE_SPACE_SCREEN`). |+| `native_size` | 5 | [`PixelSize`](#pixelsize) | Size of the display's framebuffer in physical pixels. |+| `scale_factor` | 6 | `double` | Physical pixels per logical point (for example 2.0 on Retina, 1.0 on most Linux framebuffers). |+| `refresh_rate_hz` | 7 | `uint32` | Nominal refresh rate in hertz, 0 when unknown (for example Xvfb). |+| `rotation_degrees` | 8 | `uint32` | Clockwise rotation in degrees: 0, 90, 180 or 270. |++### DeliveryReport++What the server actually did for an input or action request.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `delivery` | 1 | [`Delivery`](#delivery) | The delivery mode that was used. Never `DELIVERY_AUTO` or unspecified. |+| `focus_changed` | 2 | `bool` | True if the focused window or frontmost app changed as a result. |+| `pointer_moved` | 3 | `bool` | True if the user-visible pointer moved as a result. |+| `detail` | 4 | `string` | Free-form, human-readable note (for example which platform path was used). Not for programmatic use. |++### Principal++Who is making a call. Sent as serialized bytes in the `x-cua-principal-bin`+metadata entry.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `id` | 1 | `string` | Stable identifier chosen by the client (for example a user id or an agent run id). |+| `display_name` | 2 | `string` | Name shown to other participants. |+| `color` | 3 | `string` | Preferred cursor color as `#RRGGBB`. The server may substitute a different color to keep participants distinguishable. |+| `kind` | 4 | [`PrincipalKind`](#principalkind) | Whether the principal is a human or an automated agent. |++### ErrorInfo++Machine-readable error detail, packed as `google.protobuf.Any` inside the+`google.rpc.Status` in the `grpc-status-details-bin` trailer.++| Field | # | Type | Description |+| --- | --- | --- | --- |+| `reason` | 1 | [`ErrorReason`](#errorreason) | The specific reason. More precise than the gRPC status code. |+| `message` | 2 | `string` | Human-readable description. Not for programmatic use. |+| `feature` | 3 | `string` | Capability feature name involved, when `reason` is `ERROR_REASON_FEATURE_UNSUPPORTED` (for example "a11y"). |+| `metadata` | 4 | map of `string` to `string` | Structured context. Well-known keys: "expected_sequence", "expected_offset", "path", "pid", "tag", "retry_after_ms". |++### KeepAlive++Periodic empty message sent on long-lived server streams so proxies (the+Fleet gateway, load balancers) do not time out an idle stream. Clients+ignore it apart from resetting their own liveness timers.++No fields.++### CoordinateSpace++The coordinate space a `Point` or `Rect` is expressed in.++| Value | # | Description |+| --- | --- | --- |+| `COORDINATE_SPACE_UNSPECIFIED` | 0 | Not set. Servers treat it as `COORDINATE_SPACE_SCREEN`. |+| `COORDINATE_SPACE_SCREEN` | 1 | Global desktop space in logical points, origin at the top-left of the primary display. This is the space `Display.bounds` uses. |+| `COORDINATE_SPACE_WINDOW` | 2 | Logical points relative to the top-left corner of the target window's frame. Requires a target window on the request. |+| `COORDINATE_SPACE_SCREENSHOT` | 3 | Pixels of a screenshot previously returned by `ComputerService.Screenshot`, identified by `screenshot_id` on the request. The server performs the one conversion to native coordinates and fails with `ERROR_REASON_STALE_GEOMETRY` if the display or window geometry changed since the screenshot was taken. |+| `COORDINATE_SPACE_NORMALIZED` | 4 | Normalized coordinates in [0, 1] relative to the target window, or the target display when no window is given. |++### Delivery++How synthetic input or an action is delivered to the guest.++| Value | # | Description |+| --- | --- | --- |+| `DELIVERY_UNSPECIFIED` | 0 | Not set. Servers treat it as `DELIVERY_AUTO`. |+| `DELIVERY_AUTO` | 1 | Prefer background delivery and fall back to foreground delivery when the platform or target cannot receive background input. |+| `DELIVERY_BACKGROUND` | 2 | Deliver without moving the user-visible pointer, changing the focused window or activating the target app. Fails with `ERROR_REASON_WOULD_REQUIRE_ACTIVATION` rather than falling back. |+| `DELIVERY_FOREGROUND` | 3 | Activate the target (if any) and deliver through the global input stream, moving the real pointer and focus. |++### PrincipalKind++Kind of principal behind a call.++| Value | # | Description |+| --- | --- | --- |+| `PRINCIPAL_KIND_UNSPECIFIED` | 0 | Not set. Servers treat it as `PRINCIPAL_KIND_HUMAN`. |+| `PRINCIPAL_KIND_HUMAN` | 1 | A person driving a client UI. |+| `PRINCIPAL_KIND_AGENT` | 2 | An automated agent. |++### ErrorReason++Machine-readable error reasons shared by every service.++| Value | # | Description |+| --- | --- | --- |+| `ERROR_REASON_UNSPECIFIED` | 0 | Not set. |+| `ERROR_REASON_UNAUTHENTICATED` | 1 | Missing or wrong bearer token, or an expired ticket. |+| `ERROR_REASON_FEATURE_UNSUPPORTED` | 2 | The operation needs a feature the guest does not support. See `ErrorInfo.feature` and `SystemService.GetCapabilities`. |+| `ERROR_REASON_PERMISSION_DENIED` | 3 | The guest OS denied permission (for example macOS TCC, UAC, AT-SPI disabled). |+| `ERROR_REASON_STALE_HANDLE` | 4 | A `WindowRef` epoch no longer matches. |+| `ERROR_REASON_STALE_GEOMETRY` | 5 | Geometry changed since the referenced screenshot or media frame. |+| `ERROR_REASON_STALE_SNAPSHOT` | 6 | An accessibility element's snapshot is no longer current. |+| `ERROR_REASON_WOULD_REQUIRE_ACTIVATION` | 7 | `DELIVERY_BACKGROUND` was requested but only foreground delivery could reach the target. |+| `ERROR_REASON_TARGET_UNAVAILABLE` | 8 | The target window, app, display or element is gone. |+| `ERROR_REASON_DELIVERY_FAILED` | 9 | The platform accepted the request but native delivery failed. |+| `ERROR_REASON_PROCESS_NOT_FOUND` | 10 | No process matches the given pid or tag. |+| `ERROR_REASON_PATH_NOT_FOUND` | 11 | The path does not exist. |+| `ERROR_REASON_PATH_EXISTS` | 12 | The path already exists and overwrite was not requested. |+| `ERROR_REASON_NOT_A_DIRECTORY` | 13 | A directory was required. |+| `ERROR_REASON_IS_A_DIRECTORY` | 14 | A regular file was required. |+| `ERROR_REASON_DISK_FULL` | 15 | The guest disk is full (HTTP 507 on the `/files` route). |+| `ERROR_REASON_CHECKSUM_MISMATCH` | 16 | Received content does not match the declared SHA-256. |+| `ERROR_REASON_SESSION_NOT_FOUND` | 17 | Unknown or expired upload, transfer, watcher, media session or forward. |+| `ERROR_REASON_OFFSET_MISMATCH` | 18 | A chunk arrived at the wrong offset. `metadata["expected_offset"]` holds the offset the server expects next. |+| `ERROR_REASON_SEQUENCE_GAP` | 19 | A sequenced input chunk skipped ahead. `metadata["expected_sequence"]` holds the sequence the server expects next. |+| `ERROR_REASON_RATE_LIMITED` | 20 | Too many requests. `metadata["retry_after_ms"]` may hint a delay. |+| `ERROR_REASON_LIMIT_EXCEEDED` | 21 | A request limit was exceeded (chunk size, message size, tree depth). |+| `ERROR_REASON_NOT_INITIALIZED` | 22 | `SystemService.Init` has not configured a required default yet. |+| `ERROR_REASON_INTERNAL` | 23 | An internal server error. Report a bug. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-teleport-tunnel.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-teleport-tunnel.mdxdeleted file mode 100644index 517dc145d2..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/env-teleport-tunnel.mdx+++ /dev/null@@ -1,626 +0,0 @@-----title: "Teleport, tunnels and the volume"-description: "cua.env.v1 TeleportService, TunnelService and VolumeService: receiving teleported sessions and files, port forwards, hotspots and the guest mount of Cua Volume."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--The receiving side of teleport (sending lives in the cua SDK), TCP port forwards, the reverse-SOCKS hotspot, and the guest mount of Cua Volume served by the client.--Source: `libs/cua/proto/cua/env/v1/teleport.proto`, `libs/cua/proto/cua/env/v1/tunnel.proto`, `libs/cua/proto/cua/env/v1/volume.proto`.--## TeleportService--`cua.env.v1.TeleportService`--Receiving side of "teleport": moving an app session (browser profile-cookies and storage, editor state) or a set of files from a user's-machine into the guest.--The approval gate (biometric or explicit user consent for sensitive items)-lives on the sending side, in the SDK; the guest never pulls. All uploads-are unary chunks so browsers on gRPC-Web can send them.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`GetManifest`](#teleportservicegetmanifest) | [`GetManifestRequest`](#getmanifestrequest) | [`GetManifestResponse`](#getmanifestresponse) | unary |-| [`ImportSession`](#teleportserviceimportsession) | [`ImportSessionRequest`](#importsessionrequest) | [`ImportSessionResponse`](#importsessionresponse) | unary |-| [`BeginReceiveFiles`](#teleportservicebeginreceivefiles) | [`BeginReceiveFilesRequest`](#beginreceivefilesrequest) | [`BeginReceiveFilesResponse`](#beginreceivefilesresponse) | unary |-| [`ReceiveFilesChunk`](#teleportservicereceivefileschunk) | [`ReceiveFilesChunkRequest`](#receivefileschunkrequest) | [`ReceiveFilesChunkResponse`](#receivefileschunkresponse) | unary |-| [`CommitReceiveFiles`](#teleportservicecommitreceivefiles) | [`CommitReceiveFilesRequest`](#commitreceivefilesrequest) | [`CommitReceiveFilesResponse`](#commitreceivefilesresponse) | unary |-| [`AbortReceiveFiles`](#teleportserviceabortreceivefiles) | [`AbortReceiveFilesRequest`](#abortreceivefilesrequest) | [`AbortReceiveFilesResponse`](#abortreceivefilesresponse) | unary |-| [`WipeImport`](#teleportservicewipeimport) | [`WipeImportRequest`](#wipeimportrequest) | [`WipeImportResponse`](#wipeimportresponse) | unary |--### TeleportService.GetManifest--`/cua.env.v1.TeleportService/GetManifest`, unary: [`GetManifestRequest`](#getmanifestrequest) to [`GetManifestResponse`](#getmanifestresponse).--Describes what the guest can accept for an app: whether the provider-exists, whether the app is installed or running, and which bundle-format version to send.--### TeleportService.ImportSession--`/cua.env.v1.TeleportService/ImportSession`, unary: [`ImportSessionRequest`](#importsessionrequest) to [`ImportSessionResponse`](#importsessionresponse).--Uploads an rcdp-app-session bundle in offset-addressed chunks and, on-the final chunk, verifies and imports it. Resumable: resend from the-returned `received_bytes`.--### TeleportService.BeginReceiveFiles--`/cua.env.v1.TeleportService/BeginReceiveFiles`, unary: [`BeginReceiveFilesRequest`](#beginreceivefilesrequest) to [`BeginReceiveFilesResponse`](#beginreceivefilesresponse).--Starts a file transfer into the guest's Downloads folder by declaring-its manifest. Entries matching ignore rules are dropped here.--### TeleportService.ReceiveFilesChunk--`/cua.env.v1.TeleportService/ReceiveFilesChunk`, unary: [`ReceiveFilesChunkRequest`](#receivefileschunkrequest) to [`ReceiveFilesChunkResponse`](#receivefileschunkresponse).--Uploads one chunk of one declared file.--### TeleportService.CommitReceiveFiles--`/cua.env.v1.TeleportService/CommitReceiveFiles`, unary: [`CommitReceiveFilesRequest`](#commitreceivefilesrequest) to [`CommitReceiveFilesResponse`](#commitreceivefilesresponse).--Verifies every file's SHA-256 and publishes the transfer atomically.--### TeleportService.AbortReceiveFiles--`/cua.env.v1.TeleportService/AbortReceiveFiles`, unary: [`AbortReceiveFilesRequest`](#abortreceivefilesrequest) to [`AbortReceiveFilesResponse`](#abortreceivefilesresponse).--Discards a transfer.--### TeleportService.WipeImport--`/cua.env.v1.TeleportService/WipeImport`, unary: [`WipeImportRequest`](#wipeimportrequest) to [`WipeImportResponse`](#wipeimportresponse).--Removes what a committed import left in the guest: every file and-directory it created and every Keychain item it installed, as recorded-in the import's ledger. Guests that support it advertise the feature-"teleport.wipe". An unknown `import_id` is `NOT_FOUND`.--## TunnelService--`cua.env.v1.TunnelService`--Network tunnels between a client and the guest, carried over WebSocket-upgrades on the spacesd port so they work through the Fleet gateway,-the relay and gRPC-Web-only networks.--- `Forward`: client-to-guest TCP. Each WebSocket connection to- `ws_path` becomes one TCP connection to the guest port; binary frames- carry the byte stream in both directions.-- Hotspot: guest-to-client egress (reverse SOCKS5). A SOCKS5 listener on- guest loopback relays each outbound connection over the client's- WebSocket, and the client dials it from its own network. Replaces the- unauthenticated rcdp-socks.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`Forward`](#tunnelserviceforward) | [`ForwardRequest`](#forwardrequest) | [`ForwardResponse`](#forwardresponse) | unary |-| [`ListForwards`](#tunnelservicelistforwards) | [`ListForwardsRequest`](#listforwardsrequest) | [`ListForwardsResponse`](#listforwardsresponse) | unary |-| [`CloseForward`](#tunnelservicecloseforward) | [`CloseForwardRequest`](#closeforwardrequest) | [`CloseForwardResponse`](#closeforwardresponse) | unary |-| [`StartHotspot`](#tunnelservicestarthotspot) | [`StartHotspotRequest`](#starthotspotrequest) | [`StartHotspotResponse`](#starthotspotresponse) | unary |-| [`StopHotspot`](#tunnelservicestophotspot) | [`StopHotspotRequest`](#stophotspotrequest) | [`StopHotspotResponse`](#stophotspotresponse) | unary |-| [`GetHotspotStatus`](#tunnelservicegethotspotstatus) | [`GetHotspotStatusRequest`](#gethotspotstatusrequest) | [`GetHotspotStatusResponse`](#gethotspotstatusresponse) | unary |--### TunnelService.Forward--`/cua.env.v1.TunnelService/Forward`, unary: [`ForwardRequest`](#forwardrequest) to [`ForwardResponse`](#forwardresponse).--Authorizes TCP forwarding to a guest port and returns the WebSocket to-connect to.--### TunnelService.ListForwards--`/cua.env.v1.TunnelService/ListForwards`, unary: [`ListForwardsRequest`](#listforwardsrequest) to [`ListForwardsResponse`](#listforwardsresponse).--Lists active forwards.--### TunnelService.CloseForward--`/cua.env.v1.TunnelService/CloseForward`, unary: [`CloseForwardRequest`](#closeforwardrequest) to [`CloseForwardResponse`](#closeforwardresponse).--Revokes a forward and closes its connections.--### TunnelService.StartHotspot--`/cua.env.v1.TunnelService/StartHotspot`, unary: [`StartHotspotRequest`](#starthotspotrequest) to [`StartHotspotResponse`](#starthotspotresponse).--Starts the reverse-SOCKS hotspot for the calling client.--### TunnelService.StopHotspot--`/cua.env.v1.TunnelService/StopHotspot`, unary: [`StopHotspotRequest`](#stophotspotrequest) to [`StopHotspotResponse`](#stophotspotresponse).--Stops the hotspot.--### TunnelService.GetHotspotStatus--`/cua.env.v1.TunnelService/GetHotspotStatus`, unary: [`GetHotspotStatusRequest`](#gethotspotstatusrequest) to [`GetHotspotStatusResponse`](#gethotspotstatusresponse).--Reports hotspot state and counters.--## VolumeService--`cua.env.v1.VolumeService`--Cua Volume in the guest: the Space's view of the user's volume, mounted-at a fixed path and served by the client (the host that runs the volume).--The client calls `AttachVolume` and opens the returned WebSocket-(`/volume`, ticket-authenticated), which it keeps open. Once it is-attached, cua-spacesd mounts the volume in the guest; the mount's traffic-travels as tunnel streams over that socket (the frame format of the-hotspot, `OPEN` carrying the target `nfs` or `fs`), and the client-answers them from its own copy of the volume, scoped to this Space. The-guest never holds storage keys and never has a network path to the-client. The mount goes away when the socket closes or on-`DetachVolume`.--| Guest | Backend | Mount path |-|---|---|---|-| macOS | `nfs`: the system NFS client | `~/Cua Volume` |-| Linux | `fs`: FUSE (the file operations protocol) | `/volume`, else `~/Cua Volume` |-| Windows | not yet: a preview (`nfs`, Client for NFS, on `V:\`) is off unless the guest sets `CUA_VOLUME_WINDOWS_PREVIEW=1` | |--On Windows a `mount_path` that is not a drive (for example-`C:\Users\<user>\Cua Volume`) becomes a directory symbolic link to the-drive the volume mounts on.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`AttachVolume`](#volumeserviceattachvolume) | [`AttachVolumeRequest`](#attachvolumerequest) | [`AttachVolumeResponse`](#attachvolumeresponse) | unary |-| [`DetachVolume`](#volumeservicedetachvolume) | [`DetachVolumeRequest`](#detachvolumerequest) | [`DetachVolumeResponse`](#detachvolumeresponse) | unary |-| [`GetVolumeStatus`](#volumeservicegetvolumestatus) | [`GetVolumeStatusRequest`](#getvolumestatusrequest) | [`GetVolumeStatusResponse`](#getvolumestatusresponse) | unary |--### VolumeService.AttachVolume--`/cua.env.v1.VolumeService/AttachVolume`, unary: [`AttachVolumeRequest`](#attachvolumerequest) to [`AttachVolumeResponse`](#attachvolumeresponse).--Prepares a mount and returns the WebSocket the client attaches.--### VolumeService.DetachVolume--`/cua.env.v1.VolumeService/DetachVolume`, unary: [`DetachVolumeRequest`](#detachvolumerequest) to [`DetachVolumeResponse`](#detachvolumeresponse).--Unmounts and closes the socket.--### VolumeService.GetVolumeStatus--`/cua.env.v1.VolumeService/GetVolumeStatus`, unary: [`GetVolumeStatusRequest`](#getvolumestatusrequest) to [`GetVolumeStatusResponse`](#getvolumestatusresponse).--Reports the mount.--## Types in `cua/env/v1/teleport.proto`--### GetManifestRequest--Request for `TeleportService.GetManifest`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `app` | 1 | `string` | Provider / app id, for example "firefox", "chromium", "chrome", "vscode". Advertised as capability "teleport.<app>". |-| `scope` | 2 | [`TeleportScope`](#teleportscope) | Requested scope. |--### GetManifestResponse--Response for `TeleportService.GetManifest`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `supported` | 1 | `bool` | True if the guest has a provider for this app. |-| `limitation` | 2 | `string` | Why not, when unsupported. |-| `app_installed` | 3 | `bool` | True if the app is installed in the guest. |-| `app_running` | 4 | `bool` | True if the app is running. Importing may require closing it. |-| `bundle_version` | 5 | `uint32` | Bundle format version the sender must produce. |-| `scopes` | 6 | repeated [`TeleportScope`](#teleportscope) | Scopes this provider can import. |-| `supported_apps` | 7 | repeated `string` | Every app id the guest can import, for discovery. |--### ImportOptions--Options applied when an imported session is committed.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `replace_existing` | 1 | `bool` | Replace existing state instead of merging. |-| `close_running_app` | 2 | `bool` | Close the app (gracefully, then forcefully after 5 seconds) if it is running. |-| `launch_after` | 3 | `bool` | Launch the app after importing. |-| `expires_at_ms` | 4 | `uint64` | Unix time in milliseconds at which the guest wipes the import on its own, as `WipeImport` would. 0 means no expiry. Checked every 60 seconds and when the guest daemon starts, so an expiry survives restarts. |-| `broker_grant` | 5 | `string` | Set by the Cua Keyvault broker when it delivers a session it authorized (a consent grant, an unattended rule or a first-party approval), to `keyvault`; empty for a direct SDK send. Not a secret and not verified by the guest. cua-spacesd counts deliveries with and without it (present or absent) in its opt-in aggregate telemetry; nothing else reads it. |--### ImportSessionRequest--Request for `TeleportService.ImportSession`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `import_id` | 1 | `string` | Client-chosen import id, stable across retries. The first chunk (offset 0) creates the import. |-| `app` | 2 | `string` | App id as in `GetManifestRequest.app`. |-| `scope` | 3 | [`TeleportScope`](#teleportscope) | Scope of the bundle. |-| `offset` | 4 | `uint64` | Offset of `data[0]` in the bundle. Must equal `received_bytes`; a chunk wholly below it is acknowledged as a duplicate. |-| `data` | 5 | `bytes` | Bundle bytes. At most `Limits.max_chunk_bytes`. |-| `commit` | 6 | `bool` | True on the last chunk: verify and import. May carry data. |-| `sha256` | 7 | `string` | Lowercase hex SHA-256 of the whole bundle. Required when `commit`. |-| `options` | 8 | [`ImportOptions`](#importoptions) | Import options, read when `commit`. |--### ImportResult--Outcome of an import, returned on the final chunk.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `imported` | 1 | repeated `string` | Items imported (for example "cookies", "localStorage"). |-| `skipped` | 2 | repeated `string` | Items skipped, with reasons, as "item: reason". |-| `launched` | 3 | `bool` | True if the app was launched. |--### ImportSessionResponse--Response for `TeleportService.ImportSession`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `received_bytes` | 1 | `uint64` | Bundle bytes received so far. |-| `duplicate` | 2 | `bool` | True if the chunk was a retry and was not written again. |-| `result` | 3 | [`ImportResult`](#importresult) | Set on the final chunk once the import completed. |--### TransferEntry--One entry of a file transfer manifest.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `relative_path` | 1 | `string` | Path relative to the transfer root, "/"-separated. No "..", no absolute paths. |-| `directory` | 2 | `bool` | True for a directory (no content). |-| `size` | 3 | `uint64` | File size in bytes. |-| `sha256` | 4 | `string` | Lowercase hex SHA-256 of the file content. |-| `mode` | 5 | `uint32` | Unix permission bits. 0 means 0o644 (files) or 0o755 (directories). |-| `modified_at` | 6 | `google.protobuf.Timestamp` | Modification time to preserve. |--### BeginReceiveFilesRequest--Request for `TeleportService.BeginReceiveFiles`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `transfer_id` | 1 | `string` | Client-chosen transfer id, stable across retries. Repeating the call with the same id returns the current progress. |-| `destination_subdir` | 2 | `string` | Subdirectory of the guest user's Downloads folder to place the transfer in. Empty places entries directly in Downloads. |-| `entries` | 3 | repeated [`TransferEntry`](#transferentry) | All entries. Directories may be listed explicitly or implied by file paths. |-| `ignore_patterns` | 4 | repeated `string` | gitignore-syntax patterns applied relative to the transfer root. |-| `honor_gitignore` | 5 | `bool` | Also honor `.gitignore` files that are part of the transfer (their content must be uploaded first; the server evaluates them at commit). |-| `conflict_policy` | 6 | [`ConflictPolicy`](#conflictpolicy) | What to do with existing files. |-| `ttl` | 7 | `google.protobuf.Duration` | How long partial data is kept without progress. Unset means 1 hour. |--### TransferFileProgress--Progress of one file in a transfer.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `index` | 1 | `uint32` | Index into the accepted entries. |-| `received_bytes` | 2 | `uint64` | Bytes received. |--### BeginReceiveFilesResponse--Response for `TeleportService.BeginReceiveFiles`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `transfer_id` | 1 | `string` | The transfer id. |-| `accepted` | 2 | repeated [`TransferEntry`](#transferentry) | Entries that will be received, in the order indices refer to. |-| `ignored` | 3 | repeated `string` | Relative paths dropped by ignore patterns. |-| `progress` | 4 | repeated [`TransferFileProgress`](#transferfileprogress) | Progress per accepted file, for resuming. |-| `max_chunk_bytes` | 5 | `uint32` | Largest chunk accepted. |--### ReceiveFilesChunkRequest--Request for `TeleportService.ReceiveFilesChunk`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `transfer_id` | 1 | `string` | Which transfer. |-| `index` | 2 | `uint32` | Index into `BeginReceiveFilesResponse.accepted`. |-| `offset` | 3 | `uint64` | Offset of `data[0]` in that file. Must equal its received bytes; a chunk wholly below is a duplicate. |-| `data` | 4 | `bytes` | File bytes. At most `max_chunk_bytes`. |--### ReceiveFilesChunkResponse--Response for `TeleportService.ReceiveFilesChunk`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `received_bytes` | 1 | `uint64` | Bytes received for that file. |-| `duplicate` | 2 | `bool` | True if the chunk was a retry. |--### CommitReceiveFilesRequest--Request for `TeleportService.CommitReceiveFiles`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `transfer_id` | 1 | `string` | Which transfer. |--### ReceivedFile--A file placed by a committed transfer.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `path` | 1 | `string` | Final absolute guest path (after conflict renaming). |-| `size` | 2 | `uint64` | Size in bytes. |-| `sha256` | 3 | `string` | Verified lowercase hex SHA-256. |--### CommitReceiveFilesResponse--Response for `TeleportService.CommitReceiveFiles`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `destination` | 1 | `string` | Absolute guest path of the transfer root. |-| `files` | 2 | repeated [`ReceivedFile`](#receivedfile) | Files placed. |-| `skipped` | 3 | repeated `string` | Relative paths skipped by `CONFLICT_POLICY_SKIP` or by `.gitignore` rules evaluated at commit. |--### AbortReceiveFilesRequest--Request for `TeleportService.AbortReceiveFiles`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `transfer_id` | 1 | `string` | Which transfer. |--### AbortReceiveFilesResponse--Response for `TeleportService.AbortReceiveFiles`.--No fields.--### WipeImportRequest--Request for `TeleportService.WipeImport`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `import_id` | 1 | `string` | Import to wipe, as sent in `ImportSessionRequest.import_id`. Ignored when `all` is set. |-| `all` | 2 | `bool` | Wipe every ledgered import in the guest. |--### WipeImportResponse--Response for `TeleportService.WipeImport`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `wiped_import_ids` | 1 | repeated `string` | Import ids whose ledgers were wiped and removed. |-| `removed_paths` | 2 | repeated `string` | Absolute guest paths removed (files, and directories the import created). |-| `keychain_items_removed` | 3 | `uint32` | Keychain items removed (macOS guests; 0 elsewhere). |-| `cookie_rows_removed` | 4 | `uint32` | Cookie rows deleted out of an existing Cookies database the import merged into (not itself in removed_paths: it was not the import's file to remove). |--### TeleportScope--Which part of an app's state to teleport.--| Value | # | Description |-| --- | --- | --- |-| `TELEPORT_SCOPE_UNSPECIFIED` | 0 | Not set. Treated as `TELEPORT_SCOPE_SESSION`. |-| `TELEPORT_SCOPE_SESSION` | 1 | Sign-in state only: cookies, local storage, session storage. |-| `TELEPORT_SCOPE_PROFILE` | 2 | The whole profile: session plus history, bookmarks, extensions, settings. |--### ConflictPolicy--What to do when a received file already exists.--| Value | # | Description |-| --- | --- | --- |-| `CONFLICT_POLICY_UNSPECIFIED` | 0 | Not set. Treated as `CONFLICT_POLICY_RENAME`. |-| `CONFLICT_POLICY_RENAME` | 1 | Keep both: the new file becomes "name (1).ext". |-| `CONFLICT_POLICY_OVERWRITE` | 2 | Replace the existing file. |-| `CONFLICT_POLICY_SKIP` | 3 | Keep the existing file and drop the new one. |--## Types in `cua/env/v1/tunnel.proto`--### ForwardRequest--Request for `TunnelService.Forward`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `port` | 1 | `uint32` | Guest TCP port to reach. |-| `host` | 2 | `string` | Guest host to connect to. Empty means "127.0.0.1". Only loopback and the guest's own addresses are allowed. |-| `ttl` | 3 | `google.protobuf.Duration` | How long the ticket accepts new connections. Unset means 10 minutes; at most 24 hours. Open connections survive expiry. |--### ForwardResponse--Response for `TunnelService.Forward`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `forward_id` | 1 | `string` | Forward id. |-| `ticket` | 2 | `string` | Ticket accepted by the tunnel WebSocket. Reusable for many connections until expiry. |-| `ws_path` | 3 | `string` | WebSocket path relative to the spacesd base URL, including the ticket, for example "/tunnel?ticket=…". |-| `expires_at` | 4 | `google.protobuf.Timestamp` | When the ticket expires. |--### ForwardInfo--An active forward.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `forward_id` | 1 | `string` | Forward id. |-| `host` | 2 | `string` | Guest host. |-| `port` | 3 | `uint32` | Guest port. |-| `active_connections` | 4 | `uint32` | Open connections. |-| `bytes_in` | 5 | `uint64` | Bytes sent to the guest port. |-| `bytes_out` | 6 | `uint64` | Bytes received from the guest port. |-| `expires_at` | 7 | `google.protobuf.Timestamp` | Ticket expiry. |--### ListForwardsRequest--Request for `TunnelService.ListForwards`.--No fields.--### ListForwardsResponse--Response for `TunnelService.ListForwards`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `forwards` | 1 | repeated [`ForwardInfo`](#forwardinfo) | Active forwards. |--### CloseForwardRequest--Request for `TunnelService.CloseForward`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `forward_id` | 1 | `string` | Which forward. |--### CloseForwardResponse--Response for `TunnelService.CloseForward`.--No fields.--### StartHotspotRequest--Request for `TunnelService.StartHotspot`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `socks_port` | 1 | `uint32` | Guest loopback port for the SOCKS5 listener. 0 means 1080. |-| `set_system_proxy` | 2 | `bool` | Point the guest's system proxy settings (and HTTP(S)_PROXY for new processes) at the hotspot. |-| `bypass` | 3 | repeated `string` | Destinations (CIDRs or host suffixes) that bypass the hotspot and use the guest's own network. |-| `ticket_ttl` | 4 | `google.protobuf.Duration` | How long the ticket accepts the client's WebSocket. Unset means 60 seconds. |--### StartHotspotResponse--Response for `TunnelService.StartHotspot`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `hotspot_id` | 1 | `string` | Hotspot id. |-| `ticket` | 2 | `string` | Ticket for the hotspot WebSocket. |-| `ws_path` | 3 | `string` | WebSocket path relative to the spacesd base URL, including the ticket, for example "/hotspot?ticket=…". The client keeps this socket open; the hotspot stops when it closes. |-| `socks_address` | 4 | `string` | Guest-side SOCKS5 address, for example "127.0.0.1:1080". |--### StopHotspotRequest--Request for `TunnelService.StopHotspot`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `hotspot_id` | 1 | `string` | Which hotspot. |--### StopHotspotResponse--Response for `TunnelService.StopHotspot`.--No fields.--### GetHotspotStatusRequest--Request for `TunnelService.GetHotspotStatus`.--No fields.--### GetHotspotStatusResponse--Response for `TunnelService.GetHotspotStatus`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `state` | 1 | [`HotspotState`](#hotspotstate) | State. |-| `hotspot_id` | 2 | `string` | Hotspot id, when not stopped. |-| `peer_principal_id` | 3 | `string` | Id of the principal whose client provides egress. |-| `socks_address` | 4 | `string` | Guest-side SOCKS5 address. |-| `active_connections` | 5 | `uint32` | Open relayed connections. |-| `bytes_out` | 6 | `uint64` | Bytes sent from the guest through the hotspot. |-| `bytes_in` | 7 | `uint64` | Bytes received into the guest through the hotspot. |--### HotspotState--Hotspot state.--| Value | # | Description |-| --- | --- | --- |-| `HOTSPOT_STATE_UNSPECIFIED` | 0 | Not reported. |-| `HOTSPOT_STATE_STOPPED` | 1 | No hotspot. |-| `HOTSPOT_STATE_WAITING_FOR_PEER` | 2 | Started, waiting for the client WebSocket. |-| `HOTSPOT_STATE_ACTIVE` | 3 | Relaying. |--## Types in `cua/env/v1/volume.proto`--### AttachVolumeRequest--Request for `VolumeService.AttachVolume`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `mount_path` | 1 | `string` | Where to mount. Empty means the guest's default (see the table above). |-| `ticket_ttl` | 2 | `google.protobuf.Duration` | How long the ticket accepts the client's WebSocket. Unset means 60 seconds. |--### AttachVolumeResponse--Response for `VolumeService.AttachVolume`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `volume_id` | 1 | `string` | Volume session id. |-| `ticket` | 2 | `string` | Ticket for the volume WebSocket. |-| `ws_path` | 3 | `string` | WebSocket path relative to the spacesd base URL, including the ticket, for example "/volume?ticket=…". |-| `mount_path` | 4 | `string` | Where the volume will be mounted. |-| `backend` | 5 | `string` | `nfs` or `fs`: the target name the guest's streams carry, which the client answers. |--### DetachVolumeRequest--Request for `VolumeService.DetachVolume`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `volume_id` | 1 | `string` | Which session. Empty means the current one. |--### DetachVolumeResponse--Response for `VolumeService.DetachVolume`.--No fields.--### GetVolumeStatusRequest--Request for `VolumeService.GetVolumeStatus`.--No fields.--### GetVolumeStatusResponse--Response for `VolumeService.GetVolumeStatus`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `state` | 1 | [`VolumeState`](#volumestate) | State. |-| `volume_id` | 2 | `string` | Volume session id (empty when detached). |-| `mount_path` | 3 | `string` | Mount path. |-| `backend` | 4 | `string` | `nfs` or `fs`. |-| `detail` | 5 | `string` | Why, when `state` is `VOLUME_STATE_ERROR`. |-| `active_streams` | 6 | `uint32` | Open streams to the client. |-| `bytes_out` | 7 | `uint64` | Bytes sent from the guest to the client. |-| `bytes_in` | 8 | `uint64` | Bytes received from the client. |--### VolumeState--State of the guest mount.--| Value | # | Description |-| --- | --- | --- |-| `VOLUME_STATE_UNSPECIFIED` | 0 | Not reported. |-| `VOLUME_STATE_DETACHED` | 1 | No volume. |-| `VOLUME_STATE_WAITING_FOR_CLIENT` | 2 | Attached by RPC, waiting for the client WebSocket. |-| `VOLUME_STATE_MOUNTING` | 3 | Mounting. |-| `VOLUME_STATE_MOUNTED` | 4 | Mounted and served. |-| `VOLUME_STATE_ERROR` | 5 | The mount failed; see `detail`. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/env-windows.mdx b/docs/content/docs/cua-sdk/reference/protocol/env-windows.mdxdeleted file mode 100644index e23d0a4e1a..0000000000--- a/docs/content/docs/cua-sdk/reference/protocol/env-windows.mdx+++ /dev/null@@ -1,557 +0,0 @@-----title: "Windows and accessibility"-description: "cua.env.v1 WindowsService and AccessibilityService: list, watch and arrange windows, launch apps, and the accessibility tree."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-proto- Source: buf build libs/cua/proto -o -#format=json- Version: 0.5.0-*/}--Windows, app launch and the accessibility tree. These services need the desktop provider.--Source: `libs/cua/proto/cua/env/v1/windows.proto`, `libs/cua/proto/cua/env/v1/accessibility.proto`.--## WindowsService--`cua.env.v1.WindowsService`--Window enumeration, window management and app launching.--Windows are addressed with opaque `WindowRef` handles (id + epoch). Native-handles never cross the wire. Nothing here goes through a shell: apps are-launched by identifier with an explicit argument vector.--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`ListWindows`](#windowsservicelistwindows) | [`ListWindowsRequest`](#listwindowsrequest) | [`ListWindowsResponse`](#listwindowsresponse) | unary |-| [`WatchWindows`](#windowsservicewatchwindows) | [`WatchWindowsRequest`](#watchwindowsrequest) | [`WatchWindowsResponse`](#watchwindowsresponse) | server stream |-| [`GetWindow`](#windowsservicegetwindow) | [`GetWindowRequest`](#getwindowrequest) | [`GetWindowResponse`](#getwindowresponse) | unary |-| [`ActivateWindow`](#windowsserviceactivatewindow) | [`ActivateWindowRequest`](#activatewindowrequest) | [`ActivateWindowResponse`](#activatewindowresponse) | unary |-| [`SetWindowBounds`](#windowsservicesetwindowbounds) | [`SetWindowBoundsRequest`](#setwindowboundsrequest) | [`SetWindowBoundsResponse`](#setwindowboundsresponse) | unary |-| [`MinimizeWindow`](#windowsserviceminimizewindow) | [`MinimizeWindowRequest`](#minimizewindowrequest) | [`MinimizeWindowResponse`](#minimizewindowresponse) | unary |-| [`MaximizeWindow`](#windowsservicemaximizewindow) | [`MaximizeWindowRequest`](#maximizewindowrequest) | [`MaximizeWindowResponse`](#maximizewindowresponse) | unary |-| [`RestoreWindow`](#windowsservicerestorewindow) | [`RestoreWindowRequest`](#restorewindowrequest) | [`RestoreWindowResponse`](#restorewindowresponse) | unary |-| [`CloseWindow`](#windowsserviceclosewindow) | [`CloseWindowRequest`](#closewindowrequest) | [`CloseWindowResponse`](#closewindowresponse) | unary |-| [`LaunchApp`](#windowsservicelaunchapp) | [`LaunchAppRequest`](#launchapprequest) | [`LaunchAppResponse`](#launchappresponse) | unary |-| [`Open`](#windowsserviceopen) | [`OpenRequest`](#openrequest) | [`OpenResponse`](#openresponse) | unary |--### WindowsService.ListWindows--`/cua.env.v1.WindowsService/ListWindows`, unary: [`ListWindowsRequest`](#listwindowsrequest) to [`ListWindowsResponse`](#listwindowsresponse).--Lists windows matching a filter.--### WindowsService.WatchWindows--`/cua.env.v1.WindowsService/WatchWindows`, server stream: [`WatchWindowsRequest`](#watchwindowsrequest) to [`WatchWindowsResponse`](#watchwindowsresponse).--Streams window lifecycle changes. Starts with a snapshot of all matching-windows so clients never race between a list and a watch.--### WindowsService.GetWindow--`/cua.env.v1.WindowsService/GetWindow`, unary: [`GetWindowRequest`](#getwindowrequest) to [`GetWindowResponse`](#getwindowresponse).--Returns one window.--### WindowsService.ActivateWindow--`/cua.env.v1.WindowsService/ActivateWindow`, unary: [`ActivateWindowRequest`](#activatewindowrequest) to [`ActivateWindowResponse`](#activatewindowresponse).--Brings a window to the front and gives it keyboard focus.--### WindowsService.SetWindowBounds--`/cua.env.v1.WindowsService/SetWindowBounds`, unary: [`SetWindowBoundsRequest`](#setwindowboundsrequest) to [`SetWindowBoundsResponse`](#setwindowboundsresponse).--Moves and/or resizes a window.--### WindowsService.MinimizeWindow--`/cua.env.v1.WindowsService/MinimizeWindow`, unary: [`MinimizeWindowRequest`](#minimizewindowrequest) to [`MinimizeWindowResponse`](#minimizewindowresponse).--Minimizes (iconifies) a window.--### WindowsService.MaximizeWindow--`/cua.env.v1.WindowsService/MaximizeWindow`, unary: [`MaximizeWindowRequest`](#maximizewindowrequest) to [`MaximizeWindowResponse`](#maximizewindowresponse).--Maximizes (zooms) a window.--### WindowsService.RestoreWindow--`/cua.env.v1.WindowsService/RestoreWindow`, unary: [`RestoreWindowRequest`](#restorewindowrequest) to [`RestoreWindowResponse`](#restorewindowresponse).--Restores a minimized or maximized window to its normal state.--### WindowsService.CloseWindow--`/cua.env.v1.WindowsService/CloseWindow`, unary: [`CloseWindowRequest`](#closewindowrequest) to [`CloseWindowResponse`](#closewindowresponse).--Asks a window to close (like clicking its close button), or force-closes-it.--### WindowsService.LaunchApp--`/cua.env.v1.WindowsService/LaunchApp`, unary: [`LaunchAppRequest`](#launchapprequest) to [`LaunchAppResponse`](#launchappresponse).--Launches an application.--### WindowsService.Open--`/cua.env.v1.WindowsService/Open`, unary: [`OpenRequest`](#openrequest) to [`OpenResponse`](#openresponse).--Opens a URL or path with its default (or a given) application.--## AccessibilityService--`cua.env.v1.AccessibilityService`--The guest accessibility tree (macOS AX, Windows UI Automation, Linux-AT-SPI via cua-driver platform-linux).--Every read returns a snapshot id. Element ids are only meaningful together-with the snapshot id they came from; acting on an element from an older-snapshot fails with `ERROR_REASON_STALE_SNAPSHOT` unless the server can-prove the element is unchanged. Requires capability "a11y".--| RPC | Request | Response | Kind |-| --- | --- | --- | --- |-| [`GetTree`](#accessibilityservicegettree) | [`GetTreeRequest`](#gettreerequest) | [`GetTreeResponse`](#gettreeresponse) | unary |-| [`Find`](#accessibilityservicefind) | [`FindRequest`](#findrequest) | [`FindResponse`](#findresponse) | unary |-| [`Act`](#accessibilityserviceact) | [`ActRequest`](#actrequest) | [`ActResponse`](#actresponse) | unary |--### AccessibilityService.GetTree--`/cua.env.v1.AccessibilityService/GetTree`, unary: [`GetTreeRequest`](#gettreerequest) to [`GetTreeResponse`](#gettreeresponse).--Returns the accessibility tree of a window (or the focused window).--### AccessibilityService.Find--`/cua.env.v1.AccessibilityService/Find`, unary: [`FindRequest`](#findrequest) to [`FindResponse`](#findresponse).--Finds elements matching a query.--### AccessibilityService.Act--`/cua.env.v1.AccessibilityService/Act`, unary: [`ActRequest`](#actrequest) to [`ActResponse`](#actresponse).--Performs an accessibility action on an element.--## Types in `cua/env/v1/windows.proto`--### AppInfo--Application that owns a window.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `name` | 1 | `string` | Display name, for example "Firefox". |-| `app_id` | 2 | `string` | Platform app identifier: bundle id on macOS, .desktop id on Linux, AppUserModelID or executable name on Windows. Empty when unknown. |-| `pid` | 3 | `uint32` | Guest process id of the owning process. Guest-local; never a host id. |--### WindowInfo--Description of a window.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `ref` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Handle. |-| `title` | 2 | `string` | Title. |-| `app` | 3 | [`AppInfo`](#appinfo) | Owning application. |-| `bounds` | 4 | [`Rect`](/cua-sdk/reference/protocol/env-common#rect) | Frame in global logical points. Advisory: it is a snapshot and may be stale by the time it is used. Media sessions and screenshots report their own authoritative geometry. |-| `display_id` | 5 | `string` | Display containing most of the window. |-| `state` | 6 | [`WindowState`](#windowstate) | State. |-| `kind` | 7 | [`WindowKind`](#windowkind) | Role. |-| `focused` | 8 | `bool` | True if this window has keyboard focus. |-| `on_screen` | 9 | `bool` | True if any part is on screen (not minimized, hidden or off-desktop). |-| `z_order` | 10 | `uint32` | Front-to-back stacking order among listed windows, 0 is frontmost. |--### WindowFilter--Filter for window listing and watching. All set fields must match.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `title_contains` | 1 | `string` | Case-insensitive substring of the title. |-| `app_name_contains` | 2 | `string` | Case-insensitive substring of the app name. |-| `app_id` | 3 | `string` | Exact `AppInfo.app_id`. |-| `pid` | 4 | `uint32` | Owning process id. |-| `display_id` | 5 | `string` | Only windows on this display. |-| `on_screen_only` | 6 | `bool` | Only on-screen windows. |-| `include_system` | 7 | `bool` | Include `WINDOW_KIND_SYSTEM` and `WINDOW_KIND_PHANTOM` windows, which are omitted by default. |--### ListWindowsRequest--Request for `WindowsService.ListWindows`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `filter` | 1 | [`WindowFilter`](#windowfilter) | Filter. |--### ListWindowsResponse--Response for `WindowsService.ListWindows`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `windows` | 1 | repeated [`WindowInfo`](#windowinfo) | Matching windows, front to back. |--### WatchWindowsRequest--Request for `WindowsService.WatchWindows`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `filter` | 1 | [`WindowFilter`](#windowfilter) | Filter applied to every event. |-| `keepalive_interval` | 2 | `google.protobuf.Duration` | Interval between `keepalive` messages. Unset means 30 seconds. |--### WindowSnapshot--Initial state of a window watch.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `windows` | 1 | repeated [`WindowInfo`](#windowinfo) | All matching windows, front to back. |--### WindowClosed--A window was closed or no longer matches the filter.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `ref` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | The window. |--### WatchWindowsResponse--One message of the `WindowsService.WatchWindows` stream.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `snapshot` | 1 | [`WindowSnapshot`](#windowsnapshot) (oneof `event`) | First message: current matching windows. |-| `created` | 2 | [`WindowInfo`](#windowinfo) (oneof `event`) | A new window appeared (or started matching). |-| `updated` | 3 | [`WindowInfo`](#windowinfo) (oneof `event`) | A window changed title, bounds, state, focus or z-order. Carries the full new description. |-| `closed` | 4 | [`WindowClosed`](#windowclosed) (oneof `event`) | A window closed. |-| `keepalive` | 5 | [`KeepAlive`](/cua-sdk/reference/protocol/env-common#keepalive) (oneof `event`) | Idle stream heartbeat. |--### GetWindowRequest--Request for `WindowsService.GetWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |--### GetWindowResponse--Response for `WindowsService.GetWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowInfo`](#windowinfo) | The window. |--### ActivateWindowRequest--Request for `WindowsService.ActivateWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |--### ActivateWindowResponse--Response for `WindowsService.ActivateWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |--### SetWindowBoundsRequest--Request for `WindowsService.SetWindowBounds`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |-| `position` | 2 | [`Point`](/cua-sdk/reference/protocol/env-common#point) | New top-left corner in global logical points. Unset keeps the position. |-| `width` | 3 | optional `double` | New width in logical points. Unset keeps the width. |-| `height` | 4 | optional `double` | New height in logical points. Unset keeps the height. |--### SetWindowBoundsResponse--Response for `WindowsService.SetWindowBounds`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. Its bounds may differ from the request when the window manager or app constrains them. |--### MinimizeWindowRequest--Request for `WindowsService.MinimizeWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |--### MinimizeWindowResponse--Response for `WindowsService.MinimizeWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |--### MaximizeWindowRequest--Request for `WindowsService.MaximizeWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |--### MaximizeWindowResponse--Response for `WindowsService.MaximizeWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |--### RestoreWindowRequest--Request for `WindowsService.RestoreWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |--### RestoreWindowResponse--Response for `WindowsService.RestoreWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowInfo`](#windowinfo) | The window afterwards. |--### CloseWindowRequest--Request for `WindowsService.CloseWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Which window. |-| `force` | 2 | `bool` | Destroy the window without giving the app a chance to object (for example to an unsaved-changes prompt). On most platforms this kills the owning process. |--### CloseWindowResponse--Response for `WindowsService.CloseWindow`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `closed` | 1 | `bool` | True if the window is gone. False when the app kept it open (for example it showed a save prompt). |--### AppSpec--Identifies an application to launch.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `app_id` | 1 | `string` (oneof `app`) | Platform app identifier: macOS bundle id ("org.mozilla.firefox"), Linux .desktop id ("firefox.desktop"), Windows AppUserModelID. |-| `executable` | 2 | `string` (oneof `app`) | Executable name (resolved on PATH) or absolute path. |-| `name` | 3 | `string` (oneof `app`) | Display name, resolved by the platform (for example "Firefox"). The least precise option. |--### LaunchAppRequest--Request for `WindowsService.LaunchApp`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `app` | 1 | [`AppSpec`](#appspec) | What to launch. |-| `args` | 2 | repeated `string` | Arguments passed verbatim, never through a shell. |-| `env` | 3 | map of `string` to `string` | Extra environment variables. |-| `cwd` | 4 | `string` | Working directory. Empty means the user's home. |-| `delivery` | 5 | [`Delivery`](/cua-sdk/reference/protocol/env-common#delivery) | `DELIVERY_BACKGROUND` launches without activating the app or stealing focus (where the platform allows). `DELIVERY_FOREGROUND` activates it. |-| `wait_for_window` | 6 | `google.protobuf.Duration` | Wait up to this long for the app's first window and return it. Unset returns immediately after the process starts. |--### LaunchAppResponse--Response for `WindowsService.LaunchApp`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `pid` | 1 | `uint32` | Guest process id of the launched (or already running, for single- instance apps) process. 0 when the platform does not report it. |-| `windows` | 2 | repeated [`WindowInfo`](#windowinfo) | Windows that appeared within `wait_for_window`. |--### OpenRequest--Request for `WindowsService.Open`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `url` | 1 | `string` (oneof `target`) | A URL, for example "https://example.com" or "mailto:a@b". |-| `path` | 2 | `string` (oneof `target`) | A guest file or directory path. |-| `with_app` | 3 | [`AppSpec`](#appspec) | Open with this app instead of the default handler. |-| `delivery` | 4 | [`Delivery`](/cua-sdk/reference/protocol/env-common#delivery) | Delivery, as for `LaunchAppRequest.delivery`. |--### OpenResponse--Response for `WindowsService.Open`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `pid` | 1 | `uint32` | Guest process id of the handling app, 0 when unknown. |--### WindowState--Window state.--| Value | # | Description |-| --- | --- | --- |-| `WINDOW_STATE_UNSPECIFIED` | 0 | Not reported. |-| `WINDOW_STATE_NORMAL` | 1 | Normal (neither minimized, maximized nor fullscreen). |-| `WINDOW_STATE_MINIMIZED` | 2 | Minimized / iconified. |-| `WINDOW_STATE_MAXIMIZED` | 3 | Maximized / zoomed. |-| `WINDOW_STATE_FULLSCREEN` | 4 | Fullscreen. |-| `WINDOW_STATE_HIDDEN` | 5 | Hidden (app hidden, withdrawn, or on another virtual desktop). |--### WindowKind--Broad window role.--| Value | # | Description |-| --- | --- | --- |-| `WINDOW_KIND_UNSPECIFIED` | 0 | Not reported. |-| `WINDOW_KIND_STANDARD` | 1 | A normal application window. |-| `WINDOW_KIND_DIALOG` | 2 | A dialog or sheet. |-| `WINDOW_KIND_PANEL` | 3 | A floating panel or utility window. |-| `WINDOW_KIND_MENU` | 4 | A menu or popup. |-| `WINDOW_KIND_TOOLTIP` | 5 | A tooltip. |-| `WINDOW_KIND_SYSTEM` | 6 | Desktop chrome: dock, menu bar strip, panel, wallpaper. |-| `WINDOW_KIND_PHANTOM` | 7 | Invisible or indicator surfaces (for example the macOS screen-recording indicator, 1x1 helper windows). Hidden unless `include_system` is set. |--## Types in `cua/env/v1/accessibility.proto`--### AccessibilityNode--One accessibility element. Trees are returned flattened in pre-order-(parents before children) to avoid unbounded message nesting.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `element_id` | 1 | `string` | Element id, unique within its snapshot. |-| `parent_id` | 2 | `string` | Parent element id, empty for the root. |-| `depth` | 3 | `uint32` | Depth below the root (root is 0). |-| `role` | 4 | `string` | Normalized role, for example "button", "text_field", "menu_item", "window". Platform roles are mapped to one vocabulary. |-| `native_role` | 5 | `string` | The platform's native role string (for example "AXButton", "ControlType.Button", "push button"), for debugging. |-| `name` | 6 | `string` | Accessible name / label. |-| `value` | 7 | `string` | Current value (text content, slider value), when it has one. |-| `description` | 8 | `string` | Accessible description / help text. |-| `bounds` | 9 | [`Rect`](/cua-sdk/reference/protocol/env-common#rect) | Frame in global logical points, when known. |-| `states` | 10 | repeated `string` | Normalized states, for example "focused", "enabled", "selected", "checked", "expanded", "editable", "offscreen". |-| `actions` | 11 | repeated [`AccessibilityAction`](#accessibilityaction) | Actions the element supports (see `AccessibilityAction`). |-| `attributes` | 12 | map of `string` to `string` | Other attributes the platform exposes, stringified. |--### GetTreeRequest--Request for `AccessibilityService.GetTree`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Window whose tree to read. Unset means the focused window. |-| `max_depth` | 2 | `uint32` | Maximum depth below the root. 0 means unlimited (subject to the server's node limit). |-| `include_hidden` | 3 | `bool` | Include elements that are offscreen or not visible. |-| `max_nodes` | 4 | `uint32` | Stop after this many nodes. 0 means the server limit (normally 5000). |--### GetTreeResponse--Response for `AccessibilityService.GetTree`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `snapshot_id` | 1 | `string` | Snapshot id for later `Act` calls. |-| `window` | 2 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | The window the tree belongs to. |-| `nodes` | 3 | repeated [`AccessibilityNode`](#accessibilitynode) | Nodes in pre-order. |-| `truncated` | 4 | `bool` | True if `max_depth` or `max_nodes` cut the tree short. |--### AccessibilityQuery--Query for `AccessibilityService.Find`. All set fields must match.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `role` | 1 | `string` | Normalized role. |-| `name` | 2 | `string` | Exact accessible name. |-| `name_contains` | 3 | `string` | Case-insensitive substring of the accessible name. |-| `value_contains` | 4 | `string` | Case-insensitive substring of the value. |-| `states` | 5 | repeated `string` | Required states. |--### FindRequest--Request for `AccessibilityService.Find`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `window` | 1 | [`WindowRef`](/cua-sdk/reference/protocol/env-common#windowref) | Window to search. Unset means the focused window. |-| `query` | 2 | [`AccessibilityQuery`](#accessibilityquery) | What to look for. |-| `max_results` | 3 | `uint32` | Maximum matches. 0 means 50. |--### FindResponse--Response for `AccessibilityService.Find`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `snapshot_id` | 1 | `string` | Snapshot id for later `Act` calls. |-| `nodes` | 2 | repeated [`AccessibilityNode`](#accessibilitynode) | Matching elements (their `parent_id` refers to elements not necessarily included). |--### ElementRef--Reference to an element within a snapshot.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `snapshot_id` | 1 | `string` | Snapshot the element id came from. |-| `element_id` | 2 | `string` | Element id. |--### ActRequest--Request for `AccessibilityService.Act`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `element` | 1 | [`ElementRef`](#elementref) | Which element. |-| `action` | 2 | [`AccessibilityAction`](#accessibilityaction) | Which action. |-| `value` | 3 | `string` | New value for `ACCESSIBILITY_ACTION_SET_VALUE`. |-| `custom_action` | 4 | `string` | Native action name for `ACCESSIBILITY_ACTION_CUSTOM`. |-| `delivery` | 5 | [`Delivery`](/cua-sdk/reference/protocol/env-common#delivery) | Delivery mode. Accessibility actions are background-safe on most platforms; `DELIVERY_FOREGROUND` activates the window first. |--### ActResponse--Response for `AccessibilityService.Act`.--| Field | # | Type | Description |-| --- | --- | --- | --- |-| `report` | 1 | [`DeliveryReport`](/cua-sdk/reference/protocol/env-common#deliveryreport) | What actually happened. |--### AccessibilityAction--Accessibility action.--| Value | # | Description |-| --- | --- | --- |-| `ACCESSIBILITY_ACTION_UNSPECIFIED` | 0 | Not set. Rejected. |-| `ACCESSIBILITY_ACTION_PRESS` | 1 | Press / invoke / click. |-| `ACCESSIBILITY_ACTION_FOCUS` | 2 | Move keyboard focus to the element. |-| `ACCESSIBILITY_ACTION_SET_VALUE` | 3 | Replace the element's value with `ActRequest.value`. |-| `ACCESSIBILITY_ACTION_INCREMENT` | 4 | Increment (sliders, steppers). |-| `ACCESSIBILITY_ACTION_DECREMENT` | 5 | Decrement. |-| `ACCESSIBILITY_ACTION_SHOW_MENU` | 6 | Open the element's context menu. |-| `ACCESSIBILITY_ACTION_EXPAND` | 7 | Expand (tree items, disclosure triangles, combo boxes). |-| `ACCESSIBILITY_ACTION_COLLAPSE` | 8 | Collapse. |-| `ACCESSIBILITY_ACTION_SELECT` | 9 | Select (list items, tabs). |-| `ACCESSIBILITY_ACTION_SCROLL_INTO_VIEW` | 10 | Scroll the element into view. |-| `ACCESSIBILITY_ACTION_CUSTOM` | 11 | A platform-specific action named by `ActRequest.custom_action`. |diff --git a/docs/content/docs/cua-sdk/reference/protocol/index.mdx b/docs/content/docs/cua-sdk/reference/protocol/index.mdxindex e700134439..746e240343 100644--- a/docs/content/docs/cua-sdk/reference/protocol/index.mdx+++ b/docs/content/docs/cua-sdk/reference/protocol/index.mdx@@ -38,23 +38,23 @@ Tickets go in `?ticket=` or the WebSocket subprotocol `cua.ticket.<ticket>`. Tic| Service | Package | Page | RPCs || --- | --- | --- | --- |-| [`SystemService`](/cua-sdk/reference/protocol/env-system#systemservice) | `cua.env.v1` | [System](/cua-sdk/reference/protocol/env-system) | 10 |-| [`ProcessService`](/cua-sdk/reference/protocol/env-process#processservice) | `cua.env.v1` | [Processes](/cua-sdk/reference/protocol/env-process) | 8 |-| [`FilesystemService`](/cua-sdk/reference/protocol/env-filesystem#filesystemservice) | `cua.env.v1` | [Filesystem](/cua-sdk/reference/protocol/env-filesystem) | 16 |-| [`ComputerService`](/cua-sdk/reference/protocol/env-computer#computerservice) | `cua.env.v1` | [Computer and driver](/cua-sdk/reference/protocol/env-computer) | 7 |-| [`DriverService`](/cua-sdk/reference/protocol/env-computer#driverservice) | `cua.env.v1` | [Computer and driver](/cua-sdk/reference/protocol/env-computer) | 2 |-| [`WindowsService`](/cua-sdk/reference/protocol/env-windows#windowsservice) | `cua.env.v1` | [Windows and accessibility](/cua-sdk/reference/protocol/env-windows) | 11 |-| [`AccessibilityService`](/cua-sdk/reference/protocol/env-windows#accessibilityservice) | `cua.env.v1` | [Windows and accessibility](/cua-sdk/reference/protocol/env-windows) | 3 |-| [`StreamService`](/cua-sdk/reference/protocol/env-stream#streamservice) | `cua.env.v1` | [Streams and presence](/cua-sdk/reference/protocol/env-stream) | 5 |-| [`PresenceService`](/cua-sdk/reference/protocol/env-stream#presenceservice) | `cua.env.v1` | [Streams and presence](/cua-sdk/reference/protocol/env-stream) | 3 |-| [`TeleportService`](/cua-sdk/reference/protocol/env-teleport-tunnel#teleportservice) | `cua.env.v1` | [Teleport, tunnels and the volume](/cua-sdk/reference/protocol/env-teleport-tunnel) | 7 |-| [`TunnelService`](/cua-sdk/reference/protocol/env-teleport-tunnel#tunnelservice) | `cua.env.v1` | [Teleport, tunnels and the volume](/cua-sdk/reference/protocol/env-teleport-tunnel) | 6 |-| [`VolumeService`](/cua-sdk/reference/protocol/env-teleport-tunnel#volumeservice) | `cua.env.v1` | [Teleport, tunnels and the volume](/cua-sdk/reference/protocol/env-teleport-tunnel) | 3 |-| [`HostSpacesService`](/cua-sdk/reference/protocol/env-host-spaces#hostspacesservice) | `cua.env.v1` | [Host Spaces](/cua-sdk/reference/protocol/env-host-spaces) | 6 |-| [`SandboxService`](/cua-sdk/reference/protocol/daemon-sandboxes#sandboxservice) | `cua.daemon.v1` | [Daemon: sandboxes](/cua-sdk/reference/protocol/daemon-sandboxes) | 20 |-| [`RuntimeService`](/cua-sdk/reference/protocol/daemon-runtimes#runtimeservice) | `cua.daemon.v1` | [Daemon: local runtimes](/cua-sdk/reference/protocol/daemon-runtimes) | 5 |-| [`SpaceService`](/cua-sdk/reference/protocol/daemon-spaces#spaceservice) | `cua.daemon.v1` | [Daemon: Spaces](/cua-sdk/reference/protocol/daemon-spaces) | 17 |-| [`DaemonService`](/cua-sdk/reference/protocol/daemon-service#daemonservice) | `cua.daemon.v1` | [Daemon: service](/cua-sdk/reference/protocol/daemon-service) | 3 |+| [`SystemService`](/cua-sdk/reference/protocol/env-system#systemservice) | `cua.env.v1` | [System, diagnostics and shared types](/cua-sdk/reference/protocol/env-system) | 10 |+| [`ProcessService`](/cua-sdk/reference/protocol/env-process#processservice) | `cua.env.v1` | [Processes and files](/cua-sdk/reference/protocol/env-process) | 8 |+| [`FilesystemService`](/cua-sdk/reference/protocol/env-process#filesystemservice) | `cua.env.v1` | [Processes and files](/cua-sdk/reference/protocol/env-process) | 16 |+| [`ComputerService`](/cua-sdk/reference/protocol/env-computer#computerservice) | `cua.env.v1` | [Computer, windows and accessibility](/cua-sdk/reference/protocol/env-computer) | 7 |+| [`DriverService`](/cua-sdk/reference/protocol/env-computer#driverservice) | `cua.env.v1` | [Computer, windows and accessibility](/cua-sdk/reference/protocol/env-computer) | 2 |+| [`WindowsService`](/cua-sdk/reference/protocol/env-computer#windowsservice) | `cua.env.v1` | [Computer, windows and accessibility](/cua-sdk/reference/protocol/env-computer) | 11 |+| [`AccessibilityService`](/cua-sdk/reference/protocol/env-computer#accessibilityservice) | `cua.env.v1` | [Computer, windows and accessibility](/cua-sdk/reference/protocol/env-computer) | 3 |+| [`StreamService`](/cua-sdk/reference/protocol/env-stream#streamservice) | `cua.env.v1` | [Streams, teleport, tunnels and host Spaces](/cua-sdk/reference/protocol/env-stream) | 5 |+| [`PresenceService`](/cua-sdk/reference/protocol/env-stream#presenceservice) | `cua.env.v1` | [Streams, teleport, tunnels and host Spaces](/cua-sdk/reference/protocol/env-stream) | 3 |+| [`TeleportService`](/cua-sdk/reference/protocol/env-stream#teleportservice) | `cua.env.v1` | [Streams, teleport, tunnels and host Spaces](/cua-sdk/reference/protocol/env-stream) | 7 |+| [`TunnelService`](/cua-sdk/reference/protocol/env-stream#tunnelservice) | `cua.env.v1` | [Streams, teleport, tunnels and host Spaces](/cua-sdk/reference/protocol/env-stream) | 6 |+| [`VolumeService`](/cua-sdk/reference/protocol/env-stream#volumeservice) | `cua.env.v1` | [Streams, teleport, tunnels and host Spaces](/cua-sdk/reference/protocol/env-stream) | 3 |+| [`HostSpacesService`](/cua-sdk/reference/protocol/env-stream#hostspacesservice) | `cua.env.v1` | [Streams, teleport, tunnels and host Spaces](/cua-sdk/reference/protocol/env-stream) | 6 |+| [`SandboxService`](/cua-sdk/reference/protocol/daemon#sandboxservice) | `cua.daemon.v1` | [Cua daemon](/cua-sdk/reference/protocol/daemon) | 20 |+| [`RuntimeService`](/cua-sdk/reference/protocol/daemon#runtimeservice) | `cua.daemon.v1` | [Cua daemon](/cua-sdk/reference/protocol/daemon) | 5 |+| [`SpaceService`](/cua-sdk/reference/protocol/daemon#spaceservice) | `cua.daemon.v1` | [Cua daemon](/cua-sdk/reference/protocol/daemon) | 17 |+| [`DaemonService`](/cua-sdk/reference/protocol/daemon#daemonservice) | `cua.daemon.v1` | [Cua daemon](/cua-sdk/reference/protocol/daemon) | 3 |## Metadata and HTTP routes@@ -85,4 +85,4 @@ gRPC-Web cannot carry client streams, so every client-streaming RPC has a unary## Errors-Errors are `google.rpc.Status` with typed details: spacesd packs [`ErrorInfo`](/cua-sdk/reference/protocol/env-common#errorinfo) and the daemon packs [`DaemonErrorInfo`](/cua-sdk/reference/protocol/daemon-service#daemonerrorinfo).+Errors are `google.rpc.Status` with typed details: spacesd packs [`ErrorInfo`](/cua-sdk/reference/protocol/env-system#errorinfo) and the daemon packs [`DaemonErrorInfo`](/cua-sdk/reference/protocol/daemon#daemonerrorinfo).diff --git a/docs/content/docs/cua-sdk/reference/protocol/meta.json b/docs/content/docs/cua-sdk/reference/protocol/meta.jsonindex ae12fd51d1..672d0fdce4 100644--- a/docs/content/docs/cua-sdk/reference/protocol/meta.json+++ b/docs/content/docs/cua-sdk/reference/protocol/meta.json@@ -2,18 +2,9 @@"title": "Protocol","pages": ["env-system",- "env-diagnose",- "env-common","env-process",- "env-filesystem","env-computer",- "env-windows","env-stream",- "env-teleport-tunnel",- "env-host-spaces",- "daemon-sandboxes",- "daemon-runtimes",- "daemon-spaces",- "daemon-service"+ "daemon"]}diff --git a/docs/content/docs/cua-sdk/reference/python/configuration.mdx b/docs/content/docs/cua-sdk/reference/python/configuration.mdxdeleted file mode 100644index 1d3e411b4a..0000000000--- a/docs/content/docs/cua-sdk/reference/python/configuration.mdx+++ /dev/null@@ -1,267 +0,0 @@-----title: "Configuration and errors"-description: "configure, login, whoami, transports and the errors cua-sandbox raises."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:python- Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.configuration)- Version: cua-sandbox 0.9.1-*/}--Process-wide settings, sign-in helpers, transports and the typed errors of `cua-sandbox`.--## Configuration and sign-in--### configure--```python-def configure(- *,- api_key: Optional[str] = None,- base_url: Optional[str] = None,- fleet_base_url: Optional[str] = None,- token_url: Optional[str] = None,- client_id: Optional[str] = None,- client_secret: Optional[str] = None,- fleet_token: Optional[str] = None,-) -> None-```--Set global configuration.--`api_key` and `base_url` apply to the legacy `login()` and-`whoami()` helpers. `fleet_base_url`, `token_url`, `client_id`,-`client_secret` and `fleet_token` configured Cua Cloud, which has-ended: they are accepted so existing calls keep working, and ignored.--### login--```python-def login(*, base_url: Optional[str] = None) -> None-```--Open the CUA login page in a browser and store credentials.--This initiates a Clerk-based browser authentication flow.-The user completes login in their browser, and the resulting-API key is stored in ~/.cua/credentials.--### whoami--```python-def whoami(*, api_key: Optional[str] = None) -> Dict[str, Any]-```--Return info about the authenticated user.--**Returns:** Dict with user info (id, email, etc.) from the CUA API.--## Errors--### SpacesdNotAvailable--```python-class SpacesdNotAvailable(RuntimeError)-```--The sandbox has no reachable cua-spacesd.--Sandboxes are daemon-agnostic: creating, listing and deleting them never-needs a guest agent. The computer interfaces (`screen`, `mouse`,-`shell`, `files` ...) need cua-spacesd, or one of the agentless-transports (QMP, VNC, SSH, ADB) the runtime exposes.--### InvalidArgument--```python-class InvalidArgument(ValueError)-```--Contradictory or invalid options (the native SDK's-`CuaError.InvalidArgument`), for example `local=True` together with-`cloud=CloudOptions(...)`.--### InvalidPlacement--```python-class InvalidPlacement(InvalidArgument)-```--A location, kind and runtime that do not go together (the native-SDK's `CuaError.InvalidPlacement`), for example `kind="container"`-with `runtime="qemu"`, or `runtime="kubevirt"` locally. The message-lists the valid values.--### Unsupported--```python-class Unsupported(NotImplementedError)-```--The operation is not supported for this sandbox, image or provider-(the native SDK's `CuaError.Unsupported`). A `NotImplementedError`,-so older `except NotImplementedError` handlers still catch it.--## Transports--### CloudTransport--```python-class CloudTransport(Transport)-```--Retired: every Cua Cloud entry point raises `CloudEnded`.--### EnvTransport--```python-class EnvTransport(Transport)-```--Drives a sandbox through cua-spacesd.--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `url` | `Optional[str]` | `None` | spacesd URL (`http://host:3211` or a relay URL). Ignored when `env_factory` is given. |-| `token` | `Optional[str]` | `None` | spacesd token, if the driver requires one. |-| `env_factory` | `Optional[EnvFactory]` | `None` | coroutine returning a `cua.SpacesdClient` (used by local runtimes, which know how to reach the driver). |-| `environment` | `Optional[str]` | `None` | OS hint (`linux`, `windows`, `mac`) used before the driver has been reached. |-| `fallback` | `Optional[Transport]` | `None` | an agentless transport (QMP/VNC/SSH/ADB) to use when the sandbox has no spacesd. |-| `ready_timeout` | `float` | `0.0` | how long to keep retrying the spacesd probe on first use (a freshly booted VM starts its driver late). `0` probes once. |-| `native_sandbox` | `Any` | `None` | the `cua.Sandbox` handle, for port forwarding and named services. |--| Attribute | Type | Description |-| --- | --- | --- |-| `url` | `Optional[str]` | |--#### EnvTransport.connect--```python-async def connect() -> None-```--#### EnvTransport.disconnect--```python-async def disconnect() -> None-```--#### EnvTransport.spacesd--```python-async def spacesd() -> Any-```--The raw `cua.SpacesdClient` (typed client escape hatch).--#### EnvTransport.send--```python-async def send(action: str, **params: Any) -> Any-```--#### EnvTransport.screenshot--```python-async def screenshot(format: str = 'png', quality: int = 95) -> bytes-```--#### EnvTransport.get_screen_size--```python-async def get_screen_size() -> Dict[str, int]-```--#### EnvTransport.get_environment--```python-async def get_environment() -> str-```--#### EnvTransport.get_display_url--```python-async def get_display_url(*, share: bool = False) -> str-```--A browser URL for the sandbox's display.--With cua-spacesd (an `env` or `viewer` service), a link to its-HTML5 viewer carrying a scoped, expiring viewer ticket; the same-link serves `share=True`. For images without cua-spacesd, the page-of the first declared legacy web display service (`novnc`,-`display`, `web`; a raw RFB port 59xx is skipped, and-`share=True` returns its expiring public link), then the agentless-fallback's VNC address.--#### EnvTransport.request_service--```python-async def request_service(- name: str,- *,- method: str,- path: str,- json_body: Any = None,- headers: Any = None,-) -> Any-```--#### EnvTransport.native_handle--```python-async def native_handle() -> Any-```--The `cua.Sandbox` handle behind this transport (services,-forwards, public URLs).--#### EnvTransport.native_service--```python-async def native_service(name: str) -> Any-```--#### EnvTransport.forward_tunnel--```python-async def forward_tunnel(sandbox_port: int | str) -> 'TunnelInfo'-```--#### EnvTransport.close_tunnel--```python-async def close_tunnel(info: 'TunnelInfo') -> None-```--#### EnvTransport.pty_create--```python-async def pty_create(- command: Optional[str] = None,- cols: int = 120,- rows: int = 40,- cwd: Optional[str] = None,- envs: Optional[Dict[str, str]] = None,-) -> Dict[str, Any]-```--#### EnvTransport.pty_send--```python-async def pty_send(pid: int, data: str) -> None-```--#### EnvTransport.pty_kill--```python-async def pty_kill(pid: int) -> bool-```--#### EnvTransport.pty_info--```python-async def pty_info(pid: int) -> Optional[Dict[str, Any]]-```diff --git a/docs/content/docs/cua-sdk/reference/python/image.mdx b/docs/content/docs/cua-sdk/reference/python/image.mdxdeleted file mode 100644index a0174a6aa3..0000000000--- a/docs/content/docs/cua-sdk/reference/python/image.mdx+++ /dev/null@@ -1,556 +0,0 @@-----title: "Image"-description: "The Image builder, sidecar containers and registry credentials of cua-sandbox."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:python- Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.image)- Version: cua-sandbox 0.9.1-*/}--`Image` is an immutable, chainable description of what a sandbox boots. Builder methods return a new `Image`.--Builder methods add layers and return a new `Image`. Locally, a container image is built into your container engine before boot; it is cached by content. Layers a build cannot run (`brew_install`, `choco_install`, ...) are applied after boot through cua-spacesd, so they need an image that runs it.--## Image builder--### Image--```python-class Image--Image(os_type: str, distro: str, version: str, kind: Optional[str] = None)-```--Immutable, chainable image specification.--Each mutation method returns a new Image instance so that builders-can be forked at any point.--| Attribute | Type | Description |-| --- | --- | --- |-| `os_type` | `str` | |-| `distro` | `str` | |-| `version` | `str` | |-| `kind` | `Optional[str]` | |--**Example**--{/* Examples: scripts/docs-generators/examples/cua-sdk/python/Image.py */}--```python test="docs" id="image-py" session="image-py"-from cua_sandbox import Image--img = Image.linux().apt_install("curl").pip_install("requests").env(DEBUG="1").expose(8080)-print(img.to_dict())-# {'os_type': 'linux', 'distro': 'ubuntu', 'version': '24.04', 'kind': None,-# 'layers': [{'type': 'apt_install', 'packages': ['curl']},-# {'type': 'pip_install', 'packages': ['requests']}],-# 'env': {'DEBUG': '1'}, 'ports': [8080]}-```--#### Image.linux--```python-@classmethod-def linux(- distro: str = 'ubuntu',- version: str = '24.04',- kind: Optional[str] = None,- tier: Optional[str] = None,-) -> Image-```--Linux: the canonical `ghcr.io/trycua/linux:<version>` image.--`kind=None` (or `"auto"`) runs what the image is (the rootfs: a-gVisor container locally and in the cloud); `kind="vm"` its-`-disk` containerDisk (QEMU locally, KubeVirt in the cloud);-`kind="container"` the rootfs. `Sandbox.create(kind=...)`-overrides it.--`tier`: `"full"` (the default: dev tooling) or `"slim"`-(`24.04-slim`: cua-spacesd and Chromium only; what CI runs). A tier-CI has not published yet raises `CuaError.ImageNotPublished`; use-`Image.from_registry(ref)` to run it anyway.--#### Image.macos--```python-@classmethod-def macos(version: str = '26', kind: str = 'vm', tier: Optional[str] = None) -> Image-```--macOS: the canonical `ghcr.io/trycua/macos:<version>` image (Lume locally).--Supported versions: `"15"` / `"sequoia"`, `"26"` / `"tahoe"`.-`tier`: `"full"` (the default), `"slim"` or `"xcode"` /-`"xcode-<X.Y>"` (full plus one pinned Xcode); unpublished tiers-raise `CuaError.ImageNotPublished`.--#### Image.windows--```python-@classmethod-def windows(- version: str = '2022',- kind: str = 'vm',- tier: Optional[str] = None,-) -> Image-```--Windows: the canonical `ghcr.io/trycua/windows:2022` containerDisk.--Other versions, including `"11"`, have no canonical image: they are-installed from a downloaded evaluation ISO. `tier="slim"` names-`2022-slim` once published.--#### Image.omarchy--```python-@classmethod-def omarchy(channel: Optional[str] = None) -> Image-```--Omarchy (Arch Linux, Hyprland) with cua-spacesd:-`ghcr.io/trycua/omarchy:edge` (or `"rc"`/`"stable"`).--An amd64 VM: QEMU locally (emulated on arm64 hosts, so slow there),-KubeVirt in the cloud. Until CI publishes it this raises-`CuaError.ImageNotPublished`; use-`Image.from_registry("ghcr.io/trycua/omarchy:edge", kind="vm")` to-run it anyway.--#### Image.android--```python-@classmethod-def android(version: str = '14', kind: str = 'vm') -> Image-```--Android image. Always a VM (QEMU emulator).--#### Image.from_registry--```python-@classmethod-def from_registry(- ref: str,- *,- os_type: str = 'linux',- kind: Optional[str] = None,- agent_type: Optional[str] = None,- secret: Optional[Any] = None,-) -> Image-```--Create an image from a registry reference.--`secret` (a `cua_sandbox.RegistrySecret`) pulls a private-image, the same way locally (the pull) and in the cloud (a registry-pull secret for the sandbox). It is never logged or saved.--os_type selects the firmware: Windows guest disks are built UEFI-only,-so a Windows containerDisk pulled from a registry must say so or it is-handed BIOS and will not boot. kind is resolved after pull when omitted.-agent_type names the guest control server the disk already runs, the-same hint as `from_file`: `"osworld"` selects the OSWorld Flask-server on port 5000 instead of the computer-server on 8000, for local-QEMU.--#### Image.from_file--```python-@classmethod-def from_file(- path: str,- *,- os_type: str = 'windows',- kind: str = 'vm',- agent_type: Optional[str] = None,-) -> Image-```--Create an image from a local disk, ISO file, or URL.--Supported formats: qcow2, vhdx, raw, img, iso.-URLs (http/https) are downloaded automatically. Zip files are extracted.-For ISOs, the runtime will create a qcow2 disk and attach the ISO-as a CD-ROM for installation/boot.--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `str` | required | Local file path or URL (http/https). |-| `os_type` | `str` | `'windows'` | OS type hint ("linux", "windows", "macos", "android"). |-| `kind` | `str` | `'vm'` | "vm" or "container". |-| `agent_type` | `Optional[str]` | `None` | Agent type hint (e.g. "osworld" for OSWorld Flask server). |--#### Image.from_dict--```python-@classmethod-def from_dict(data: Dict[str, Any]) -> Image-```--Reconstruct an Image from a serialized spec dict.--**Example**--{/* Examples: scripts/docs-generators/examples/cua-sdk/python/Image.from_dict.py */}--```python test="docs" id="image-from-dict-py" session="image-from-dict-py"-from cua_sandbox import Image--base = Image.linux().apt_install("git")-dev = base.pip_install("rich")-same = Image.from_dict(dev.to_dict()).to_dict() == dev.to_dict()-print([same, len(base.to_dict()["layers"]), len(dev.to_dict()["layers"])])-# [True, 1, 2]-```--#### Image.apt_install--```python-def apt_install(*packages: str) -> Image-```--Install packages via apt (Linux only).--#### Image.brew_install--```python-def brew_install(*packages: str) -> Image-```--Install packages via Homebrew (macOS).--#### Image.choco_install--```python-def choco_install(*packages: str) -> Image-```--Install packages via Chocolatey (Windows).--#### Image.winget_install--```python-def winget_install(*packages: str) -> Image-```--Install packages via winget (Windows).--#### Image.apk_install--```python-def apk_install(*apk_paths: str) -> Image-```--Install APK files via adb (Android only).--#### Image.pwa_install--```python-def pwa_install(- manifest_url: str,- package_name: Optional[str] = None,- keystore: Optional[str] = None,- keystore_alias: str = 'android',- keystore_password: str = 'android',- builder: str = 'pwa2apk',- push_timeout: Optional[float] = None,-) -> 'Image'-```--Build an APK from a PWA manifest URL and install it (Android only).--Two builder backends are supported:--* `"pwa2apk"` (default): generates a lightweight WebView-based APK.- No Chrome dependency, no "Running in Chrome" banner, no Digital Asset- Links needed. ~10 KB APK.-* `"bubblewrap"`: generates a Chrome Trusted Web Activity (TWA) APK.- Requires Chrome on the device and a matching- `/.well-known/assetlinks.json` on the server. Shows a mandatory- "Running in Chrome" privacy disclosure on every launch.--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `manifest_url` | `str` | required | Full URL to the PWA's `manifest.json` or `manifest.webmanifest`. Example: `"http://10.0.2.2:3000/manifest.json"` |-| `package_name` | `Optional[str]` | `None` | Android package ID. Defaults to a reversed-hostname derivation (e.g. `"com.example.app"`). |-| `keystore` | `Optional[str]` | `None` | Path to a `*.keystore` / `*.jks` file. When omitted a fresh keystore is generated and cached. Pass the keystore bundled with your PWA repo so the fingerprint is deterministic. |-| `keystore_alias` | `str` | `'android'` | Key alias inside the keystore (default `"android"`). |-| `keystore_password` | `str` | `'android'` | Password for both the store and the key (default `"android"`). |-| `builder` | `str` | `'pwa2apk'` | `"pwa2apk"` (default) or `"bubblewrap"`. |-| `push_timeout` | `Optional[float]` | `None` | Optional seconds for the `write_bytes` `adb push` of the built APK. When `None` the server default applies. |--#### Image.uv_install--```python-def uv_install(*packages: str) -> Image-```--Install Python packages via uv add into the cua-server project.--#### Image.pip_install--```python-def pip_install(*packages: str) -> Image-```--Install Python packages via pip.--#### Image.app_install--```python-def app_install(app_id: str) -> Image-```--Install an app from the cua-sandbox-apps catalog.--Requires `cua-sandbox-apps` to be installed. The app's install-script for this image's OS is executed as a build layer.--#### Image.run--```python-def run(command: str) -> Image-```--Run a shell command during image build.--#### Image.env--```python-def env(**variables: str) -> Image-```--Set environment variables.--#### Image.copy--```python-def copy(src: str, dst: str) -> Image-```--Copy a file into the image.--#### Image.expose--```python-def expose(port: int) -> Image-```--Expose a port.--#### Image.to_build_recipe--```python-def to_build_recipe(- *,- name: str,- namespace: str,- tags: Mapping[str, str] | None = None,- timeout_seconds: int | None = None,- disk_size: str | None = None,- file_references: Mapping[str, ImageFileReference] | None = None,-) -> Dict[str, Any]-```--Return a CRD-validated Image custom-resource manifest.--#### Image.to_dict--```python-def to_dict() -> Dict[str, Any]-```--Serialize to a plain dict suitable for JSON or cloud API.--#### Image.to_cloud_init--```python-def to_cloud_init() -> str-```--Generate a cloud-init user-data script from the image layers.--#### Image.local_support--```python-def local_support()-```--Check whether this image can run locally on the current host.--Returns a `cua_sandbox.runtime.compat.RuntimeSupport` describing:--- `supported` : runtime is available or auto-installable on this OS-- `hw_accel` : hardware acceleration (HVF / KVM / Hyper-V) is available-- `runtime_installed`: runtime binary found right now (no install needed)-- `auto_installable`: SDK can install the runtime automatically-- `reason` : human-readable explanation--In tests, use the bundled helper instead of checking manually:--```python-from cua_sandbox.runtime.compat import skip_if_unsupported--async def test_something():- skip_if_unsupported(Image.macos())- async with Sandbox.ephemeral(Image.macos(), local=True) as sb:- ...-```--### ImageInfo--```python-class ImageInfo--ImageInfo(- reference: str,- pinned_ref: str,- digest: str,- variant: str,- arch: Optional[str],- os: str,- emulated: bool,-)-```--The image a sandbox runs, as resolved and pinned at create time.--`reference` is the reference as requested (normalised, e.g.-`docker.io/library/python:3.12-slim`), `pinned_ref` the-`registry/repo@sha256:...` that ran, `variant` one of `rootfs`,-`containerdisk` or `lume`, `arch` the architecture that-ran (`amd64`/`arm64`, when known), `os` the guest OS and-`emulated` whether it ran under emulation.--| Attribute | Type | Description |-| --- | --- | --- |-| `reference` | `str` | |-| `pinned_ref` | `str` | |-| `digest` | `str` | |-| `variant` | `str` | |-| `arch` | `Optional[str]` | |-| `os` | `str` | |-| `emulated` | `bool` | |--## Containers and registries--### Container--```python-class Container--Container(- image: str,- command: Optional[Sequence[str]] = None,- env: Optional[Mapping[str, str]] = None,- ports: Optional[Sequence[int]] = None,- name: Optional[str] = None,-)-```--A sidecar container, reachable from the sandbox at its `name`.--`name` (a DNS label, not `main`) defaults from the image (`redis`-for `redis:7-alpine`); the sidecar reaches the sandbox at `main`.-`command` replaces the image's entrypoint. `env` holds plain values,-not secrets.--| Attribute | Type | Description |-| --- | --- | --- |-| `image` | `str` | |-| `command` | `Optional[Sequence[str]]` | |-| `env` | `Optional[Mapping[str, str]]` | |-| `ports` | `Optional[Sequence[int]]` | |-| `name` | `Optional[str]` | |--#### Container.native--```python-def native() -> Any-```--### RegistrySecret--```python-class RegistrySecret--RegistrySecret(- username: str,- password: str,- *,- registry: Optional[str] = None,-)-```--Credentials for a private registry image.--* `RegistrySecret(username, password)`: explicit values (a token works- as the password).-* `RegistrySecret.from_env()`: read `CUA_REGISTRY_USERNAME` /- `CUA_REGISTRY_PASSWORD` (or the variables you name) at create time.-* `RegistrySecret.aws_ecr(region=None)`: a private Amazon ECR image,- with a login token from the AWS CLI.--`registry` scopes them to one host; by default they apply to the-image's registry. The password never appears in `repr` or logs.--| Attribute | Type | Description |-| --- | --- | --- |-| `registry` | `Optional[str]` | |-| `username` | `Optional[str]` | |--**Example**--{/* Examples: scripts/docs-generators/examples/cua-sdk/python/RegistrySecret.py */}--```python test="docs" id="registry-secret-py" session="registry-secret-py"-from cua_sandbox import Image, RegistrySecret--print(Image.from_registry("python:3.12-slim").to_dict()["registry"])-print(repr(RegistrySecret("robot", "s3cr3t", registry="registry.example.com"))) # the password never shows-```--#### RegistrySecret.from_env--```python-@classmethod-def from_env(- username_var: str = 'CUA_REGISTRY_USERNAME',- password_var: str = 'CUA_REGISTRY_PASSWORD',- *,- registry: Optional[str] = None,-) -> 'RegistrySecret'-```--#### RegistrySecret.aws_ecr--```python-@classmethod-def aws_ecr(region: Optional[str] = None) -> 'RegistrySecret'-```--#### RegistrySecret.native--```python-def native() -> Any-```--### ImageFileReference--```python-class ImageFileReference(BaseModel)-```--| Attribute | Type | Description |-| --- | --- | --- |-| `model_config` | `ConfigDict` | |-| `digest` | `constr(pattern='^sha256:[0-9a-f]{64}$')` | |-| `reference` | `constr(pattern='^uploads/[a-z0-9]([-a-z0-9]*[a-z0-9])?/[A-Za-z0-9_-]+$', min_length=1, max_length=2048)` | |-| `size_bytes` | `conint(ge=0, le=9007199254740991)` | |diff --git a/docs/content/docs/cua-sdk/reference/python/index.mdx b/docs/content/docs/cua-sdk/reference/python/index.mdxindex 11beeb0cd7..257910d3b8 100644--- a/docs/content/docs/cua-sdk/reference/python/index.mdx+++ b/docs/content/docs/cua-sdk/reference/python/index.mdx@@ -10,7 +10,7 @@ description: "cua_sandbox and the cua package helpers: packages, configuration,Version: cua 0.5.0, cua-sandbox 0.9.1*/}-The high-level Python API: `cua_sandbox` (`Sandbox`, `Image`, the computer interfaces, `Pool`) and the helpers the `cua` package adds. It is a thin layer over the [Cua SDK objects](/cua-sdk/reference): the cloud, the local runtimes and cua-spacesd all go through `cua`, whose generated binding (`cua._native`) those pages document.+The high-level Python API: `cua_sandbox` (`Sandbox`, `Image`, the computer interfaces) and the helpers the `cua` package adds. It is a thin layer over the [Cua SDK objects](/cua-sdk/reference): the cloud, the local runtimes and cua-spacesd all go through `cua`, whose generated binding (`cua._native`) those pages document.| Package | Install | Import || --- | --- | --- |@@ -31,13 +31,9 @@ The high-level Python API: `cua_sandbox` (`Sandbox`, `Image`, the computer inter| Page | Covers || --- | --- |-| [Sandbox](/cua-sdk/reference/python/sandbox) | Sandbox, SandboxInfo, the sandbox() helper and the creation options of cua-sandbox. |-| [Image](/cua-sdk/reference/python/image) | The Image builder, sidecar containers and registry credentials of cua-sandbox. |-| [Pool](/cua-sdk/reference/python/pool) | Pools, templates, sandbox specs and pool errors of cua-sandbox. |+| [Sandbox, images and services](/cua-sdk/reference/python/sandbox) | Sandbox, the sandbox() helper and its creation options, the Image builder, and the services, tunnels and MCP endpoints of a sandbox. || [Interfaces](/cua-sdk/reference/python/interfaces) | Shell, mouse, keyboard, screen, clipboard, window, terminal, files, apps, mobile and driver interfaces. |-| [Services, tunnels and MCP](/cua-sdk/reference/python/services) | Named services, signed and public URLs, tunnels and MCP endpoints of a cua-sandbox sandbox. |-| [Runtimes](/cua-sdk/reference/python/runtimes) | Local runtimes (Docker, QEMU, Lume, Hyper-V, Tart, Android emulator) and local support checks. |-| [Configuration and errors](/cua-sdk/reference/python/configuration) | configure, login, whoami, transports and the errors cua-sandbox raises. |+| [Runtimes and configuration](/cua-sdk/reference/python/runtimes) | Local runtimes (Docker, QEMU, Lume, Hyper-V, Tart, Android emulator), support checks, configuration, sign-in and errors. |## The cua package@@ -79,7 +75,7 @@ A client of a running `cua daemon` (socket path or loopback URL).### Image-Without `cua[sandbox]`, `cua.Image` is this helper. With it installed, `cua.Image` is the richer [cua_sandbox Image](/cua-sdk/reference/python/image#image).+Without `cua[sandbox]`, `cua.Image` is this helper. With it installed, `cua.Image` is the richer [cua_sandbox Image](/cua-sdk/reference/python/sandbox#image).```pythonclass Image@@ -165,22 +161,22 @@ def resolve(| `cua.AndroidEmulatorRuntime` | [`cua_sandbox.runtime.AndroidEmulatorRuntime`](/cua-sdk/reference/python/runtimes#androidemulatorruntime) | `cua[sandbox]` || `cua.check_local_support` | [`cua_sandbox.check_local_support`](/cua-sdk/reference/python/runtimes#check_local_support) | `cua[sandbox]` || `cua.Clipboard` | [`cua_sandbox.interfaces.clipboard.Clipboard`](/cua-sdk/reference/python/interfaces#clipboard) | `cua[sandbox]` |-| `cua.CloudTransport` | [`cua_sandbox.CloudTransport`](/cua-sdk/reference/python/configuration#cloudtransport) | `cua[sandbox]` |+| `cua.CloudTransport` | [`cua_sandbox.CloudTransport`](/cua-sdk/reference/python/runtimes#cloudtransport) | `cua[sandbox]` || `cua.CommandResult` | [`cua_sandbox.interfaces.shell.CommandResult`](/cua-sdk/reference/python/interfaces#commandresult) | `cua[sandbox]` || `cua.ComputerAgent` | `cua_agent.ComputerAgent` | `cua[agent]` |-| `cua.configure` | [`cua_sandbox.configure`](/cua-sdk/reference/python/configuration#configure) | `cua[sandbox]` |+| `cua.configure` | [`cua_sandbox.configure`](/cua-sdk/reference/python/runtimes#configure) | `cua[sandbox]` || `cua.DockerRuntime` | [`cua_sandbox.runtime.DockerRuntime`](/cua-sdk/reference/python/runtimes#dockerruntime) | `cua[sandbox]` |-| `cua.EnvTransport` | [`cua_sandbox.EnvTransport`](/cua-sdk/reference/python/configuration#envtransport) | `cua[sandbox]` |+| `cua.EnvTransport` | [`cua_sandbox.EnvTransport`](/cua-sdk/reference/python/runtimes#envtransport) | `cua[sandbox]` || `cua.HyperVRuntime` | [`cua_sandbox.runtime.HyperVRuntime`](/cua-sdk/reference/python/runtimes#hypervruntime) | `cua[sandbox]` |-| `cua.Image` | [`cua_sandbox.Image`](/cua-sdk/reference/python/image#image) | `cua[sandbox]` |+| `cua.Image` | [`cua_sandbox.Image`](/cua-sdk/reference/python/sandbox#image) | `cua[sandbox]` || `cua.Keyboard` | [`cua_sandbox.interfaces.keyboard.Keyboard`](/cua-sdk/reference/python/interfaces#keyboard) | `cua[sandbox]` |-| `cua.login` | [`cua_sandbox.login`](/cua-sdk/reference/python/configuration#login) | `cua[sandbox]` |+| `cua.login` | [`cua_sandbox.login`](/cua-sdk/reference/python/runtimes#login) | `cua[sandbox]` || `cua.LumeRuntime` | [`cua_sandbox.runtime.LumeRuntime`](/cua-sdk/reference/python/runtimes#lumeruntime) | `cua[sandbox]` || `cua.Messages` | `cua_agent.Messages` | `cua[agent]` || `cua.Mobile` | [`cua_sandbox.interfaces.mobile.Mobile`](/cua-sdk/reference/python/interfaces#mobile) | `cua[sandbox]` || `cua.Mouse` | [`cua_sandbox.interfaces.mouse.Mouse`](/cua-sdk/reference/python/interfaces#mouse) | `cua[sandbox]` |-| `cua.Pool` | [`cua_sandbox.Pool`](/cua-sdk/reference/python/pool#pool) | `cua[sandbox]` |-| `cua.PoolAccessDeniedError` | [`cua_sandbox.PoolAccessDeniedError`](/cua-sdk/reference/python/pool#poolaccessdeniederror) | `cua[sandbox]` |+| `cua.Pool` | `cua_sandbox.Pool` | `cua[sandbox]` |+| `cua.PoolAccessDeniedError` | `cua_sandbox.PoolAccessDeniedError` | `cua[sandbox]` || `cua.QEMURuntime` | [`cua_sandbox.runtime.QEMURuntime`](/cua-sdk/reference/python/runtimes#qemuruntime) | `cua[sandbox]` || `cua.register_agent` | `cua_agent.register_agent` | `cua[agent]` || `cua.RuntimeInfo` | [`cua_sandbox.runtime.RuntimeInfo`](/cua-sdk/reference/python/runtimes#runtimeinfo) | `cua[sandbox]` |@@ -191,13 +187,13 @@ def resolve(| `cua.Screen` | [`cua_sandbox.interfaces.screen.Screen`](/cua-sdk/reference/python/interfaces#screen) | `cua[sandbox]` || `cua.Shell` | [`cua_sandbox.interfaces.shell.Shell`](/cua-sdk/reference/python/interfaces#shell) | `cua[sandbox]` || `cua.skip_if_unsupported` | [`cua_sandbox.skip_if_unsupported`](/cua-sdk/reference/python/runtimes#skip_if_unsupported) | `cua[sandbox]` |-| `cua.SpacesdNotAvailable` | [`cua_sandbox.SpacesdNotAvailable`](/cua-sdk/reference/python/configuration#spacesdnotavailable) | `cua[sandbox]` |+| `cua.SpacesdNotAvailable` | [`cua_sandbox.SpacesdNotAvailable`](/cua-sdk/reference/python/runtimes#spacesdnotavailable) | `cua[sandbox]` || `cua.TartRuntime` | [`cua_sandbox.runtime.TartRuntime`](/cua-sdk/reference/python/runtimes#tartruntime) | `cua[sandbox]` |-| `cua.Template` | [`cua_sandbox.Template`](/cua-sdk/reference/python/pool#template) | `cua[sandbox]` |+| `cua.Template` | `cua_sandbox.Template` | `cua[sandbox]` || `cua.Terminal` | [`cua_sandbox.interfaces.terminal.Terminal`](/cua-sdk/reference/python/interfaces#terminal) | `cua[sandbox]` |-| `cua.Tunnel` | [`cua_sandbox.interfaces.tunnel.Tunnel`](/cua-sdk/reference/python/services#tunnel) | `cua[sandbox]` |-| `cua.TunnelInfo` | [`cua_sandbox.interfaces.tunnel.TunnelInfo`](/cua-sdk/reference/python/services#tunnelinfo) | `cua[sandbox]` |-| `cua.whoami` | [`cua_sandbox.whoami`](/cua-sdk/reference/python/configuration#whoami) | `cua[sandbox]` |+| `cua.Tunnel` | [`cua_sandbox.interfaces.tunnel.Tunnel`](/cua-sdk/reference/python/sandbox#tunnel) | `cua[sandbox]` |+| `cua.TunnelInfo` | [`cua_sandbox.interfaces.tunnel.TunnelInfo`](/cua-sdk/reference/python/sandbox#tunnelinfo) | `cua[sandbox]` |+| `cua.whoami` | [`cua_sandbox.whoami`](/cua-sdk/reference/python/runtimes#whoami) | `cua[sandbox]` || `cua.Window` | [`cua_sandbox.interfaces.window.Window`](/cua-sdk/reference/python/interfaces#window) | `cua[sandbox]` |### cua.runtimediff --git a/docs/content/docs/cua-sdk/reference/python/interfaces.mdx b/docs/content/docs/cua-sdk/reference/python/interfaces.mdxindex d2429fa986..b3c37a4a30 100644--- a/docs/content/docs/cua-sdk/reference/python/interfaces.mdx+++ b/docs/content/docs/cua-sdk/reference/python/interfaces.mdx@@ -14,7 +14,7 @@ Every sandbox exposes these interfaces as attributes (`sb.shell`, `sb.mouse`, ..| Needs | Interfaces || --- | --- |-| Nothing in the guest | `sb.service(name)`, `sb.public_url()`, `sb.tunnel`, `sb.mcp()` ([services](/cua-sdk/reference/python/services)) |+| Nothing in the guest | `sb.service(name)`, `sb.public_url()`, `sb.tunnel`, `sb.mcp()` ([services](/cua-sdk/reference/python/sandbox#services-tunnels-and-mcp)) || cua-spacesd (the canonical `Image.linux()` has it) | `sb.shell`, `sb.files`, `sb.mouse`, `sb.keyboard`, `sb.screen`, `sb.clipboard`, `sb.terminal`, `sb.window`, `sb.apps` |Without cua-spacesd these fall back to the runtime's agentless path (QMP, VNC, SSH or ADB) where one exists, and otherwise raise `SpacesdNotAvailable`. Coordinates are screen pixels; input goes through Cua Driver in the guest.diff --git a/docs/content/docs/cua-sdk/reference/python/meta.json b/docs/content/docs/cua-sdk/reference/python/meta.jsonindex 98996a07f1..1f27d39bd7 100644--- a/docs/content/docs/cua-sdk/reference/python/meta.json+++ b/docs/content/docs/cua-sdk/reference/python/meta.json@@ -2,11 +2,7 @@"title": "Python high-level API","pages": ["sandbox",- "image",- "pool","interfaces",- "services",- "runtimes",- "configuration"+ "runtimes"]}diff --git a/docs/content/docs/cua-sdk/reference/python/pool.mdx b/docs/content/docs/cua-sdk/reference/python/pool.mdxdeleted file mode 100644index 5f1d526281..0000000000--- a/docs/content/docs/cua-sdk/reference/python/pool.mdx+++ /dev/null@@ -1,390 +0,0 @@-----title: "Pool"-description: "Pools, templates, sandbox specs and pool errors of cua-sandbox."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:python- Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.pool)- Version: cua-sandbox 0.9.1-*/}--`Pool` keeps warm cloud capacity for a `SandboxSpec`. `Sandbox.create` uses shared capacity; a named pool is for dedicated capacity.--Pools and `CloudOptions` belonged to Cua Cloud, which has ended. Every call here fails with a clear error, and the module is removed in `cua-sandbox` 0.10.0.--## Pools and templates--### Pool--```python-class Pool--Pool(*args: Any, **kwargs: Any)-```--A warm pool on Cua Cloud, which has ended. Every call raises-`cua_sandbox._ended.CloudEnded`.--#### Pool.reconcile--```python-@classmethod-async def reconcile(request: Any) -> 'Pool'-```--#### Pool.get--```python-@classmethod-async def get(name: str) -> 'Pool'-```--#### Pool.apply--```python-@classmethod-async def apply(*args: Any, **kwargs: Any) -> 'Pool'-```--#### Pool.export--```python-@staticmethod-async def export(name: str, *, terraform: bool = False) -> 'PoolExport | str'-```--#### Pool.check--```python-@staticmethod-async def check(name: str, spec: SandboxSpec) -> None-```--#### Pool.apply_template--```python-@staticmethod-async def apply_template(name: str, spec: SandboxSpec) -> None-```--#### Pool.delete--```python-async def delete() -> None-```--#### Pool.create_claim--```python-async def create_claim(- *,- spec: Any = None,- name: str | None = None,- ttl_seconds_after_created: int | None = None,-) -> Any-```--#### Pool.claim--```python-def claim(- *,- spec: Any = None,- name: str | None = None,- service: str = ENV_SERVICE,- time_to_start: float | None = None,- ttl_seconds_after_created: int | None = None,- agent_type: str | None = None,- claim_token: str | None = None,-) -> Any-```--### Template--```python-class Template--Template(*args: Any, **kwargs: Any)-```--A sandbox template on Cua Cloud, which has ended. Every call raises-`cua_sandbox._ended.CloudEnded`.--#### Template.reconcile--```python-@classmethod-async def reconcile(request: Any) -> 'Template'-```--## Managed pools (cua_sandbox.pools)--### pools--Managed Fleet pools: Cua Cloud has ended (CUA-1854).--Every call raises `cua_sandbox._ended.CloudEnded`; the module goes-away in the next minor release.--### list_pools--```python-async def list_pools(*args: Any, **kwargs: Any) -> list[ManagedPoolInfo]-```--### list_claims--```python-async def list_claims(*args: Any, **kwargs: Any) -> list[ClaimInfo]-```--### gc--```python-async def gc(*args: Any, **kwargs: Any) -> GcReport-```--### gc_pools--```python-async def gc_pools(*args: Any, **kwargs: Any) -> GcReport-```--### is_managed_pool_name--```python-def is_managed_pool_name(name: str, prefix: str = MANAGED_PREFIX) -> bool-```--### ManagedPoolInfo--```python-class ManagedPoolInfo--ManagedPoolInfo(- name: str,- spec_hash: Optional[str],- managed: bool,- replicas: Optional[int],- ready_replicas: Optional[int],- claims: int,- last_used: Optional[datetime],- created_at: Optional[str],-)-```--| Attribute | Type | Description |-| --- | --- | --- |-| `name` | `str` | |-| `spec_hash` | `Optional[str]` | |-| `managed` | `bool` | |-| `replicas` | `Optional[int]` | |-| `ready_replicas` | `Optional[int]` | |-| `claims` | `int` | |-| `last_used` | `Optional[datetime]` | |-| `created_at` | `Optional[str]` | |--### ClaimInfo--```python-class ClaimInfo--ClaimInfo(- name: str,- pool: str,- phase: Optional[str],- managed: bool,- created_at: Optional[str],-)-```--| Attribute | Type | Description |-| --- | --- | --- |-| `name` | `str` | |-| `pool` | `str` | |-| `phase` | `Optional[str]` | |-| `managed` | `bool` | |-| `created_at` | `Optional[str]` | |--### GcReport--```python-class GcReport--GcReport(- pools_deleted: list[str] = list(),- claims_deleted: list[str] = list(),- namespaces_deleted: list[str] = list(),- errors: list[str] = list(),-)-```--| Attribute | Type | Description |-| --- | --- | --- |-| `pools_deleted` | `list[str]` | |-| `claims_deleted` | `list[str]` | |-| `namespaces_deleted` | `list[str]` | |-| `errors` | `list[str]` | |--## Specs--### SandboxSpec--```python-class SandboxSpec--SandboxSpec(- image: Any = None,- command: Optional[Sequence[str]] = None,- args: Optional[Sequence[str]] = None,- env: dict[str, str] = dict(),- services: dict[str, int] = dict(),- wait_for: Any = None,- cpu: Optional[int] = None,- memory_mb: Optional[int] = None,- memory: Union[str, int, None] = None,- efi: bool = False,- sidecars: Sequence[Any] = (),- registry_secret: Any = None,- registry_secret_name: Optional[str] = None,- process_mode: Optional[str] = None,- claim_secrets: bool = False,-)-```--What a sandbox in a pool ran. Pools belonged to Cua Cloud, which has-ended; this data class is kept so existing imports keep working.--* `image`: an `cua_sandbox.Image` or a registry reference.-* `command` / `args`: argv replacing the image ENTRYPOINT / CMD.-* `env`: plain environment variables (not secrets).-* `services`: named guest ports, `{"mcp": 8765}`.-* `wait_for`: `tcp("mcp")` / `http("mcp", "/health")`.-* `cpu` / `memory_mb` (or `memory="4GB"`).-* `sidecars`: `cua_sandbox.Container` (or image strings).-* `registry_secret`: a `cua_sandbox.RegistrySecret`;- `registry_secret_name` references an existing one.-* `process_mode`: `"Legacy"` or `"Run"`.-* `claim_secrets`: claims may carry a per-claim env token.--| Attribute | Type | Description |-| --- | --- | --- |-| `image` | `Any` | |-| `command` | `Optional[Sequence[str]]` | |-| `args` | `Optional[Sequence[str]]` | |-| `env` | `dict[str, str]` | |-| `services` | `dict[str, int]` | |-| `wait_for` | `Any` | |-| `cpu` | `Optional[int]` | |-| `memory_mb` | `Optional[int]` | |-| `memory` | `Union[str, int, None]` | |-| `efi` | `bool` | |-| `sidecars` | `Sequence[Any]` | |-| `registry_secret` | `Any` | |-| `registry_secret_name` | `Optional[str]` | |-| `process_mode` | `Optional[str]` | |-| `claim_secrets` | `bool` | |--### PoolOptions--```python-class PoolOptions--PoolOptions(- runtime: Optional[str] = None,- replicas: Optional[int] = None,- warm: Optional[bool] = None,- min_pool_size: Optional[int] = None,- max_pool_size: Optional[int] = None,- idle_ttl: Seconds = None,- ttl_policy: Optional[str] = None,- pool_ttl: Seconds = None,- claim_ttl: Seconds = None,-)-```--How a pool kept capacity for a `SandboxSpec`. Pools belonged to-Cua Cloud, which has ended; this data class is kept so existing imports-keep working.--* `runtime`: `"gvisor"` or `"kubevirt"`.-* `replicas`: size of a pool without autoscaling.-* `warm`: keep one sandbox ready.-* `min_pool_size` / `max_pool_size`: autoscaling floor / ceiling.-* `idle_ttl`: delete the pool after this long without claims.-* `ttl_policy`: `"Retain"` or `"Cascade"`.-* `pool_ttl`: pool creation-age TTL.-* `claim_ttl`: default TTL of claims made on the pool.--Durations are seconds or a `timedelta`.--| Attribute | Type | Description |-| --- | --- | --- |-| `runtime` | `Optional[str]` | |-| `replicas` | `Optional[int]` | |-| `warm` | `Optional[bool]` | |-| `min_pool_size` | `Optional[int]` | |-| `max_pool_size` | `Optional[int]` | |-| `idle_ttl` | `Seconds` | |-| `ttl_policy` | `Optional[str]` | |-| `pool_ttl` | `Seconds` | |-| `claim_ttl` | `Seconds` | |--### PoolExport--```python-class PoolExport--PoolExport(name: str, runtime: str, spec: Any, options: Any, terraform: str)-```--A pool read back as the shared model (`Pool.export`).--| Attribute | Type | Description |-| --- | --- | --- |-| `name` | `str` | |-| `runtime` | `str` | |-| `spec` | `Any` | |-| `options` | `Any` | |-| `terraform` | `str` | |--### generate_claim_token--```python-def generate_claim_token() -> str-```--A fresh per-claim env token (64 hex characters).--## Errors--### PoolSpecMismatch--```python-class PoolSpecMismatch(InvalidArgument)-```--A named cloud pool's template differs from the sandbox fields given-with it. Pools belonged to Cua Cloud, which has ended; nothing raises this-any more.--### ClaimSecretsNotDelivered--```python-class ClaimSecretsNotDelivered(TimeoutError)-```--A claim bound, but its per-claim secrets (the env token) never reached-the sandbox. Claims belonged to Cua Cloud, which has ended; nothing raises-this any more.--### PoolAccessDeniedError--```python-class PoolAccessDeniedError(PermissionError)-```--A pool or template operation was refused for this credential. Pools-belonged to Cua Cloud, which has ended; nothing raises this any more.diff --git a/docs/content/docs/cua-sdk/reference/python/runtimes.mdx b/docs/content/docs/cua-sdk/reference/python/runtimes.mdxindex 04f0eb4efa..5879a3f2c7 100644--- a/docs/content/docs/cua-sdk/reference/python/runtimes.mdx+++ b/docs/content/docs/cua-sdk/reference/python/runtimes.mdx@@ -1,12 +1,12 @@----title: "Runtimes"-description: "Local runtimes (Docker, QEMU, Lume, Hyper-V, Tart, Android emulator) and local support checks."+title: "Runtimes and configuration"+description: "Local runtimes (Docker, QEMU, Lume, Hyper-V, Tart, Android emulator), support checks, configuration, sign-in and errors."---{/*AUTO-GENERATED FILE - DO NOT EDIT DIRECTLYGenerated by: pnpm --dir docs docs:generate:python- Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.runtimes)+ Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.runtimes, cua_sandbox.configuration)Version: cua-sandbox 0.9.1*/}@@ -758,3 +758,261 @@ async def take_screenshot() -> bytes```Take a screenshot via ADB screencap.++## Configuration and errors++Process-wide settings, sign-in helpers, transports and the typed errors of `cua-sandbox`.++## Configuration and sign-in++### configure++```python+def configure(+ *,+ api_key: Optional[str] = None,+ base_url: Optional[str] = None,+ fleet_base_url: Optional[str] = None,+ token_url: Optional[str] = None,+ client_id: Optional[str] = None,+ client_secret: Optional[str] = None,+ fleet_token: Optional[str] = None,+) -> None+```++Set global configuration.++`api_key` and `base_url` apply to the legacy `login()` and+`whoami()` helpers. `fleet_base_url`, `token_url`, `client_id`,+`client_secret` and `fleet_token` configured Cua Cloud, which has+ended: they are accepted so existing calls keep working, and ignored.++### login++```python+def login(*, base_url: Optional[str] = None) -> None+```++Open the CUA login page in a browser and store credentials.++This initiates a Clerk-based browser authentication flow.+The user completes login in their browser, and the resulting+API key is stored in ~/.cua/credentials.++### whoami++```python+def whoami(*, api_key: Optional[str] = None) -> Dict[str, Any]+```++Return info about the authenticated user.++**Returns:** Dict with user info (id, email, etc.) from the CUA API.++## Errors++### SpacesdNotAvailable++```python+class SpacesdNotAvailable(RuntimeError)+```++The sandbox has no reachable cua-spacesd.++Sandboxes are daemon-agnostic: creating, listing and deleting them never+needs a guest agent. The computer interfaces (`screen`, `mouse`,+`shell`, `files` ...) need cua-spacesd, or one of the agentless+transports (QMP, VNC, SSH, ADB) the runtime exposes.++### InvalidArgument++```python+class InvalidArgument(ValueError)+```++Contradictory or invalid options (the native SDK's+`CuaError.InvalidArgument`), for example `local=True` together with+`cloud=CloudOptions(...)`.++### InvalidPlacement++```python+class InvalidPlacement(InvalidArgument)+```++A location, kind and runtime that do not go together (the native+SDK's `CuaError.InvalidPlacement`), for example `kind="container"`+with `runtime="qemu"`, or `runtime="kubevirt"` locally. The message+lists the valid values.++### Unsupported++```python+class Unsupported(NotImplementedError)+```++The operation is not supported for this sandbox, image or provider+(the native SDK's `CuaError.Unsupported`). A `NotImplementedError`,+so older `except NotImplementedError` handlers still catch it.++## Transports++### CloudTransport++```python+class CloudTransport(Transport)+```++Retired: every Cua Cloud entry point raises `CloudEnded`.++### EnvTransport++```python+class EnvTransport(Transport)+```++Drives a sandbox through cua-spacesd.++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `url` | `Optional[str]` | `None` | spacesd URL (`http://host:3211` or a relay URL). Ignored when `env_factory` is given. |+| `token` | `Optional[str]` | `None` | spacesd token, if the driver requires one. |+| `env_factory` | `Optional[EnvFactory]` | `None` | coroutine returning a `cua.SpacesdClient` (used by local runtimes, which know how to reach the driver). |+| `environment` | `Optional[str]` | `None` | OS hint (`linux`, `windows`, `mac`) used before the driver has been reached. |+| `fallback` | `Optional[Transport]` | `None` | an agentless transport (QMP/VNC/SSH/ADB) to use when the sandbox has no spacesd. |+| `ready_timeout` | `float` | `0.0` | how long to keep retrying the spacesd probe on first use (a freshly booted VM starts its driver late). `0` probes once. |+| `native_sandbox` | `Any` | `None` | the `cua.Sandbox` handle, for port forwarding and named services. |++| Attribute | Type | Description |+| --- | --- | --- |+| `url` | `Optional[str]` | |++#### EnvTransport.connect++```python+async def connect() -> None+```++#### EnvTransport.disconnect++```python+async def disconnect() -> None+```++#### EnvTransport.spacesd++```python+async def spacesd() -> Any+```++The raw `cua.SpacesdClient` (typed client escape hatch).++#### EnvTransport.send++```python+async def send(action: str, **params: Any) -> Any+```++#### EnvTransport.screenshot++```python+async def screenshot(format: str = 'png', quality: int = 95) -> bytes+```++#### EnvTransport.get_screen_size++```python+async def get_screen_size() -> Dict[str, int]+```++#### EnvTransport.get_environment++```python+async def get_environment() -> str+```++#### EnvTransport.get_display_url++```python+async def get_display_url(*, share: bool = False) -> str+```++A browser URL for the sandbox's display.++With cua-spacesd (an `env` or `viewer` service), a link to its+HTML5 viewer carrying a scoped, expiring viewer ticket; the same+link serves `share=True`. For images without cua-spacesd, the page+of the first declared legacy web display service (`novnc`,+`display`, `web`; a raw RFB port 59xx is skipped, and+`share=True` returns its expiring public link), then the agentless+fallback's VNC address.++#### EnvTransport.request_service++```python+async def request_service(+ name: str,+ *,+ method: str,+ path: str,+ json_body: Any = None,+ headers: Any = None,+) -> Any+```++#### EnvTransport.native_handle++```python+async def native_handle() -> Any+```++The `cua.Sandbox` handle behind this transport (services,+forwards, public URLs).++#### EnvTransport.native_service++```python+async def native_service(name: str) -> Any+```++#### EnvTransport.forward_tunnel++```python+async def forward_tunnel(sandbox_port: int | str) -> 'TunnelInfo'+```++#### EnvTransport.close_tunnel++```python+async def close_tunnel(info: 'TunnelInfo') -> None+```++#### EnvTransport.pty_create++```python+async def pty_create(+ command: Optional[str] = None,+ cols: int = 120,+ rows: int = 40,+ cwd: Optional[str] = None,+ envs: Optional[Dict[str, str]] = None,+) -> Dict[str, Any]+```++#### EnvTransport.pty_send++```python+async def pty_send(pid: int, data: str) -> None+```++#### EnvTransport.pty_kill++```python+async def pty_kill(pid: int) -> bool+```++#### EnvTransport.pty_info++```python+async def pty_info(pid: int) -> Optional[Dict[str, Any]]+```diff --git a/docs/content/docs/cua-sdk/reference/python/sandbox.mdx b/docs/content/docs/cua-sdk/reference/python/sandbox.mdxindex ee46f5cd29..fb28e523b6 100644--- a/docs/content/docs/cua-sdk/reference/python/sandbox.mdx+++ b/docs/content/docs/cua-sdk/reference/python/sandbox.mdx@@ -1,12 +1,12 @@----title: "Sandbox"-description: "Sandbox, SandboxInfo, the sandbox() helper and the creation options of cua-sandbox."+title: "Sandbox, images and services"+description: "Sandbox, the sandbox() helper and its creation options, the Image builder, and the services, tunnels and MCP endpoints of a sandbox."---{/*AUTO-GENERATED FILE - DO NOT EDIT DIRECTLYGenerated by: pnpm --dir docs docs:generate:python- Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.sandbox)+ Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.sandbox, cua_sandbox.image, cua_sandbox.services)Version: cua-sandbox 0.9.1*/}@@ -894,3 +894,790 @@ case.| --- | --- | --- || `name` | `str` | || `candidates` | `list` | |++## Images and registries++`Image` is an immutable, chainable description of what a sandbox boots. Builder methods return a new `Image`.++Builder methods add layers and return a new `Image`. Locally, a container image is built into your container engine before boot; it is cached by content. Layers a build cannot run (`brew_install`, `choco_install`, ...) are applied after boot through cua-spacesd, so they need an image that runs it.++## Image builder++### Image++```python+class Image++Image(os_type: str, distro: str, version: str, kind: Optional[str] = None)+```++Immutable, chainable image specification.++Each mutation method returns a new Image instance so that builders+can be forked at any point.++| Attribute | Type | Description |+| --- | --- | --- |+| `os_type` | `str` | |+| `distro` | `str` | |+| `version` | `str` | |+| `kind` | `Optional[str]` | |++**Example**++{/* Examples: scripts/docs-generators/examples/cua-sdk/python/Image.py */}++```python test="docs" id="image-py" session="image-py"+from cua_sandbox import Image++img = Image.linux().apt_install("curl").pip_install("requests").env(DEBUG="1").expose(8080)+print(img.to_dict())+# {'os_type': 'linux', 'distro': 'ubuntu', 'version': '24.04', 'kind': None,+# 'layers': [{'type': 'apt_install', 'packages': ['curl']},+# {'type': 'pip_install', 'packages': ['requests']}],+# 'env': {'DEBUG': '1'}, 'ports': [8080]}+```++#### Image.linux++```python+@classmethod+def linux(+ distro: str = 'ubuntu',+ version: str = '24.04',+ kind: Optional[str] = None,+ tier: Optional[str] = None,+) -> Image+```++Linux: the canonical `ghcr.io/trycua/linux:<version>` image.++`kind=None` (or `"auto"`) runs what the image is (the rootfs: a+gVisor container locally and in the cloud); `kind="vm"` its+`-disk` containerDisk (QEMU locally, KubeVirt in the cloud);+`kind="container"` the rootfs. `Sandbox.create(kind=...)`+overrides it.++`tier`: `"full"` (the default: dev tooling) or `"slim"`+(`24.04-slim`: cua-spacesd and Chromium only; what CI runs). A tier+CI has not published yet raises `CuaError.ImageNotPublished`; use+`Image.from_registry(ref)` to run it anyway.++#### Image.macos++```python+@classmethod+def macos(version: str = '26', kind: str = 'vm', tier: Optional[str] = None) -> Image+```++macOS: the canonical `ghcr.io/trycua/macos:<version>` image (Lume locally).++Supported versions: `"15"` / `"sequoia"`, `"26"` / `"tahoe"`.+`tier`: `"full"` (the default), `"slim"` or `"xcode"` /+`"xcode-<X.Y>"` (full plus one pinned Xcode); unpublished tiers+raise `CuaError.ImageNotPublished`.++#### Image.windows++```python+@classmethod+def windows(+ version: str = '2022',+ kind: str = 'vm',+ tier: Optional[str] = None,+) -> Image+```++Windows: the canonical `ghcr.io/trycua/windows:2022` containerDisk.++Other versions, including `"11"`, have no canonical image: they are+installed from a downloaded evaluation ISO. `tier="slim"` names+`2022-slim` once published.++#### Image.omarchy++```python+@classmethod+def omarchy(channel: Optional[str] = None) -> Image+```++Omarchy (Arch Linux, Hyprland) with cua-spacesd:+`ghcr.io/trycua/omarchy:edge` (or `"rc"`/`"stable"`).++An amd64 VM: QEMU locally (emulated on arm64 hosts, so slow there),+KubeVirt in the cloud. Until CI publishes it this raises+`CuaError.ImageNotPublished`; use+`Image.from_registry("ghcr.io/trycua/omarchy:edge", kind="vm")` to+run it anyway.++#### Image.android++```python+@classmethod+def android(version: str = '14', kind: str = 'vm') -> Image+```++Android image. Always a VM (QEMU emulator).++#### Image.from_registry++```python+@classmethod+def from_registry(+ ref: str,+ *,+ os_type: str = 'linux',+ kind: Optional[str] = None,+ agent_type: Optional[str] = None,+ secret: Optional[Any] = None,+) -> Image+```++Create an image from a registry reference.++`secret` (a `cua_sandbox.RegistrySecret`) pulls a private+image, the same way locally (the pull) and in the cloud (a registry+pull secret for the sandbox). It is never logged or saved.++os_type selects the firmware: Windows guest disks are built UEFI-only,+so a Windows containerDisk pulled from a registry must say so or it is+handed BIOS and will not boot. kind is resolved after pull when omitted.+agent_type names the guest control server the disk already runs, the+same hint as `from_file`: `"osworld"` selects the OSWorld Flask+server on port 5000 instead of the computer-server on 8000, for local+QEMU.++#### Image.from_file++```python+@classmethod+def from_file(+ path: str,+ *,+ os_type: str = 'windows',+ kind: str = 'vm',+ agent_type: Optional[str] = None,+) -> Image+```++Create an image from a local disk, ISO file, or URL.++Supported formats: qcow2, vhdx, raw, img, iso.+URLs (http/https) are downloaded automatically. Zip files are extracted.+For ISOs, the runtime will create a qcow2 disk and attach the ISO+as a CD-ROM for installation/boot.++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `path` | `str` | required | Local file path or URL (http/https). |+| `os_type` | `str` | `'windows'` | OS type hint ("linux", "windows", "macos", "android"). |+| `kind` | `str` | `'vm'` | "vm" or "container". |+| `agent_type` | `Optional[str]` | `None` | Agent type hint (e.g. "osworld" for OSWorld Flask server). |++#### Image.from_dict++```python+@classmethod+def from_dict(data: Dict[str, Any]) -> Image+```++Reconstruct an Image from a serialized spec dict.++**Example**++{/* Examples: scripts/docs-generators/examples/cua-sdk/python/Image.from_dict.py */}++```python test="docs" id="image-from-dict-py" session="image-from-dict-py"+from cua_sandbox import Image++base = Image.linux().apt_install("git")+dev = base.pip_install("rich")+same = Image.from_dict(dev.to_dict()).to_dict() == dev.to_dict()+print([same, len(base.to_dict()["layers"]), len(dev.to_dict()["layers"])])+# [True, 1, 2]+```++#### Image.apt_install++```python+def apt_install(*packages: str) -> Image+```++Install packages via apt (Linux only).++#### Image.brew_install++```python+def brew_install(*packages: str) -> Image+```++Install packages via Homebrew (macOS).++#### Image.choco_install++```python+def choco_install(*packages: str) -> Image+```++Install packages via Chocolatey (Windows).++#### Image.winget_install++```python+def winget_install(*packages: str) -> Image+```++Install packages via winget (Windows).++#### Image.apk_install++```python+def apk_install(*apk_paths: str) -> Image+```++Install APK files via adb (Android only).++#### Image.pwa_install++```python+def pwa_install(+ manifest_url: str,+ package_name: Optional[str] = None,+ keystore: Optional[str] = None,+ keystore_alias: str = 'android',+ keystore_password: str = 'android',+ builder: str = 'pwa2apk',+ push_timeout: Optional[float] = None,+) -> 'Image'+```++Build an APK from a PWA manifest URL and install it (Android only).++Two builder backends are supported:++* `"pwa2apk"` (default): generates a lightweight WebView-based APK.+ No Chrome dependency, no "Running in Chrome" banner, no Digital Asset+ Links needed. ~10 KB APK.+* `"bubblewrap"`: generates a Chrome Trusted Web Activity (TWA) APK.+ Requires Chrome on the device and a matching+ `/.well-known/assetlinks.json` on the server. Shows a mandatory+ "Running in Chrome" privacy disclosure on every launch.++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `manifest_url` | `str` | required | Full URL to the PWA's `manifest.json` or `manifest.webmanifest`. Example: `"http://10.0.2.2:3000/manifest.json"` |+| `package_name` | `Optional[str]` | `None` | Android package ID. Defaults to a reversed-hostname derivation (e.g. `"com.example.app"`). |+| `keystore` | `Optional[str]` | `None` | Path to a `*.keystore` / `*.jks` file. When omitted a fresh keystore is generated and cached. Pass the keystore bundled with your PWA repo so the fingerprint is deterministic. |+| `keystore_alias` | `str` | `'android'` | Key alias inside the keystore (default `"android"`). |+| `keystore_password` | `str` | `'android'` | Password for both the store and the key (default `"android"`). |+| `builder` | `str` | `'pwa2apk'` | `"pwa2apk"` (default) or `"bubblewrap"`. |+| `push_timeout` | `Optional[float]` | `None` | Optional seconds for the `write_bytes` `adb push` of the built APK. When `None` the server default applies. |++#### Image.uv_install++```python+def uv_install(*packages: str) -> Image+```++Install Python packages via uv add into the cua-server project.++#### Image.pip_install++```python+def pip_install(*packages: str) -> Image+```++Install Python packages via pip.++#### Image.app_install++```python+def app_install(app_id: str) -> Image+```++Install an app from the cua-sandbox-apps catalog.++Requires `cua-sandbox-apps` to be installed. The app's install+script for this image's OS is executed as a build layer.++#### Image.run++```python+def run(command: str) -> Image+```++Run a shell command during image build.++#### Image.env++```python+def env(**variables: str) -> Image+```++Set environment variables.++#### Image.copy++```python+def copy(src: str, dst: str) -> Image+```++Copy a file into the image.++#### Image.expose++```python+def expose(port: int) -> Image+```++Expose a port.++#### Image.to_build_recipe++```python+def to_build_recipe(+ *,+ name: str,+ namespace: str,+ tags: Mapping[str, str] | None = None,+ timeout_seconds: int | None = None,+ disk_size: str | None = None,+ file_references: Mapping[str, ImageFileReference] | None = None,+) -> Dict[str, Any]+```++Return a CRD-validated Image custom-resource manifest.++#### Image.to_dict++```python+def to_dict() -> Dict[str, Any]+```++Serialize to a plain dict suitable for JSON or cloud API.++#### Image.to_cloud_init++```python+def to_cloud_init() -> str+```++Generate a cloud-init user-data script from the image layers.++#### Image.local_support++```python+def local_support()+```++Check whether this image can run locally on the current host.++Returns a `cua_sandbox.runtime.compat.RuntimeSupport` describing:++- `supported` : runtime is available or auto-installable on this OS+- `hw_accel` : hardware acceleration (HVF / KVM / Hyper-V) is available+- `runtime_installed`: runtime binary found right now (no install needed)+- `auto_installable`: SDK can install the runtime automatically+- `reason` : human-readable explanation++In tests, use the bundled helper instead of checking manually:++```python+from cua_sandbox.runtime.compat import skip_if_unsupported++async def test_something():+ skip_if_unsupported(Image.macos())+ async with Sandbox.ephemeral(Image.macos(), local=True) as sb:+ ...+```++### ImageInfo++```python+class ImageInfo++ImageInfo(+ reference: str,+ pinned_ref: str,+ digest: str,+ variant: str,+ arch: Optional[str],+ os: str,+ emulated: bool,+)+```++The image a sandbox runs, as resolved and pinned at create time.++`reference` is the reference as requested (normalised, e.g.+`docker.io/library/python:3.12-slim`), `pinned_ref` the+`registry/repo@sha256:...` that ran, `variant` one of `rootfs`,+`containerdisk` or `lume`, `arch` the architecture that+ran (`amd64`/`arm64`, when known), `os` the guest OS and+`emulated` whether it ran under emulation.++| Attribute | Type | Description |+| --- | --- | --- |+| `reference` | `str` | |+| `pinned_ref` | `str` | |+| `digest` | `str` | |+| `variant` | `str` | |+| `arch` | `Optional[str]` | |+| `os` | `str` | |+| `emulated` | `bool` | |++## Containers and registries++### Container++```python+class Container++Container(+ image: str,+ command: Optional[Sequence[str]] = None,+ env: Optional[Mapping[str, str]] = None,+ ports: Optional[Sequence[int]] = None,+ name: Optional[str] = None,+)+```++A sidecar container, reachable from the sandbox at its `name`.++`name` (a DNS label, not `main`) defaults from the image (`redis`+for `redis:7-alpine`); the sidecar reaches the sandbox at `main`.+`command` replaces the image's entrypoint. `env` holds plain values,+not secrets.++| Attribute | Type | Description |+| --- | --- | --- |+| `image` | `str` | |+| `command` | `Optional[Sequence[str]]` | |+| `env` | `Optional[Mapping[str, str]]` | |+| `ports` | `Optional[Sequence[int]]` | |+| `name` | `Optional[str]` | |++#### Container.native++```python+def native() -> Any+```++### RegistrySecret++```python+class RegistrySecret++RegistrySecret(+ username: str,+ password: str,+ *,+ registry: Optional[str] = None,+)+```++Credentials for a private registry image.++* `RegistrySecret(username, password)`: explicit values (a token works+ as the password).+* `RegistrySecret.from_env()`: read `CUA_REGISTRY_USERNAME` /+ `CUA_REGISTRY_PASSWORD` (or the variables you name) at create time.+* `RegistrySecret.aws_ecr(region=None)`: a private Amazon ECR image,+ with a login token from the AWS CLI.++`registry` scopes them to one host; by default they apply to the+image's registry. The password never appears in `repr` or logs.++| Attribute | Type | Description |+| --- | --- | --- |+| `registry` | `Optional[str]` | |+| `username` | `Optional[str]` | |++**Example**++{/* Examples: scripts/docs-generators/examples/cua-sdk/python/RegistrySecret.py */}++```python test="docs" id="registry-secret-py" session="registry-secret-py"+from cua_sandbox import Image, RegistrySecret++print(Image.from_registry("python:3.12-slim").to_dict()["registry"])+print(repr(RegistrySecret("robot", "s3cr3t", registry="registry.example.com"))) # the password never shows+```++#### RegistrySecret.from_env++```python+@classmethod+def from_env(+ username_var: str = 'CUA_REGISTRY_USERNAME',+ password_var: str = 'CUA_REGISTRY_PASSWORD',+ *,+ registry: Optional[str] = None,+) -> 'RegistrySecret'+```++#### RegistrySecret.aws_ecr++```python+@classmethod+def aws_ecr(region: Optional[str] = None) -> 'RegistrySecret'+```++#### RegistrySecret.native++```python+def native() -> Any+```++### ImageFileReference++```python+class ImageFileReference(BaseModel)+```++| Attribute | Type | Description |+| --- | --- | --- |+| `model_config` | `ConfigDict` | |+| `digest` | `constr(pattern='^sha256:[0-9a-f]{64}$')` | |+| `reference` | `constr(pattern='^uploads/[a-z0-9]([-a-z0-9]*[a-z0-9])?/[A-Za-z0-9_-]+$', min_length=1, max_length=2048)` | |+| `size_bytes` | `conint(ge=0, le=9007199254740991)` | |++## Services, tunnels and MCP++Reach ports inside a sandbox: named services, tunnels, shareable URLs and MCP servers.++## Named services++### ServiceHandle++```python+class ServiceHandle+```++One named service of a sandbox (`sb.service("mcp")`).++The same calls work local and in the cloud: requests carry your headers+(the cloud gateway's credentials are added for you), `url()` is usable+from this machine and `public_url()` can be shared.++| Attribute | Type | Description |+| --- | --- | --- |+| `name` | `str` | |++#### ServiceHandle.request++```python+async def request(+ method: str,+ path: str = '/',+ *,+ headers: Headers = None,+ body: bytes | str | None = None,+ json: Any = None,+ timeout: float = 30.0,+) -> Any+```++One HTTP request to `path` on the service; returns an+`httpx.Response`. `authorization` is refused in the cloud, where+the gateway credentials own it.++#### ServiceHandle.url++```python+async def url() -> str+```++A URL for the service usable from this machine with no credentials+(no trailing slash): the published loopback port locally, a signed+URL (1 h, renewed on later calls) in the cloud.++#### ServiceHandle.public_url++```python+async def public_url(ttl: float = 3600, *, label: Optional[str] = None) -> 'PublicUrl'+```++A shareable URL that stops working after `ttl` seconds (60 s to+24 h). See `cua_sandbox.Sandbox.public_url`.++### Services++```python+class Services+```++Request a named service exposed by the active sandbox connection.++#### Services.request++```python+async def request(+ name: str,+ *,+ method: str,+ path: str,+ json: Any = None,+ headers: dict[str, str] | None = None,+) -> Any+```++Send a request to a named service on this sandbox.++Prefer `sb.service(name).request(...)`, which works the same local+and in the cloud.++#### Services.create_signed_url++```python+async def create_signed_url(+ name: str,+ *,+ expires_in_seconds: int,+ label: str | None = None,+) -> SignedServiceURL+```++Create a revocable public URL for a named cloud service.++Prefer `sb.public_url(name, ttl=...)`, which also works locally.++#### Services.list_signed_urls++```python+async def list_signed_urls() -> list[SignedServiceURL]+```++List signed service URLs created for this cloud sandbox.++#### Services.revoke_signed_url++```python+async def revoke_signed_url(signed_url: SignedServiceURL) -> None+```++Revoke a previously created signed service URL.++### SignedServiceURL++```python+class SignedServiceURL+```++A revocable public URL for one sandbox service.++Provider internals (the cloud namespace and claim) live in `details`.++| Attribute | Type | Description |+| --- | --- | --- |+| `id` | `str` | |+| `sandbox` | `str` | |+| `service` | `str` | |+| `label` | `str \| None` | |+| `url` | `str` | |+| `created_at` | `str` | |+| `expires_at` | `str` | |+| `revoked_at` | `str \| None` | |+| `details` | `dict` | |+| `namespace` | `str \| None` | Deprecated: `details["namespace"]`. |+| `claim` | `str \| None` | Deprecated: `details["claim"]`. |++#### SignedServiceURL.from_resource++```python+@classmethod+def from_resource(resource: Any) -> 'SignedServiceURL'+```++## Tunnels++### Tunnel++```python+class Tunnel+```++Port-forwarding interface: exposes sandbox ports on the host.++#### Tunnel.forward++```python+def forward(*ports: int | str) -> _TunnelContext+```++Forward one or more sandbox ports (or abstract sockets) to the host.++*ports* may be:+- `int`: TCP port inside the sandbox (e.g. `8080`)+- `str`: Android abstract socket name (e.g. `"chrome_devtools_remote"`)++Returns a context manager (or awaitable) that yields:+- a single `TunnelInfo` when one target is given+- a `dict[sandbox_port, TunnelInfo]` when multiple targets are given++Example: Chrome DevTools over ADB:++```python+async with sb.tunnel.forward("chrome_devtools_remote") as t:+ # http://localhost:<random>/json lists CDP targets+ print(t.url)+```++### TunnelInfo++```python+class TunnelInfo+```++A single forwarded port.++| Attribute | Type | Description |+| --- | --- | --- |+| `host` | `str` | |+| `port` | `int` | |+| `sandbox_port` | `int` | |+| `url` | `str` | |++#### TunnelInfo.close++```python+async def close() -> None+```++Close this tunnel (no-op if already closed or inside a context manager).++## MCP++### mcp_config++```python+async def mcp_config(+ service: Callable[[], Awaitable[Any]],+ path: str = '/mcp',+) -> Dict[str, Any]+```++`{"url": ..., "headers": {...}}` of the MCP endpoint at `path`.++### connect++```python+async def connect(config: Dict[str, Any]) -> AsyncIterator[Any]+```++An initialized official-SDK client for `config` (`url`, `headers`).++With `mcp` 2.x this is an `mcp.Client` (protocol negotiated with+`server/discover`, falling back to `initialize`); with 1.x an+initialized `mcp.ClientSession`.++### open_mcp++```python+async def open_mcp(+ service: Callable[[], Awaitable[Any]],+ path: str = '/mcp',+) -> AsyncIterator[Any]+```++`connect(await mcp_config(service, path))`.diff --git a/docs/content/docs/cua-sdk/reference/python/services.mdx b/docs/content/docs/cua-sdk/reference/python/services.mdxdeleted file mode 100644index de3d7ec99a..0000000000--- a/docs/content/docs/cua-sdk/reference/python/services.mdx+++ /dev/null@@ -1,249 +0,0 @@-----title: "Services, tunnels and MCP"-description: "Named services, signed and public URLs, tunnels and MCP endpoints of a cua-sandbox sandbox."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:python- Source: griffe over libs/python/cua-sandbox/cua_sandbox (cua_sandbox.services)- Version: cua-sandbox 0.9.1-*/}--Reach ports inside a sandbox: named services, tunnels, shareable URLs and MCP servers.--## Named services--### ServiceHandle--```python-class ServiceHandle-```--One named service of a sandbox (`sb.service("mcp")`).--The same calls work local and in the cloud: requests carry your headers-(the cloud gateway's credentials are added for you), `url()` is usable-from this machine and `public_url()` can be shared.--| Attribute | Type | Description |-| --- | --- | --- |-| `name` | `str` | |--#### ServiceHandle.request--```python-async def request(- method: str,- path: str = '/',- *,- headers: Headers = None,- body: bytes | str | None = None,- json: Any = None,- timeout: float = 30.0,-) -> Any-```--One HTTP request to `path` on the service; returns an-`httpx.Response`. `authorization` is refused in the cloud, where-the gateway credentials own it.--#### ServiceHandle.url--```python-async def url() -> str-```--A URL for the service usable from this machine with no credentials-(no trailing slash): the published loopback port locally, a signed-URL (1 h, renewed on later calls) in the cloud.--#### ServiceHandle.public_url--```python-async def public_url(ttl: float = 3600, *, label: Optional[str] = None) -> 'PublicUrl'-```--A shareable URL that stops working after `ttl` seconds (60 s to-24 h). See `cua_sandbox.Sandbox.public_url`.--### Services--```python-class Services-```--Request a named service exposed by the active sandbox connection.--#### Services.request--```python-async def request(- name: str,- *,- method: str,- path: str,- json: Any = None,- headers: dict[str, str] | None = None,-) -> Any-```--Send a request to a named service on this sandbox.--Prefer `sb.service(name).request(...)`, which works the same local-and in the cloud.--#### Services.create_signed_url--```python-async def create_signed_url(- name: str,- *,- expires_in_seconds: int,- label: str | None = None,-) -> SignedServiceURL-```--Create a revocable public URL for a named cloud service.--Prefer `sb.public_url(name, ttl=...)`, which also works locally.--#### Services.list_signed_urls--```python-async def list_signed_urls() -> list[SignedServiceURL]-```--List signed service URLs created for this cloud sandbox.--#### Services.revoke_signed_url--```python-async def revoke_signed_url(signed_url: SignedServiceURL) -> None-```--Revoke a previously created signed service URL.--### SignedServiceURL--```python-class SignedServiceURL-```--A revocable public URL for one sandbox service.--Provider internals (the cloud namespace and claim) live in `details`.--| Attribute | Type | Description |-| --- | --- | --- |-| `id` | `str` | |-| `sandbox` | `str` | |-| `service` | `str` | |-| `label` | `str \| None` | |-| `url` | `str` | |-| `created_at` | `str` | |-| `expires_at` | `str` | |-| `revoked_at` | `str \| None` | |-| `details` | `dict` | |-| `namespace` | `str \| None` | Deprecated: `details["namespace"]`. |-| `claim` | `str \| None` | Deprecated: `details["claim"]`. |--#### SignedServiceURL.from_resource--```python-@classmethod-def from_resource(resource: Any) -> 'SignedServiceURL'-```--## Tunnels--### Tunnel--```python-class Tunnel-```--Port-forwarding interface: exposes sandbox ports on the host.--#### Tunnel.forward--```python-def forward(*ports: int | str) -> _TunnelContext-```--Forward one or more sandbox ports (or abstract sockets) to the host.--*ports* may be:-- `int`: TCP port inside the sandbox (e.g. `8080`)-- `str`: Android abstract socket name (e.g. `"chrome_devtools_remote"`)--Returns a context manager (or awaitable) that yields:-- a single `TunnelInfo` when one target is given-- a `dict[sandbox_port, TunnelInfo]` when multiple targets are given--Example: Chrome DevTools over ADB:--```python-async with sb.tunnel.forward("chrome_devtools_remote") as t:- # http://localhost:<random>/json lists CDP targets- print(t.url)-```--### TunnelInfo--```python-class TunnelInfo-```--A single forwarded port.--| Attribute | Type | Description |-| --- | --- | --- |-| `host` | `str` | |-| `port` | `int` | |-| `sandbox_port` | `int` | |-| `url` | `str` | |--#### TunnelInfo.close--```python-async def close() -> None-```--Close this tunnel (no-op if already closed or inside a context manager).--## MCP--### mcp_config--```python-async def mcp_config(- service: Callable[[], Awaitable[Any]],- path: str = '/mcp',-) -> Dict[str, Any]-```--`{"url": ..., "headers": {...}}` of the MCP endpoint at `path`.--### connect--```python-async def connect(config: Dict[str, Any]) -> AsyncIterator[Any]-```--An initialized official-SDK client for `config` (`url`, `headers`).--With `mcp` 2.x this is an `mcp.Client` (protocol negotiated with-`server/discover`, falling back to `initialize`); with 1.x an-initialized `mcp.ClientSession`.--### open_mcp--```python-async def open_mcp(- service: Callable[[], Awaitable[Any]],- path: str = '/mcp',-) -> AsyncIterator[Any]-```--`connect(await mcp_config(service, path))`.diff --git a/docs/content/docs/cua-sdk/reference/rust/cua-fleet.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-fleet.mdxdeleted file mode 100644index ecb4fce4ea..0000000000--- a/docs/content/docs/cua-sdk/reference/rust/cua-fleet.mdx+++ /dev/null@@ -1,860 +0,0 @@-----title: "cua-fleet"-description: "The Fleet (cloud sandboxes) crate: pools, claims, builds and claim secrets."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-rust- Source: rustdoc JSON (nightly-2026-09-20, format 61) of cua-fleet- Version: 0.5.0-*/}--Public API of the `cua-fleet` crate (`cua_fleet`). Summaries and declarations only (`cargo doc -p cua-fleet --open` in `libs/cua` has the full comments); see [Rust crates](/cua-sdk/reference/rust) for stability.--Fleet for the cua SDK.--## Modules--- `autopool`: Automatic Fleet pools: `Sandbox.create(image)` on Fleet ...-- `billing`: Cua Cloud billing from an app: the account's billing ...-- `builds`: Remote image builds: Image layers (`pip_install` ...-- `claim_secrets`: Per-claim env tokens delivered by Fleet's claim Secrets.-- `limits`: The sandbox sizes the SDK asks Cua Cloud for.-- `parity`: Sandbox parity with the local runtimes: sidecars on ...-- `pricing`: Cua Cloud usage rates, read from Fleet.-- `runtime`: The Fleet runtime ↔ image pairing, validated in exactly ...-- `spec`: One sandbox model for pools and `Sandbox.create`.--## Types--### `AcquireOpts`--Per-acquire options.--```rust-pub struct AcquireOpts {- pub name: Option<String>,- pub warm: Option<bool>,- pub registry_credentials: Option<RegistryCredentials>,- pub max_pool_size: Option<u32>,- pub claim_ttl: Option<Duration>,- pub labels: BTreeMap<String, String>,- pub bind_deadline: Option<Duration>,- pub claim_token: Option<String>,-}-```--### `AutoPoolConfig`--Pool manager settings.--```rust-pub struct AutoPoolConfig {- pub warm: bool,- pub max_pool_size: u32,- pub claim_ttl: Duration,- pub heartbeat_every: Option<Duration>,- pub bind_deadline: Duration,- pub pool_ttl: Duration,- pub pool_ttl_renew_window: Duration,- pub idle_gc: Option<Duration>,- pub auto_gc_every: Duration,- pub home: PathBuf,- pub tenant: Option<String>,- pub clock: Clock,-}-impl AutoPoolConfig {- fn from_env() -> Self;- fn from_lookup(get: impl Fn(&str) -> Option<String>) -> Self;- fn with_state_dir(self, dir: &Path) -> Self;-}-```--### `BillingCard`--The saved card, as Fleet describes it (never its ...--```rust-pub struct BillingCard {- pub brand: String,- pub last4: String,- pub exp_month: u32,- pub exp_year: u32,-}-```--### `BillingCredit`--The account's Cua Cloud credit.--```rust-pub struct BillingCredit {- pub balance_usd_cents: i64,- pub signup_grant_usd_cents: i64,- pub signup_grant_unused: bool,-}-```--### `BillingStatus`--`GET /api/billing/status`.--```rust-pub struct BillingStatus {- pub billing_enabled: bool,- pub payment_method_present: bool,- pub card: Option<BillingCard>,- pub plan: String,- pub payg_available: bool,- pub credit: Option<BillingCredit>,- pub billing_url: Option<String>,-}-impl BillingStatus {- fn disabled() -> Self;-}-```--### `BuiltImage`--A built (or cached) image.--```rust-pub struct BuiltImage {- pub reference: String,- pub digest: String,- pub namespace: String,- pub name: String,- pub cached: bool,-}-```--### `claim_secrets::EnvTokenProbe`--The real probe: connects to the `env` service through ...--```rust-pub struct EnvTokenProbe;-```--### `ClaimOptions`--Claim options.--```rust-pub struct ClaimOptions {- pub name: Option<String>,- pub spec: Option<ClaimSpec>,- pub ttl_seconds_after_created: Option<u32>,- pub labels: Option<HashMap<String, String>>,- pub claim_token: Option<String>,-}-```--### `ClaimSecretsWait`--Probe settings of a `FleetClient` (tests shorten them).--```rust-pub struct ClaimSecretsWait {- pub budget: Duration,- pub every: Duration,- pub probe: Arc<dyn TokenProbe>,-}-```--### `Error`--Errors from this crate.--```rust-pub enum Error {- MissingCredentials,- InvalidArgument(String),- Sdk(SdkError),- AdmissionDenied { operation: String, status: u16, message: String },- CreditExhausted { message: String, billing_url: String },- UnknownService { sandbox: String, service: String, available: Vec<String> },- Timeout(String),- Env(Error),- Unsupported(String),- PoolSpecMismatch { pool: String, diffs: Vec<SpecDiff> },- ClaimSecretsNotDelivered { claim: String, runtime: String, waited: Duration, detail: String },-}-impl Error {- fn is_not_found(&self) -> bool;-}-```--### `FleetClient`--A Fleet client.--```rust-pub struct FleetClient { /* private fields */ }-impl FleetClient {- async fn get_pool_json(&self, name: &str) -> Result<Option<Value>>;- async fn patch_pool_json(&self, name: &str, patch: Value) -> Result<Value>;- async fn billing_status(&self) -> Result<BillingStatus>;- async fn build_image(&self, spec: &BuildSpec, creds: Option<&RegistryCredentials>, progress: Option<BuildProgress<'_>>) -> Result<BuiltImage>;- fn with_claim_secrets_wait(self, wait: ClaimSecretsWait) -> Self;- async fn delete_claim_secret(&self, ns: &str, claim: &str) -> Result<()>;- async fn await_claim_secrets(&self, sandbox: &BoundSandbox, token: &str, runtime: &RuntimeKind) -> Result<()>;- async fn put_registry_secret(&self, namespace: &str, name: &str, registry: &str, creds: &RegistryCredentials) -> Result<()>;- async fn delete_registry_secret(&self, namespace: &str, name: &str) -> Result<()>;- async fn apply_pool(&self, spec: &PoolSpec) -> Result<PoolHandle>; // Deprecated.- async fn get_pool(&self, name: &str) -> Result<PoolHandle>;- async fn pool_runtime(&self, pool: &Pool) -> Option<RuntimeKind>;- async fn pool_services(&self, pool: &Pool) -> Result<BTreeMap<String, u16>>;- async fn delete_pool(&self, handle: PoolHandle) -> Result<()>;- async fn set_pool_replicas(&self, handle: &mut PoolHandle, replicas: u32) -> Result<()>;- async fn wait_pool_ready(&self, handle: &PoolHandle, timeout: Duration) -> Result<Pool>;- async fn claim(&self, pool: &Pool, options: ClaimOptions) -> Result<(Claim, bool)>;- async fn wait_claim(&self, claim: &Claim) -> Result<BoundSandbox>;- async fn acquire(&self, pool: &Pool, options: ClaimOptions) -> Result<BoundSandbox>;- async fn attach_claim(&self, namespace: &str, name: &str) -> Result<BoundSandbox>;- async fn claim_image(&self, namespace: &str, name: &str) -> Result<Option<(String, RuntimeKind)>>;- async fn release(&self, namespace: &str, name: &str) -> Result<()>;- async fn keep_alive(&self, namespace: &str, name: &str, duration: Duration) -> Result<String>;- async fn list_claims(&self, namespace: &str) -> Result<Vec<Claim>>;- async fn find_claims(&self, name: &str) -> Result<Vec<Claim>>;- async fn usage_pricing(&self) -> Result<Option<UsagePricing>>;- async fn apply(&self, name: &str, spec: &SandboxSpec, options: &PoolOptions) -> Result<PoolHandle>;- async fn apply_with_credentials(&self, name: &str, spec: &SandboxSpec, options: &PoolOptions, credentials: Option<&RegistryCredentials>) -> Result<PoolHandle>;- async fn pool_template(&self, pool: &str) -> Result<(SandboxSpec, RuntimeKind, Value)>;- async fn export_pool(&self, pool: &str) -> Result<(SandboxSpec, PoolOptions, RuntimeKind)>;- async fn check_pool_spec(&self, pool: &str, requested: &SandboxSpec) -> Result<()>;- async fn apply_pool_template(&self, pool: &str, requested: &SandboxSpec, credentials: Option<&RegistryCredentials>) -> Result<()>;- fn from_env() -> Result<Self>;- fn connect(config: FleetConfig) -> Result<Self>;- fn connect_with_http_client(config: FleetConfig, http: Arc<dyn HttpClient>) -> Result<Self>;- fn connect_with_token_provider(config: FleetConfig, provider: Arc<dyn AccessTokenProvider>, http: Option<Arc<dyn HttpClient>>) -> Result<Self>;- fn sdk(&self) -> Arc<CyclopsClient>;- fn config(&self) -> &FleetConfig;- async fn access_token(&self, force_refresh: bool) -> Result<String>;- fn service_url(&self, sandbox: &BoundSandbox, service: &str) -> Result<String>;- async fn service_request(&self, sandbox: &BoundSandbox, service: &str, path: &str, method: &str, body: Option<Vec<u8>>, timeout: Option<Duration>) -> Result<HttpResponse>;- async fn service_request_with_headers(&self, sandbox: &BoundSandbox, service: &str, path: &str, method: &str, headers: &[(String, String)], body: Option<Vec<u8>>, timeout: Option<Duration>) -> Result<HttpResponse>;- fn env_connect_options(&self, sandbox: &BoundSandbox, service: &str, env_token: Option<String>) -> Result<ConnectOptions>;- async fn spacesd(&self, sandbox: &BoundSandbox, service: &str, env_token: Option<String>) -> Result<SpacesdClient>;- async fn list_images(&self, namespace: &str) -> Result<Vec<Value>>;- async fn get_image(&self, namespace: &str, name: &str) -> Result<Value>;- async fn create_image(&self, namespace: &str, manifest: Value) -> Result<Value>;- async fn delete_image(&self, namespace: &str, name: &str) -> Result<()>;- async fn upload_image_file(&self, namespace: &str, name: &str, contents: Vec<u8>) -> Result<ImageUploadInstruction>;- async fn create_signed_service_url(&self, sandbox: &BoundSandbox, service: &str, label: Option<String>, expires_in: Duration) -> Result<SignedServiceUrl>;- async fn list_signed_service_urls(&self, sandbox: &BoundSandbox) -> Result<Vec<SignedServiceUrl>>;- async fn revoke_signed_service_url(&self, url: SignedServiceUrl) -> Result<()>;-}-```--### `FleetConfig`--How to reach and authenticate to Fleet.--```rust-pub struct FleetConfig {- pub base_url: String,- pub token_url: String,- pub client_id: Option<String>,- pub client_secret: Option<String>,- pub fleet_token: Option<String>,- pub pool_poll_interval_ms: u64,- pub pool_poll_limit: u32,- pub claim_poll_interval_ms: u64,- pub claim_poll_limit: u32,-}-impl FleetConfig {- fn from_env() -> Self;- fn from_lookup(get: impl Fn(&str) -> Option<String>) -> Self;- fn accepts_session(&self) -> bool;- fn has_auth(&self) -> bool;-}-```--### `FleetImage`--An image resolved for Fleet: the reference to put in ...--```rust-pub struct FleetImage {- pub image: String,- pub runtime: RuntimeKind,- pub resolved: Option<ResolvedImage>,-}-```--### `GcReport`--What `PoolManager::gc` did.--```rust-pub struct GcReport {- pub deleted_pools: Vec<String>,- pub deleted_namespaces: Vec<String>,- pub deleted_claims: Vec<String>,- pub kept: Vec<String>,- pub errors: Vec<String>,-}-```--### `ImageEvidence`--What is known about an image before choosing its ...--```rust-pub enum ImageEvidence {- Known(ImageVariant),- Unsupported(String),- Unavailable(String),-}-```--### `ImageInspector`--Reads an image's manifest for `resolve_runtime`.--```rust-pub trait ImageInspector: Send + Sync {- async fn inspect(&self, image: &str) -> ImageEvidence;-}-```--### `ImageResolver`--Resolves an image tag to a digest-pinned reference ...--```rust-pub trait ImageResolver: Send + Sync {- async fn resolve(&self, image: &str) -> Option<String>;-}-```--### `ImageVariant`--What a Fleet image is, read from its manifest.--```rust-pub enum ImageVariant {- ContainerDisk,- Rootfs,- Other,-}-impl ImageVariant {- fn as_str(self) -> &'static str;- fn parse(value: &str) -> Result<Self>;- fn runtime(self) -> Option<RuntimeKind>;-}-```--### `ManagedClaim`--A claim on a managed pool.--```rust-pub struct ManagedClaim {- pub pool: String,- pub claim: String,- pub sandbox: BoundSandbox,- pub created_pool: bool,- pub reattached: bool,- pub bind_time: Duration,- pub claim_ttl: Duration,-}-impl ManagedClaim {- fn set_release_on_drop(&mut self, release: bool);- fn extend_until(&self, until: i64);- fn heartbeat_active(&self) -> bool;- async fn release(self) -> Result<()>;- fn detach(self) -> BoundSandbox;-}-```--### `ManagedPoolInfo`--A managed pool as `PoolManager::list` reports it.--```rust-pub struct ManagedPoolInfo {- pub name: String,- pub managed: bool,- pub spec_hash: Option<String>,- pub image: Option<String>,- pub replicas: u32,- pub ready_replicas: Option<u32>,- pub max_pool_size: Option<u32>,- pub claims: u32,- pub bound_claims: u32,- pub last_used: Option<i64>,- pub created: Option<i64>,- pub expires_at: Option<i64>,- pub terminating: bool,-}-```--### `PoolHandle`--A reconciled pool plus the template it owns (when ...--```rust-pub struct PoolHandle {- pub pool: Pool,- pub template: Option<Template>,- pub runtime: Option<RuntimeKind>,- pub claim_ttl: Option<Duration>,-}-impl PoolHandle {- fn name(&self) -> &str;-}-```--### `PoolManager`--The auto pool manager.--```rust-pub struct PoolManager { /* private fields */ }-impl PoolManager {- fn new(fleet: FleetClient, cfg: AutoPoolConfig) -> Self;- fn with_resolver(self, resolver: Arc<dyn ImageResolver>) -> Self;- fn fleet(&self) -> &FleetClient;- fn config(&self) -> &AutoPoolConfig;- async fn tenant(&self) -> Result<String>;- async fn resolve_key(&self, key: PoolSpecKey) -> PoolSpecKey;- async fn acquire(&self, key: PoolSpecKey, opts: AcquireOpts) -> Result<ManagedClaim>;- fn adopt(&self, sandbox: BoundSandbox, claim_ttl: Option<Duration>) -> ManagedClaim;- async fn ensure_pool(&self, key: &PoolSpecKey, hash: &str, opts: &AcquireOpts) -> Result<(Pool, bool)>;- async fn list(&self) -> Result<Vec<ManagedPoolInfo>>;- async fn gc(&self, idle_after: Duration) -> Result<GcReport>;- async fn gc_pools(&self, idle_after: Duration, only: &[String]) -> Result<GcReport>;- async fn gc_if_due(&self) -> Option<GcReport>;-}-```--### `PoolOptions`--How a pool keeps capacity for a `SandboxSpec`.--```rust-pub struct PoolOptions {- pub runtime: Option<RuntimeKind>,- pub replicas: Option<u32>,- pub warm: Option<bool>,- pub min_pool_size: Option<u32>,- pub max_pool_size: Option<u32>,- pub idle_ttl: Option<Duration>,- pub ttl_policy: Option<TtlPolicy>,- pub pool_ttl: Option<Duration>,- pub claim_ttl: Option<Duration>,-}-impl PoolOptions {- fn autoscaled(&self) -> bool;- fn autoscaling(&self) -> Option<WarmPoolAutoscaling>;- fn validate(&self) -> Result<()>;- fn spec_replicas(&self) -> u32;- fn lifecycle_patch(&self) -> Map<String, Value>;- fn from_pool_json(pool: &Value, runtime: Option<RuntimeKind>) -> Self;-}-```--### `PoolSpec`--Everything needed to reconcile a pool and its template ...--```rust-pub struct PoolSpec {- pub name: String,- pub image: String,- pub runtime: RuntimeKind,- pub replicas: u32,- pub cpu: Option<u32>,- pub memory_mb: Option<u32>,- pub services: BTreeMap<String, u16>,- pub readiness_tcp_port: Option<u16>,- pub readiness: Option<ReadinessProbe>,- pub efi: bool,- pub command: Option<Vec<String>>,- pub args: Option<Vec<String>>,- pub env: BTreeMap<String, String>,- pub process_mode: Option<ProcessMode>,- pub autoscaling: Option<WarmPoolAutoscaling>,- pub ttl_seconds_after_created: Option<u32>,- pub idle_ttl_seconds: Option<u32>,- pub ttl_policy: Option<TtlPolicy>,- pub claim_secrets: bool,- pub sidecars: Vec<Sidecar>,- pub image_pull_secret: Option<String>,- pub registry_credentials: Option<RegistryCredentials>,-}-impl PoolSpec {- fn new(name: impl Into<String>, image: impl Into<String>) -> Self;- fn parts(&self) -> (SandboxSpec, PoolOptions);- fn from_parts(name: impl Into<String>, spec: &SandboxSpec, options: &PoolOptions) -> Self;- fn uses_parity(&self) -> bool;- fn validate_parity(&self) -> Result<()>;- fn template_json(&self) -> Result<Value>;- fn claim_secrets(self, enabled: bool) -> Self;- fn runtime(self, runtime: RuntimeKind) -> Self;- fn services<I, S>(self, services: I) -> Self where I: IntoIterator<Item = (S, u16)>, S: Into<String>;- fn readiness_tcp(self, port: u16) -> Self;- fn pool_request(&self) -> CreatePoolRequest;- fn template_request(&self) -> Result<CreateTemplateRequest>;-}-```--### `PoolSpecKey`--What makes two sandboxes interchangeable: they may ...--```rust-pub struct PoolSpecKey {- pub image: String,- pub runtime: RuntimeKind,- pub efi: bool,- pub cpu: Option<u32>,- pub memory_mb: Option<u32>,- pub services: BTreeMap<String, u16>,- pub readiness_tcp_port: Option<u16>,- pub command: Option<Vec<String>>,- pub env: BTreeMap<String, String>,- pub sidecars: Vec<Sidecar>,- pub pull_secret: Option<String>,- pub claim_secrets: bool,-}-impl PoolSpecKey {- fn new(image: impl Into<String>) -> Self;- fn runtime(self, runtime: RuntimeKind) -> Self;- fn resources(self, cpu: Option<u32>, memory_mb: Option<u32>) -> Self;- fn services<I, S>(self, services: I) -> Self where I: IntoIterator<Item = (S, u16)>, S: Into<String>;- fn canonical(&self) -> String;- fn spec_hash(&self) -> String;- fn sandbox_spec(&self) -> SandboxSpec;- fn pool_options(&self, initial: u32, max: u32, ttl: Duration) -> PoolOptions;- fn pool_spec(&self, name: &str, initial: u32, max: u32, ttl: Duration) -> PoolSpec;-}-```--### `ProcessMode`--How a sandbox runs `command` / `args` / `env` ...--```rust-pub enum ProcessMode {- Legacy,- Run,-}-impl ProcessMode {- fn as_str(&self) -> &'static str;- fn parse(s: &str) -> Result<Self>;-}-```--### `ReadinessProbe`--A readiness probe on a guest port ( ...--```rust-pub enum ReadinessProbe {- Tcp { port: u16 },- Http { port: u16, path: String },-}-impl ReadinessProbe {- fn port(&self) -> u16;-}-```--### `runtime::RegistryInspector`--The default `ImageInspector`: `cua_image::resolve` ...--```rust-pub struct RegistryInspector { /* private fields */ }-```--### `SandboxSpec`--What a sandbox runs.--```rust-pub struct SandboxSpec {- pub image: String,- pub command: Option<Vec<String>>,- pub args: Option<Vec<String>>,- pub env: BTreeMap<String, String>,- pub services: BTreeMap<String, u16>,- pub readiness: Option<ReadinessProbe>,- pub cpu: Option<u32>,- pub memory_mb: Option<u32>,- pub efi: bool,- pub sidecars: Vec<Sidecar>,- pub registry_secret: Option<String>,- pub process_mode: Option<ProcessMode>,- pub claim_secrets: bool,-}-impl SandboxSpec {- fn new(image: impl Into<String>) -> Self;- fn effective_process_mode(&self) -> Option<ProcessMode>;- fn validate(&self, runtime: &RuntimeKind) -> Result<()>;- fn typed_template(&self, runtime: &RuntimeKind) -> Result<OSGymSandboxTemplateSpec>;- fn template_json(&self, name: &str, runtime: &RuntimeKind) -> Result<Value>;- fn from_template_json(template: &Value) -> Self;- fn diff(&self, current: &SandboxSpec, image_matches: bool) -> Vec<SpecDiff>;- fn overlay(&self, current: &SandboxSpec) -> SandboxSpec;-}-```--### `SpecDiff`--One field where a pool's template differs from the ...--```rust-pub struct SpecDiff {- pub field: String,- pub pool: String,- pub requested: String,-}-```--### `TokenProbe`--Asks a bound sandbox whether its driver has the claim's ...--```rust-pub trait TokenProbe: Send + Sync {- async fn probe(&self, fleet: &FleetClient, sandbox: &BoundSandbox, token: &str) -> TokenState;-}-```--### `TokenState`--What one token probe saw.--```rust-pub enum TokenState {- Delivered,- Awaiting(String),- Unknown(String),-}-```--### `TtlPolicy`--What expiry of the pool TTL or idle TTL deletes ...--```rust-pub enum TtlPolicy {- Retain,- Cascade,-}-impl TtlPolicy {- fn as_str(&self) -> &'static str;- fn parse(s: &str) -> Result<Self>;-}-```--### `UsagePricing`--Cua Cloud rates in USD.--```rust-pub struct UsagePricing {- pub vcpu_hour_usd: f64,- pub memory_gib_hour_usd: f64,-}-impl UsagePricing {- fn from_config(config: &Value) -> Option<Self>;- fn hourly_usd(&self, cpus: u32, memory_mib: u32) -> f64;-}-```--## Functions--```rust-/// A canonical alias (`linux`, `ubuntu` ...-pub fn canonical_alias(name: &str, env: &dyn Fn(&str) -> Option<String>) -> Option<(String, String)>-/// The canonical image for `os` (`linux` ...-pub fn canonical_image(os: &str) -> String-/// Checks a cloud sandbox size against ...-pub fn check_cloud_size(cpu: Option<u32>, memory_mb: Option<u32>) -> Result<()>-/// Checks a pool size field (`what` ...-pub fn check_pool_size(what: &str, n: u32) -> Result<()>-/// Validates the runtime/image pairing ...-pub fn check_runtime(runtime: Option<RuntimeKind>, image: &str, evidence: &ImageEvidence) -> Result<RuntimeKind>-/// Forgets cached rates (sign-out, tests).-pub fn clear_pricing_cache()-/// Refuses a runtime this SDK does not ...-pub fn ensure_runtime_offered(runtime: &RuntimeKind) -> Result<()>-/// Name of an ephemeral pool: cua-eph-<12 ...-pub fn ephemeral_pool_name() -> String-/// The readable diff of a ...-pub fn format_diffs(diffs: &[SpecDiff]) -> String-/// Reads what `image` is through the ...-pub async fn inspect_image(image: &str) -> ImageEvidence-/// Whether `image` is one of the canonical ...-pub fn is_canonical_image(image: &str) -> bool-/// Parses a runtime name to create or ...-pub fn parse_runtime(value: &str) -> Result<Option<RuntimeKind>>-/// The deterministic Secret name for ...-pub fn registry_secret_name(registry: &str, username: &str) -> String-/// The error for a remote image build ...-pub fn remote_builds_unsupported(what: &str) -> Error-/// The one Fleet image rule: resolve ...-pub async fn resolve_fleet_image(runtime: Option<RuntimeKind>, image: &str) -> Result<FleetImage>-/// `resolve_fleet_image` reading a private ...-pub async fn resolve_fleet_image_with(runtime: Option<RuntimeKind>, image: &str, creds: Option<&RegistryCredentials>) -> Result<FleetImage>-/// `resolve_fleet_image`, returning only ...-pub async fn resolve_runtime(runtime: Option<RuntimeKind>, image: &str) -> Result<RuntimeKind>-/// The fallback runtime for an image whose ...-pub fn runtime_from_reference(image: &str) -> RuntimeKind-/// The wire spelling of a runtime (`macos` ...-pub fn runtime_name(runtime: &RuntimeKind) -> &'static str-/// `Error::is_not_found` for a bare ...-pub fn sdk_error_is_not_found(e: &SdkError) -> bool-/// Replaces the process-wide ...-pub fn set_image_inspector(inspector: Option<Arc<dyn ImageInspector>>)-/// A `fleets_pool` resource block (the ...-pub fn terraform_pool_block(name: &str, spec: &SandboxSpec, options: &PoolOptions, runtime: &RuntimeKind) -> String--// mod autopool-/// The base pool name for a tenant and ...-pub fn auto_pool_name(tenant: &str, spec_hash: &str) -> String-/// Every candidate name, in probe order ...-pub fn candidate_names(tenant: &str, spec_hash: &str) -> Vec<String>-/// Default home: `$CUA_HOME`, else ...-pub fn default_cua_home() -> PathBuf-/// The tenant a bearer belongs to: the JWT ...-pub fn tenant_from_token(token: &str) -> String--// mod builds-/// The build namespace for a tenant ...-pub fn build_namespace(tenant: &str) -> String--// mod claim_secrets-/// The Opaque Secret the SDK writes for ...-pub fn claim_secret_body(namespace: &str, claim: &str, token: &str) -> Value-/// A fresh env token: 64 hex characters ...-pub fn generate_claim_token() -> String-/// Checks a claim token with cua-spacesd's ...-pub fn validate_claim_token(token: &str) -> Result<()>--// mod parity-/// The Secret body #7887's admission ...-pub fn registry_secret_body(namespace: &str, name: &str, registry: &str, creds: &RegistryCredentials) -> Result<Value>-/// `vmTemplate.sidecars[]` entries ...-pub fn sidecars_json(sidecars: &[Sidecar]) -> Value--// mod runtime-/// Classifies already-fetched documents ...-pub fn classify_manifest(index: Option<&ImageIndex>, manifest: Option<&ImageManifest>, config: Option<&Value>) -> Result<ImageVariant>-/// `classify_manifest` over raw JSON ...-pub fn classify_manifest_json(manifest: &str, config: Option<&str>) -> Result<ImageVariant>-/// The tag of an image reference, or ...-pub fn image_tag(image: &str) -> Option<&str>--// mod spec-/// `4096Mi`, `4Gi`, `512M`, `4G` → MiB.-pub fn parse_memory_mib(q: &str) -> Option<u32>-```--## Constants--```rust-/// The everyday vCPU range of a cloud ...-pub const CLOUD_DEFAULT_RANGE_CPUS: RangeInclusive<u32> = _;-/// The everyday memory range of a cloud ...-pub const CLOUD_DEFAULT_RANGE_MEMORY_MB: RangeInclusive<u32> = _;-/// Legacy Fleet API endpoint ...-pub const DEFAULT_FLEET_BASE_URL: &str = "https://run.cua.ai";-/// Poll interval cua-sandbox uses for ...-pub const DEFAULT_POLL_INTERVAL_MS: u64 = 2000;-/// Poll limit cua-sandbox uses for pools ...-pub const DEFAULT_POLL_LIMIT: u32 = 300;-/// Default OAuth token endpoint ...-pub const DEFAULT_TOKEN_URL: &str = /* ... */;-/// vCPUs per cloud sandbox ...-pub const FLEET_ABSOLUTE_CPUS: RangeInclusive<u32> = _;-/// Most sandboxes per pool ...-pub const FLEET_ABSOLUTE_MAX_POOL_SIZE: u32 = 50;-/// Memory per cloud sandbox in MiB ...-pub const FLEET_ABSOLUTE_MEMORY_MB: RangeInclusive<u32> = _;-/// Why a macOS image or the `macos` ...-pub const MACOS_UNSUPPORTED: &str = cua_image::resolve::FLEET_MACOS_UNSUPPORTED;-/// The one "no Fleet credentials" message ...-pub const MISSING_CREDENTIALS: &str = "Fleet credentials missing: run `cua auth login` or set \- CUA_CLIENT_ID/CUA_CLIENT_SECRET, or pass local=True";-/// How long an answer is reused.-pub const PRICING_TTL: Duration = _;-/// Name prefix of tenant registry pull ...-pub const REGISTRY_SECRET_PREFIX: &str = "cua-registry-";-/// Whether Fleet builds `kind: container` ...-pub const REMOTE_BUILDS_SUPPORTED: bool = false;--// mod autopool-/// Name prefix of managed pools.-pub const AUTO_POOL_PREFIX: &str = "cua-auto-";-/// Default idle threshold of the automatic ...-pub const DEFAULT_IDLE_GC_SECS: u64 = _;-/// Name prefix of legacy ephemeral pools ...-pub const EPHEMERAL_POOL_PREFIX: &str = "cua-eph-";-/// Label carrying the last use (unix ...-pub const LABEL_LAST_USED: &str = "cua.ai/last-used";-/// Label naming the creator.-pub const LABEL_MANAGED_BY: &str = "cua.ai/managed-by";-/// Label carrying the first 32 hex digits ...-pub const LABEL_SPEC_HASH: &str = "cua.ai/spec-hash";-/// Value of `LABEL_MANAGED_BY`.-pub const MANAGED_BY: &str = "cua-sdk";-/// Candidate names tried per key before ...-pub const MAX_NAME_PROBES: usize = 8;-/// Floor of a claim's `bindDeadline`: live ...-pub const MIN_BIND_DEADLINE_SECS: u64 = 900;-/// Hex digits of the spec hash stored in ...-pub const SPEC_HASH_LABEL_LEN: usize = 32;--// mod builds-/// Prefix of the per-account build ...-pub const BUILD_NAMESPACE_PREFIX: &str = "cua-build-";-/// Largest file `copy` uploads (read into ...-pub const MAX_COPY_BYTES: u64 = _;--// mod claim_secrets-/// Label on a claim Secret naming its ...-pub const CLAIM_SECRET_CLAIM_LABEL: &str = "osgym.cua.ai/claim";-/// Name prefix of a claim's Secret ...-pub const CLAIM_SECRET_PREFIX: &str = "cua-claim-";-/// Longest wait after Bound for the token ...-pub const DEFAULT_WAIT: Duration = _;-/// The Secret key (and in-guest file name) ...-pub const ENV_TOKEN_KEY: &str = "env-token";-/// Pause between token probes.-pub const PROBE_EVERY: Duration = _;-/// Claim secrets are always available ...-pub const SUPPORTED: bool = true;--// mod runtime-/// Set to `0`/`off`/`false` to skip ...-pub const INSPECT_ENV: &str = "CUA_FLEET_IMAGE_INSPECT";--// mod spec-/// Default autoscaling ceiling of a pool ...-pub const DEFAULT_MAX_POOL_SIZE: u32 = 10;-```--## Type aliases--```rust-/// Result alias.-pub type Result<T, E = Error> = Result<T, E>;--// mod autopool-/// Clock returning unix seconds (tests ...-pub type Clock = Arc<dyn Fn() -> i64 + Send + Sync>;--// mod builds-/// Progress of a remote build, in the ...-pub type BuildProgress<'a> = &'a dyn Fn(&str) + Send + Sync;-```--## Re-exports--`cyclops_sdk::Sandbox`, `cua_image::build::BuildFile`, `cua_image::build::build_name`, `cua_image::build::BUILD_NAME_PREFIX`, `cua_image::build::build_recipe`, `cua_image::build::BuildFile`, `cua_image::build::BuildSpec`, `cua_image::build::DEFAULT_BUILD_TIMEOUT`, `cua_image::build::local_build_file`, `cua_image::build::MAX_BUILD_ENV`, `cua_image::build::MAX_BUILD_ENV_VALUE`, `cua_image::build::BuildSpec`, `cua_image::sidecar::check_reserved_service_names`, `cyclops_sdk::Claim`, `cua_image::sidecar::default_sidecar_name`, `cyclops_sdk::HttpClient`, `cua_image::spec::ImageLayer`, `cua_image::sidecar::MAIN_CONTAINER_NAME`, `cua_image::sidecar::MAX_SIDECARS`, `cua_image::normalize_registry`, `cua_image::RegistryCredentials`, `cyclops_sdk::Pool`, `cua_image::registry_of`, `parity::RegistryCredentials`, `cua_image::sidecar::RESERVED_SERVICE_NAMES`, `pool::RuntimeKind`, `cyclops_sdk_schema`, `cyclops_sdk`, `cyclops_sdk::SdkError`, `cua_image::sidecar::Sidecar`, `cyclops_sdk::Template`, `cua_image::sidecar::validate_sidecars`.diff --git a/docs/content/docs/cua-sdk/reference/rust/cua-sandbox-core.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-sandbox-core.mdxdeleted file mode 100644index 0bc3258222..0000000000--- a/docs/content/docs/cua-sdk/reference/rust/cua-sandbox-core.mdx+++ /dev/null@@ -1,1672 +0,0 @@-----title: "cua-sandbox-core"-description: "The daemon-agnostic Sandbox over the Fleet, local and direct providers."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-rust- Source: rustdoc JSON (nightly-2026-09-20, format 61) of cua-sandbox-core- Version: 0.5.0-*/}--Public API of the `cua-sandbox-core` crate (`cua_sandbox_core`). Summaries and declarations only (`cargo doc -p cua-sandbox-core --open` in `libs/cua` has the full comments); see [Rust crates](/cua-sdk/reference/rust) for stability.--One daemon-agnostic `Sandbox` over three providers:--## Modules--- `byoc`: Your own cloud account as a sandbox location (--on ...-- `byoc::meta`: Relay machine metadata (`meta`) a cloud sandbox's ...-- `fleet_local`: Run a Fleet template (or the template behind a Fleet ...-- `http`: HTTP to sandbox services: whole requests (readiness ...-- `mcp`: MCP to sandbox services with the official Rust SDK ...-- `placement`: Where a sandbox runs, what kind of machine it is, and ...-- `pool_image`: The `ImageInfo` of a named (user-owned) Fleet pool: its ...-- `power`: Turning a sandbox off and on again, the same words for ...-- `provider`: Pluggable sandbox providers: third-party platforms ...-- `proxy`: A small loopback HTTP reverse proxy.-- `refs`: Sandbox references: one scheme for sandboxes and Spaces ...-- `settings`: User defaults: where sandboxes run when nothing says ...-- `state`: Persistent sandbox state: ~/.cua/sa ...--## Types--### `byoc::CloudCheck`--One check of `cloud_test`.--```rust-pub struct CloudCheck {- pub name: String,- pub ok: bool,- pub detail: String,-}-```--### `byoc::CloudConnected`--`cloud_connect`: the connected cloud plus the checks it ...--```rust-pub struct CloudConnected {- pub provider: CloudProvider,- pub checks: Vec<CloudCheck>,-}-```--### `byoc::CloudCredentials`--Where a cloud's credentials were found on this machine.--```rust-pub struct CloudCredentials {- pub found: bool,- pub source: String,-}-```--### `byoc::CloudDisconnected`--`cloud_disconnect`.--```rust-pub struct CloudDisconnected {- pub provider: String,- pub disconnected: bool,- pub left: Vec<CloudResource>,-}-```--### `byoc::CloudKind`--What a cloud can run for one image family, and at what ...--```rust-pub struct CloudKind {- pub image: String,- pub kind: String,- pub supported: bool,- pub reason: String,- pub machine_type: String,- pub usd_per_hour: f64,-}-```--### `byoc::CloudManager`--Connects, checks and sweeps your clouds (implemented in ...--```rust-pub trait CloudManager: Send + Sync + 'static {- async fn status(&self, provider: Option<&str>) -> Result<CloudStatusReport>;- async fn test(&self, target: &CloudTarget) -> Result<CloudTestReport>;- async fn connect(&self, target: &CloudTarget, make_default: bool, ttl_hours: Option<u32>) -> Result<CloudConnected>;- async fn disconnect(&self, provider: &str) -> Result<CloudDisconnected>;- async fn sweep(&self, provider: Option<&str>, dry_run: bool, all: bool) -> Result<CloudSweepReport>;-}-```--### `byoc::CloudProvider`--One cloud as `cloud_status` lists it.--```rust-pub struct CloudProvider {- pub name: String,- pub title: String,- pub tier: String,- pub connected: bool,- pub default: bool,- pub credentials: CloudCredentials,- pub account: String,- pub profile: String,- pub region: String,- pub zone: String,- pub project: String,- pub environment: String,- pub label: String,- pub ttl_hours: u32,- pub kinds: Vec<CloudKind>,-}-```--### `byoc::CloudResource`--One thing Cua created in a cloud.--```rust-pub struct CloudResource {- pub provider: String,- pub id: String,- pub resource_type: String,- pub sandbox: String,- pub machine: String,- pub region: String,- pub state: String,- pub created: String,- pub expires: String,- pub expired: bool,-}-```--### `byoc::CloudStatusReport`--`cloud_status`.--```rust-pub struct CloudStatusReport {- pub default_on: String,- pub providers: Vec<CloudProvider>,- pub resources: Vec<CloudResource>,-}-```--### `byoc::CloudSweepItem`--One row of `cloud_sweep`.--```rust-pub struct CloudSweepItem {- pub resource: CloudResource,- pub action: String,- pub reason: String,-}-```--### `byoc::CloudSweepReport`--`cloud_sweep`.--```rust-pub struct CloudSweepReport {- pub dry_run: bool,- pub resources: Vec<CloudSweepItem>,-}-```--### `byoc::CloudTarget`--Where in a cloud account sandboxes go (`cloud_connect` ...--```rust-pub struct CloudTarget {- pub provider: String,- pub profile: Option<String>,- pub region: Option<String>,- pub zone: Option<String>,- pub project: Option<String>,- pub environment: Option<String>,-}-```--### `byoc::CloudTestReport`--`cloud_test`.--```rust-pub struct CloudTestReport {- pub provider: String,- pub ok: bool,- pub account: String,- pub checks: Vec<CloudCheck>,-}-```--### `ConnectOptionsOverride`--Overrides for `Sandbox::env_with`.--```rust-pub struct ConnectOptionsOverride {- pub probe_timeout: Option<Duration>,-}-```--### `CreateOptions`--Options for `Sandboxes::create`.--```rust-pub struct CreateOptions {- pub provider: ProviderKind,- pub name: Option<String>,- pub image: String,- pub os: String,- pub cpus: u32,- pub memory_mb: u64,- pub disk_gb: Option<u32>,- pub ports: Vec<u16>,- pub services: BTreeMap<String, u16>,- pub wait_for: Vec<Probe>,- pub ready_timeout: Duration,- pub ready_timeout_given: bool,- pub env: BTreeMap<String, String>,- pub command: Option<Vec<String>>,- pub env_token: Option<String>,- pub fleet: FleetOptions,- pub firmware: Option<String>,- pub sidecars: Vec<Sidecar>,- pub registry_credentials: Option<RegistryCredentials>,- pub build: Option<BuildSpec>,- pub kind: Kind,- pub runtime: Runtime,- pub container_runtime: Option<String>,- pub network: NetworkMode,- pub owner_pid: Option<u32>,- pub contrib: Option<String>,- pub keep_on_failure: bool,- pub gpu: Option<String>,- pub ephemeral_name: Option<String>,-}-impl CreateOptions {- fn new(provider: ProviderKind, image: impl Into<String>) -> Self;- fn sidecar(self, sidecar: Sidecar) -> Self;- fn default_warm(&self) -> Option<bool>;- fn on(&self) -> Option<On>;- fn apply_placement(&mut self) -> Result<()>;- fn name(self, name: impl Into<String>) -> Self;- fn wait_for(self, probe: Probe) -> Self;- fn service(self, name: impl Into<String>, port: u16) -> Self;- fn command<I, S>(self, argv: I) -> Self where I: IntoIterator<Item = S>, S: Into<String>;- fn wait_for_service(self, service: &str, http_path: Option<&str>) -> Result<Self>;- fn service_probe(&self, service: &str, http_path: Option<&str>) -> Result<Probe>;- async fn fleet_pool_key(&self) -> Result<PoolSpecKey>;- async fn fleet_pool_key_resolved(&self) -> Result<(PoolSpecKey, Option<ImageInfo>)>;- fn pool_sandbox_spec(&self) -> SandboxSpec;- fn validate_sidecars(&self) -> Result<()>;-}-```--### `EphemeralLease`--The lease of an ephemeral local sandbox: which process ...--```rust-pub struct EphemeralLease {- pub name: String,- pub pid: u32,- pub created_at: u64,-}-```--### `Error`--Errors.--```rust-pub enum Error {- InvalidArgument(String),- CloudEnded,- InvalidPlacement(PlacementError),- NotFound(String),- AmbiguousSandbox { name: String, candidates: Vec<String>, message: String },- ProviderNotConfigured(ProviderKind),- ContribNotConfigured(String),- Unsupported { provider: ProviderKind, op: String },- SpacesdNotAvailable { sandbox: String, reason: String },- UnsupportedImage(String),- Timeout(String),- Http(String),- Fleet(Error),- Runtime(RuntimeError),- Env(Error),- Mcp(String),- Cloud(String),- Io(Error),- Json(Error),- Cancelled(String),-}-```--### `FleetOptions`--Fleet-specific create options.--```rust-pub struct FleetOptions {- pub pool: Option<String>,- pub runtime: Option<RuntimeKind>,- pub warm: Option<bool>,- pub max_pool_size: Option<u32>,- pub replicas: Option<u32>,- pub ttl_seconds_after_created: Option<u32>,- pub apply: bool,- pub cpus_given: bool,- pub memory_given: bool,-}-```--### `FleetState`--A named Fleet claim (`sandbox_state.save_fleet_claim`).--```rust-pub struct FleetState {- pub name: String,- pub runtime_type: String,- pub pool_name: String,- pub status: String,- pub created_at: String,- pub extra: Map<String, Value>,-}-```--### `Forward`--An active forward.--```rust-pub struct Forward {- pub guest_port: u16,- pub local_addr: Option<SocketAddr>,- pub url: Option<String>,- pub via: ForwardVia,-}-impl Forward {- async fn close(self) -> Result<()>;-}-```--### `ForwardVia`--How a `Forward` reaches the guest port.--```rust-pub enum ForwardVia {- Tcp,- EnvTunnel,- GatewayUrl,- GatewayProxy,-}-```--### `GuestDisplay`--The guest display, reachable without an in-guest agent ...--```rust-pub struct GuestDisplay {- pub url: String,- pub via: String,- pub open_command: Option<Vec<String>>,-}-impl GuestDisplay {- fn redacted_url(&self) -> String;-}-```--### `GuestOutput`--Output of a guest command run without an in-guest agent ...--```rust-pub enum GuestOutput {- Stdout(Vec<u8>),- Stderr(Vec<u8>),-}-```--### `GuestScreenshot`--A guest framebuffer captured without an in-guest agent ...--```rust-pub struct GuestScreenshot {- pub png: Vec<u8>,- pub width: u32,- pub height: u32,- pub via: String,-}-```--### `HttpResponse`--A whole HTTP response.--```rust-pub struct HttpResponse {- pub status: u16,- pub headers: Vec<(String, String)>,- pub body: Vec<u8>,-}-impl HttpResponse {- fn text(&self) -> String;-}-```--### `ImageInfo`--The image a sandbox runs, as the one resolver ...--```rust-pub struct ImageInfo {- pub reference: String,- pub pinned_ref: String,- pub digest: String,- pub variant: String,- pub arch: Option<String>,- pub os: String,- pub emulated: bool,- pub spacesd: Option<bool>,-}-```--### `ImageMode`--How a provider gets a registry image onto its platform.--```rust-pub enum ImageMode {- Direct,- Template,-}-```--### `InstanceStatus`--Instance status (mirror of `cua_vmm::Status`).--```rust-pub enum InstanceStatus {- Running,- Paused,- Stopped,- Provisioning,- Unknown(String),-}-```--### `LocalEndpoints`--How to reach a running instance (subset of ...--```rust-pub struct LocalEndpoints {- pub host: String,- pub ports: BTreeMap<u16, u16>,- pub vnc: Option<String>,- pub qmp: Option<String>,- pub ssh: Option<String>,- pub serial_log: Option<String>,- pub container_id: Option<String>,-}-```--### `LocalFleetPlan`--A Fleet template translated for the local provider.--```rust-pub struct LocalFleetPlan {- pub template: String,- pub reference: String,- pub runtime: RuntimeKind,- pub image: String,- pub firmware: Option<String>,- pub cpus: Option<u32>,- pub memory_mb: Option<u64>,- pub services: BTreeMap<String, u16>,- pub probes: Vec<Probe>,-}-impl LocalFleetPlan {- fn apply(&self, o: &mut CreateOptions);-}-```--### `LocalInstance`--A started instance.--```rust-pub struct LocalInstance {- pub name: String,- pub backend: String,- pub status: InstanceStatus,- pub endpoints: LocalEndpoints,-}-```--### `LocalProbe`--A readiness probe handed to the local backend.--```rust-pub struct LocalProbe {- pub port: u16,- pub http_path: Option<String>,-}-```--### `LocalRuntime`--A local VM / container runtime.--```rust-pub trait LocalRuntime: Send + Sync {- fn backend(&self) -> String;- async fn start(&self, spec: &LocalStartSpec) -> RuntimeResult<LocalInstance>;- async fn start_resolved(&self, spec: &LocalStartSpec) -> RuntimeResult<(LocalInstance, Option<ImageInfo>)>;- async fn gpu_support(&self) -> Vec<GpuSupport>;- async fn stop(&self, name: &str) -> RuntimeResult<()>;- async fn suspend(&self, name: &str) -> RuntimeResult<()>;- async fn resume(&self, name: &str) -> RuntimeResult<LocalInstance>;- fn power_control(&self, runtime_type: &str) -> Option<PowerControl>;- async fn stop_reason(&self, name: &str, runtime_type: &str) -> RuntimeResult<Option<StopReason>>;- async fn fork(&self, source: &str, new_name: &str) -> RuntimeResult<()>;- async fn checkpoint(&self, name: &str, checkpoint: &str) -> RuntimeResult<()>;- async fn list(&self) -> RuntimeResult<Vec<LocalSummary>>;- async fn status(&self, name: &str) -> RuntimeResult<InstanceStatus>;- async fn status_on(&self, name: &str, runtime_type: &str) -> RuntimeResult<InstanceStatus>;- async fn delete(&self, name: &str) -> RuntimeResult<()>;- async fn endpoints(&self, name: &str) -> RuntimeResult<LocalEndpoints>;- async fn guest_tcp_listening(&self, name: &str, guest_port: u16) -> RuntimeResult<Option<bool>>;- async fn guest_exec(&self, name: &str, script: &str, timeout: Option<Duration>, sink: Sender<GuestOutput>) -> RuntimeResult<i64>;- async fn guest_screenshot(&self, name: &str) -> RuntimeResult<GuestScreenshot>;- async fn guest_display(&self, name: &str) -> RuntimeResult<GuestDisplay>;- async fn build_image(&self, spec: &BuildSpec, creds: Option<&RegistryCredentials>) -> RuntimeResult<String>;-}-```--### `LocalStartSpec`--What to start (subset of `cua_vmm::StartSpec`).--```rust-pub struct LocalStartSpec {- pub name: String,- pub image: String,- pub os: String,- pub cpus: u32,- pub memory_mb: u64,- pub disk_size_gb: Option<u32>,- pub ports: Vec<u16>,- pub env: BTreeMap<String, String>,- pub command: Option<Vec<String>>,- pub ready_timeout: Duration,- pub firmware: Option<String>,- pub sidecars: Vec<Sidecar>,- pub registry_credentials: Option<RegistryCredentials>,- pub container_runtime: Option<String>,- pub kind: Option<String>,- pub runtime: Option<String>,- pub restrict_network: bool,- pub gpu: Option<String>,- pub probes: Vec<LocalProbe>,- pub ephemeral: bool,-}-```--### `LocalState`--Fields of a local sandbox state file ...--```rust-pub struct LocalState {- pub name: String,- pub runtime_type: String,- pub image: Value,- pub host: String,- pub api_port: u16,- pub exposed_ports: Option<BTreeMap<String, u16>>,- pub vnc_port: Option<u16>,- pub qmp_port: Option<u16>,- pub grpc_port: Option<u16>,- pub adb_serial: Option<String>,- pub sdk_root: Option<String>,- pub disk_path: Option<String>,- pub os_type: Option<String>,- pub vnc_display: Option<i64>,- pub memory_mb: Option<u64>,- pub cpu_count: Option<u32>,- pub arch: Option<String>,- pub status: String,- pub created_at: String,- pub extra: Map<String, Value>,-}-```--### `LocalSummary`--One row of `LocalRuntime::list`.--```rust-pub struct LocalSummary {- pub name: String,- pub backend: String,- pub status: InstanceStatus,-}-```--### `Location`--Where a sandbox runs: the `location` vocabulary of ...--```rust-pub enum Location {- Local,- Cloud,- Direct,- Relay,- Contrib,-}-impl Location {- const ALL: [Location; 4] = _;;- fn as_str(self) -> &'static str;- fn parse(s: &str) -> Option<Self>;-}-```--### `McpConfig`--Everything an MCP client needs to reach a service's MCP ...--```rust-pub struct McpConfig {- pub url: String,- pub headers: Vec<(String, String)>,-}-impl McpConfig {- fn of(endpoint: &ServiceEndpoint, path: Option<&str>) -> Self;- fn for_url(url: &str, headers: Vec<(String, String)>) -> Result<Self>;- async fn connect(&self) -> Result<McpClient>;-}-```--### `NetworkMode`--Guest network of a sandbox.--```rust-pub enum NetworkMode {- Default,- None,-}-impl NetworkMode {- fn parse(s: &str) -> Result<Self>;- fn as_str(self) -> &'static str;-}-```--### `placement::Axis`--Which axis a `PlacementError` is about.--```rust-pub enum Axis {- On,- Kind,- Runtime,- Image,-}-impl Axis {- fn as_str(self) -> &'static str;-}-```--### `placement::Capabilities`--What a location can run.--```rust-pub struct Capabilities {- pub name: String,- pub description: String,- pub kinds: Vec<KindSupport>,-}-impl Capabilities {- fn runtimes(&self, kind: Kind) -> Vec<Runtime>;- fn kinds(&self) -> Vec<Kind>;- fn kind_of(&self, runtime: &Runtime) -> Option<Kind>;-}-```--### `placement::HostFacts`--What is known about this host.--```rust-pub struct HostFacts {- pub gvisor: Option<bool>,- pub apple_silicon: bool,-}-impl HostFacts {- fn current() -> Self;-}-```--### `placement::ImageFacts`--What is known about the image before a placement is ...--```rust-pub struct ImageFacts {- pub os: Option<String>,- pub variants: Vec<Variant>,-}-```--### `placement::Kind`--What kind of machine a sandbox is.--```rust-pub enum Kind {- Auto,- Container,- Vm,-}-impl Kind {- fn as_str(self) -> &'static str;- fn parse(s: &str) -> Result<Self, PlacementError>;-}-```--### `placement::KindSupport`--The kinds and runtimes of one kind a location offers.--```rust-pub struct KindSupport {- pub kind: Kind,- pub runtimes: Vec<Runtime>,-}-```--### `placement::On`--Where a sandbox runs (the `--on` flag, the `on` ...--```rust-pub enum On {- Local,- Cloud,- Direct(String),- Relay(String),- Host(String),- Provider(String),-}-impl On {- fn location(&self) -> &str;- fn is_existing_machine(&self) -> bool;- fn parse(s: &str) -> Result<Self, PlacementError>;- fn parse_or_host(s: &str) -> Result<Self, PlacementError>;-}-```--### `placement::PlacementError`--An invalid location, kind or runtime, or a combination ...--```rust-pub struct PlacementError {- pub axis: Axis,- pub given: String,- pub message: String,- pub valid: Vec<String>,-}-impl PlacementError {- fn new(axis: Axis, given: &str, why: String, valid: Vec<String>) -> Self;-}-```--### `placement::Runtime`--Which engine runs a sandbox.--```rust-pub enum Runtime {- Auto,- Gvisor,- Runc,- Qemu,- Lume,- Kubevirt,- Other(String),-}-impl Runtime {- const BUILTIN: [Runtime; 5] = _;;- fn as_str(&self) -> &str;- fn parse(s: &str) -> Result<Self, PlacementError>;- fn builtin_kind(&self) -> Option<Kind>;-}-```--### `placement::Selection`--A checked placement.--```rust-pub struct Selection {- pub on: On,- pub kind: Kind,- pub runtime: Runtime,- pub reason: String,-}-```--### `PortExposure`--How guest ports are reachable from outside.--```rust-pub enum PortExposure {- None,- Https,-}-```--### `PortTarget`--Where a guest port can be reached.--```rust-pub enum PortTarget {- Addr { host: String, port: u16 },- Url(String),-}-```--### `PowerControl`--How a sandbox turns off.--```rust-pub enum PowerControl {- Suspend,- Stop,-}-impl PowerControl {- fn as_str(self) -> &'static str;- fn parse(word: &str) -> Option<Self>;- fn off_state(self) -> PowerState;-}-```--### `PowerState`--Whether a sandbox is on.--```rust-pub enum PowerState {- Running,- Suspended,- Stopped,-}-impl PowerState {- fn as_str(self) -> &'static str;- fn parse(word: &str) -> Option<Self>;- fn is_off(self) -> bool;-}-```--### `Probe`--A user-declared readiness probe.--```rust-pub enum Probe {- Tcp(u16),- Http { port: u16, path: String, status: Option<u16> },-}-```--### `Provider`--A third-party sandbox platform.--```rust-pub trait Provider: Send + Sync + 'static {- fn name(&self) -> &'static str;- fn capabilities(&self) -> ProviderCapabilities;- fn check_configured(&self) -> Result<()>;- async fn create(&self, spec: &ProviderCreate) -> Result<ProviderInstance>;- async fn abort_create(&self, name: &str) -> Result<()>;- async fn get(&self, id: &str) -> Result<ProviderInstance>;- async fn list(&self) -> Result<Vec<ProviderInstance>>;- async fn delete(&self, id: &str) -> Result<()>;- fn endpoint(&self, instance: &ProviderInstance, port: u16) -> Result<ServiceEndpoint>;- async fn suspend(&self, _id: &str) -> Result<()>;- async fn resume(&self, _id: &str) -> Result<ProviderInstance>;- async fn keep_alive(&self, _id: &str, _duration: Duration) -> Result<()>;- fn joins_relay(&self) -> bool;- fn connect_options(&self, _instance: &ProviderInstance, _port: u16) -> Option<Result<ConnectOptions>>;- fn power(&self) -> Option<PowerControl>;- async fn stop(&self, _id: &str) -> Result<()>;- async fn start(&self, _id: &str) -> Result<ProviderInstance>;-}-```--### `ProviderCapabilities`--What a provider can do.--```rust-pub struct ProviderCapabilities {- pub kinds: Vec<RunKind>,- pub runtime: &'static str,- pub arches: Vec<&'static str>,- pub image_mode: ImageMode,- pub ports: PortExposure,- pub command: bool,- pub env_to_entrypoint: bool,- pub private_registry: bool,- pub suspend: bool,- pub max_cpus: Option<u32>,- pub max_memory_mb: Option<u64>,- pub credential_env: &'static [&'static str],- pub gpus: Vec<GpuOption>,-}-```--### `ProviderCreate`--What the core asks a provider to create.--```rust-pub struct ProviderCreate {- pub name: String,- pub image: ProviderImage,- pub cpus: u32,- pub memory_mb: u64,- pub env: BTreeMap<String, String>,- pub command: Option<Vec<String>>,- pub ports: Vec<u16>,- pub ttl: Option<Duration>,- pub labels: BTreeMap<String, String>,- pub registry_credentials: Option<RegistryCredentials>,- pub timeout: Duration,- pub runtime: Runtime,- pub gpu: Option<String>,-}-```--### `ProviderImage`--The image the core resolved for a provider.--```rust-pub struct ProviderImage {- pub reference: String,- pub pinned_ref: String,- pub digest: String,- pub kind: RunKind,- pub arch: String,- pub spacesd: Option<bool>,-}-```--### `ProviderInstance`--A sandbox on a provider.--```rust-pub struct ProviderInstance {- pub id: String,- pub name: String,- pub status: Status,- pub endpoints: BTreeMap<u16, ServiceEndpoint>,- pub details: BTreeMap<String, String>,-}-impl ProviderInstance {- fn new(id: impl Into<String>, name: impl Into<String>, status: Status) -> Self;-}-```--### `ProviderKind`--Which provider backs a sandbox.--```rust-pub enum ProviderKind {- Fleet,- Local,- Direct,- Contrib,-}-```--### `proxy::HttpProxy`--A running proxy.--```rust-pub struct HttpProxy { /* private fields */ }-impl HttpProxy {- async fn start(bind: SocketAddr, router: Arc<dyn ProxyRouter>) -> Result<Self>;- fn local_addr(&self) -> SocketAddr;- fn url(&self) -> String;- fn close(self);-}-```--### `proxy::ProxyRoute`--Where one proxied request goes.--```rust-pub struct ProxyRoute {- pub url: String,- pub headers: Vec<(String, String)>,-}-```--### `proxy::ProxyRouter`--Maps an incoming `path?query` to an upstream.--```rust-pub trait ProxyRouter: Send + Sync + 'static {- fn route(&self, path_and_query: &str) -> RouteFuture;-}-```--### `proxy::RouteDecision`--The answer of a `ProxyRouter` for a request path.--```rust-pub enum RouteDecision {- Forward(ProxyRoute),- Refuse(u16, String),-}-```--### `RunKind`--How a sandbox runs on a provider (the `--kind` axis).--```rust-pub enum RunKind {- Container,- Vm,-}-impl RunKind {- fn as_str(self) -> &'static str;-}-```--### `RuntimeError`--A local-runtime failure.--```rust-pub enum RuntimeError {- NotFound(String),- Unsupported { backend: String, op: String },- UnsupportedImage(String),- InsufficientDisk(String),- InvalidPlacement(PlacementError),- Other(String),-}-```--### `Sandbox`--A sandbox handle.--```rust-pub struct Sandbox { /* private fields */ }-impl Sandbox {- async fn mcp_config(&self, service: &str, path: Option<&str>) -> Result<McpConfig>;- async fn mcp(&self, service: &str, path: Option<&str>) -> Result<McpClient>;- fn name(&self) -> &str;- fn image_info(&self) -> Option<&ImageInfo>;- fn provider(&self) -> ProviderKind;- fn runtime_type(&self) -> &str;- fn is_ephemeral(&self) -> bool;- fn id(&self) -> String;- fn sandbox_ref(&self) -> SandboxRef;- fn location(&self) -> &'static str;- fn expires_at(&self) -> Option<SystemTime>;- fn provider_details(&self) -> BTreeMap<String, String>;- fn placement(&self) -> (Kind, Runtime);- fn fleet_sandbox(&self) -> Option<&BoundSandbox>;- fn services(&self) -> &BTreeMap<String, u16>;- fn ports(&self) -> BTreeMap<u16, PortTarget>;- fn port(&self, port: u16) -> Result<PortTarget>;- fn service(&self, name: &str) -> Result<Service>;- fn tunnel(&self) -> Tunnel;- async fn spacesd(&self) -> Result<SpacesdClient>;- async fn spacesd_with(&self, o: ConnectOptionsOverride) -> Result<SpacesdClient>;- fn lacks_spacesd(&self) -> bool;- async fn guest_exec(&self, script: &str, timeout: Option<Duration>, sink: Sender<GuestOutput>) -> Result<i64>;- async fn guest_screenshot(&self) -> Result<GuestScreenshot>;- async fn guest_display(&self) -> Result<GuestDisplay>;- fn env_token(&self) -> Option<String>;- fn declares_spacesd(&self, options: &CreateOptions) -> bool;- async fn wait_spacesd(&self, timeout: Duration) -> Result<()>;- async fn wait_ready(&self, probes: &[Probe], timeout: Duration) -> Result<()>;- async fn status(&self) -> Result<Status>;- async fn suspend(&self) -> Result<()>;- async fn resume(&self) -> Result<()>;- async fn restart(&self) -> Result<()>;- async fn keep_alive(&self, duration: Duration) -> Result<()>;- fn detach(&self);- async fn delete(self) -> Result<()>;-}-```--### `Sandboxes`--Creates, finds and manages sandboxes across providers.--```rust-pub struct Sandboxes { /* private fields */ }-impl Sandboxes {- fn builder() -> SandboxesBuilder;- fn state(&self) -> &StateStore;- fn pools(&self) -> Result<&PoolManager>;- fn contrib_provider(&self, name: &str) -> Result<&Arc<dyn Provider>>;- fn clouds(&self) -> Result<&Arc<dyn CloudManager>>;- fn persisted_details(&self, name: &str) -> BTreeMap<String, String>;- fn cloud_of_relay_machine(&self, machine: &str) -> Option<(String, String)>;- fn by_relay_machine(&self, machine: &str) -> Result<Option<String>>;- fn contrib_providers(&self) -> Vec<Arc<dyn Provider>>;- async fn create(&self, options: CreateOptions) -> Result<Sandbox>;- async fn create_cancellable(&self, options: CreateOptions, cancel: CancellationToken) -> Result<Sandbox>;- async fn create_tracked(&self, options: CreateOptions) -> Result<Sandbox>;- async fn cancel_create(&self, name: &str) -> Result<Option<String>>;- fn connect_url(&self, url: &str, token: Option<String>) -> Result<Sandbox>;- fn connect_url_named(&self, url: &str, token: Option<String>, name: Option<&str>) -> Result<Sandbox>;- async fn gpu_support(&self, provider: ProviderKind, contrib: Option<&str>) -> Vec<GpuSupport>;- async fn local_name_in_use(&self, name: &str) -> bool;- async fn delete_local_instance(&self, name: &str) -> Result<bool>;- async fn connect(&self, name: &str) -> Result<Sandbox>;- async fn connect_ref(&self, wanted: &SandboxRef) -> Result<Sandbox>;- async fn connect_cloud(&self, name: &str, namespace: Option<&str>) -> Result<Sandbox>;- fn recorded_cloud_image(&self, name: &str, pool: &str) -> Option<ImageInfo>;- async fn known_refs(&self) -> Result<Vec<SandboxRef>>;- async fn resolve_ref(&self, wanted: &SandboxRef) -> Result<SandboxRef>;- async fn resolve_ref_among(&self, wanted: &SandboxRef, extra: Vec<(String, SandboxRef)>) -> Result<SandboxRef>;- fn remember_direct(&self, name: &str, url: &str) -> Result<()>;- async fn list(&self) -> Result<Vec<SandboxInfo>>;- async fn get(&self, name: &str) -> Result<SandboxInfo>;- fn stop_reason(&self, name: &str) -> Option<StopReason>;- async fn note_unasked_stops(&self) -> Vec<(String, StopReason)>;- fn spawn_stop_watch(&self) -> JoinHandle<()>;- async fn suspend(&self, name: &str) -> Result<()>;- async fn resume(&self, name: &str) -> Result<()>;- async fn restart(&self, name: &str) -> Result<()>;- fn power_control(&self, name: &str) -> Option<PowerControl>;- fn power_state(&self, name: &str) -> Option<PowerState>;- async fn power_off(&self, name: &str) -> Result<PowerState>;- async fn power_off_as(&self, name: &str, control: PowerControl) -> Result<PowerState>;- async fn power_on(&self, name: &str) -> Result<()>;- async fn delete(&self, name: &str) -> Result<()>;- async fn keep_alive(&self, name: &str, duration: Duration) -> Result<()>;-}-```--### `SandboxesBuilder`--Builder for `Sandboxes`.--```rust-pub struct SandboxesBuilder { /* private fields */ }-impl SandboxesBuilder {- fn fleet(self, fleet: FleetClient) -> Self;- fn pool_manager(self, pools: PoolManager) -> Self;- fn local(self, runtime: Arc<dyn LocalRuntime>) -> Self;- fn provider(self, provider: Arc<dyn Provider>) -> Self;- fn clouds(self, clouds: Arc<dyn CloudManager>) -> Self;- fn state_dir(self, dir: impl Into<PathBuf>) -> Self;- fn build(self) -> Sandboxes;-}-```--### `SandboxInfo`--Listing row.--```rust-pub struct SandboxInfo {- pub id: String,- pub name: String,- pub provider: ProviderKind,- pub runtime_type: String,- pub status: Status,- pub stop_reason: Option<StopReason>,-}-```--### `SandboxRef`--A parsed sandbox reference.--```rust-pub enum SandboxRef {- Local { name: String },- Cloud { name: String, namespace: Option<String> },- Direct { authority: String },- Relay { machine_id: String },- Contrib { provider: String, name: String },- Bare { name: String },-}-impl SandboxRef {- fn parse(input: &str) -> Result<Self>;- fn qualified(location: Location, name: &str) -> Result<Self>;- fn location(&self) -> Option<Location>;- fn location_word(&self) -> Option<&str>;- fn is_qualified(&self) -> bool;- fn name(&self) -> &str;- fn namespace_hint(&self) -> Option<&str>;- fn narrow(self, location: Option<Location>) -> Result<Self>;-}-```--### `SandboxState`--One state file.--```rust-pub enum SandboxState {- Fleet(FleetState),- Local(LocalState),-}-impl SandboxState {- fn sandbox_ref(&self) -> SandboxRef;- fn name(&self) -> &str;- fn runtime_type(&self) -> &str;- fn status(&self) -> &str;- fn stop_reason(&self) -> Option<StopReason>;-}-```--### `Service`--A named service of a sandbox.--```rust-pub struct Service { /* private fields */ }-impl Service {- async fn mcp_config(&self, path: Option<&str>) -> Result<McpConfig>;- async fn mcp(&self, path: Option<&str>) -> Result<McpClient>;- fn name(&self) -> &str;- fn url(&self) -> &str;- async fn request(&self, method: &str, path: &str, body: Option<Vec<u8>>, timeout: Duration) -> Result<HttpResponse>;- async fn endpoint(&self) -> Result<ServiceEndpoint>;- async fn open(&self, method: &str, path: &str, headers: &[(String, String)], body: RequestBody, head_timeout: Option<Duration>) -> Result<StreamingResponse>;- async fn request_with_headers(&self, method: &str, path: &str, headers: &[(String, String)], body: Option<Vec<u8>>, timeout: Duration) -> Result<HttpResponse>;-}-```--### `ServiceEndpoint`--Where a service is reachable from this process: a base ...--```rust-pub struct ServiceEndpoint {- pub url: String,- pub headers: Vec<(String, String)>,-}-impl ServiceEndpoint {- fn url_for(&self, path: &str) -> String;-}-```--### `settings::Entry`--A setting's effective value.--```rust-pub struct Entry {- pub key: Key,- pub value: String,- pub source: Source,-}-```--### `settings::Key`--A setting.--```rust-pub struct Key {- pub name: &'static str,- pub env: &'static str,- pub default: &'static str,- pub description: &'static str,-}-```--### `settings::Resolved`--The effective location, kind and runtime of a request ...--```rust-pub struct Resolved {- pub on: On,- pub on_source: Source,- pub kind: Kind,- pub kind_source: Source,- pub runtime: Runtime,- pub runtime_source: Source,-}-```--### `settings::Settings`--The settings as one process sees them: an environment ...--```rust-pub struct Settings { /* private fields */ }-impl Settings {- fn load() -> Result<Self, SettingsError>;- fn load_with(path: impl Into<PathBuf>, env: impl Fn(&str) -> Option<String>) -> Result<Self, SettingsError>;- fn path(&self) -> &Path;- fn entry(&self, key: Key) -> Entry;- fn list(&self) -> Vec<Entry>;- fn configured(&self, key: Key) -> Option<String>;- fn lookup(&self, env_var: &str) -> Option<String>;- fn set(&mut self, key: Key, value: &str) -> Result<String, SettingsError>;- fn unset(&mut self, key: Key) -> Result<bool, SettingsError>;- fn default_on(&self) -> Result<(On, Source), SettingsError>;- fn default_kind(&self) -> Result<(Kind, Source), SettingsError>;- fn default_runtime(&self) -> Result<(Runtime, Source), SettingsError>;- fn resolve(&self, on: Option<On>, kind: Option<Kind>, runtime: Option<Runtime>) -> Result<Resolved, SettingsError>;-}-```--### `settings::SettingsError`--A bad setting name or value.--```rust-pub struct SettingsError(pub String);-```--### `settings::Source`--Where an effective value came from.--```rust-pub enum Source {- Explicit,- Env(&'static str),- Config(PathBuf),- Default,-}-impl Source {- fn kind(&self) -> &'static str;- fn is_user_set(&self) -> bool;-}-```--### `StateStore`--The state directory (`~/.cua/sandboxes` by default).--```rust-pub struct StateStore { /* private fields */ }-impl StateStore {- fn new(dir: impl Into<PathBuf>) -> Self;- fn dir(&self) -> &Path;- fn save(&self, state: &SandboxState) -> Result<()>;- fn restrict(&self, name: &str) -> Result<()>;- fn save_fleet_claim(&self, name: &str, pool_name: &str) -> Result<()>;- fn load(&self, name: &str) -> Option<SandboxState>;- fn load_raw(&self, name: &str) -> Option<Map<String, Value>>;- fn update(&self, name: &str, fields: Map<String, Value>) -> Result<()>;- fn set_status(&self, name: &str, status: &str) -> Result<()>;- fn record_stop(&self, name: &str, reason: &StopReason) -> Result<()>;- fn delete(&self, name: &str) -> Result<()>;- fn write_lease(&self, name: &str, pid: u32) -> Result<()>;- fn remove_lease(&self, name: &str) -> Result<()>;- fn leases(&self) -> Vec<EphemeralLease>;- fn list_all(&self) -> Vec<SandboxState>;-}-```--### `Status`--Coarse lifecycle status.--```rust-pub enum Status {- Running,- Suspended,- Stopped,- Provisioning,- Unknown(String),-}-```--### `StopReason`--Why a sandbox stopped without being asked to, as its ...--```rust-pub struct StopReason {- pub exit_code: i64,- pub out_of_memory: bool,-}-impl StopReason {- fn words(&self) -> String;-}-```--### `Tunnel`--TCP forwarding for a sandbox.--```rust-pub struct Tunnel { /* private fields */ }-impl Tunnel {- async fn forward(&self, port: u16) -> Result<Forward>;-}-```--## Functions--```rust-/// Whether `word` names your own cloud ...-pub fn is_cloud_location(word: &str) -> bool-/// Whether `word` is a contrib location ...-pub fn is_contrib_location(word: &str) -> bool-/// Looks up `name` on Fleet (read-only) as ...-pub async fn local_from_fleet_template(fleet: &FleetClient, name: &str) -> Result<LocalFleetPlan>-/// State-file fields of a sandbox on a ...-pub fn placement_of_backend(backend: &str) -> (Kind, Runtime)-/// Translates a template for the local ...-pub fn plan_from_template(t: &Template) -> Result<LocalFleetPlan>-/// The pool an image string names ...-pub fn pool_image(image: &str) -> Option<&str>-/// Pool `pool`'s template image as an ...-pub async fn pool_image_info(fleet: &FleetClient, pool: &str, creds: Option<&RegistryCredentials>) -> Result<Option<ImageInfo>>-/// Deletes the runtimes cua set up itself ...-pub async fn remove_builtin_runtimes() -> Result<(), String>--// mod byoc-/// The error a cloud word without a ...-pub fn not_built() -> Error--// mod fleet_local-/// Parses Kubernetes quantities as MiB ...-pub fn parse_memory_mb(q: &str) -> Option<u64>-/// Readiness probes in a template's ...-pub fn probes_from_json(v: &Value, services: &BTreeMap<String, u16>) -> Vec<Probe>-/// The template name an image string / ...-pub fn template_name(o: &CreateOptions) -> Option<&str>--// mod http-/// Reads a streamed response whole.-pub async fn collect(resp: StreamingResponse) -> Result<HttpResponse>-/// A request body from bytes.-pub fn full(body: impl Into<Bytes>) -> RequestBody-/// Hop-by-hop headers (RFC 9110 §7.6.1) a ...-pub fn is_hop_by_hop(name: &str) -> bool-/// Opens a streaming request to `endpoint` ...-pub async fn open(endpoint: &ServiceEndpoint, method: &str, path: &str, headers: &[(String, String)], body: RequestBody, head_timeout: Option<Duration>) -> Result<StreamingResponse>--// mod mcp-/// Connects rmcp to `config`.-pub async fn connect(config: &McpConfig) -> Result<McpClient>-/// The protocol revisions cua asks for ...-pub fn preferred_versions() -> Vec<ProtocolVersion>--// mod placement-/// The capabilities of `on` (an existing ...-pub fn capabilities(on: &On) -> Capabilities-/// The built-in `cloud` capabilities.-pub fn cloud_capabilities() -> Capabilities-/// The built-in `local` capabilities.-pub fn local_capabilities() -> Capabilities-/// Every location: `local`, then the ...-pub fn locations() -> Vec<Capabilities>-/// The registered third-party provider ...-pub fn provider(name: &str) -> Option<Capabilities>-/// Registers a third-party location (--on ...-pub fn register_provider(caps: Capabilities) -> Result<(), PlacementError>-/// Chooses the kind and runtime for a ...-pub fn select(on: &On, kind: Kind, runtime: &Runtime, image: &ImageFacts, host: &HostFacts) -> Result<Selection, PlacementError>-/// Checks a request against the location's ...-pub fn validate(on: &On, kind: Kind, runtime: &Runtime) -> Result<Kind, PlacementError>--// mod pool_image-/// A template image as an `ImageInfo` for ...-pub async fn template_image_info(image: &str, runtime: &RuntimeKind, creds: Option<&RegistryCredentials>) -> ImageInfo--// mod provider-/// Whether `word` is a provider location ...-pub fn is_provider_location(word: &str) -> bool-/// The error for `--on <word>` when this ...-pub fn not_built(word: &str) -> Error-/// `Error::Unsupported` for a contrib ...-pub fn unsupported(provider: &str, op: impl Into<String>) -> Error--// mod proxy-/// A proxy to one upstream base URL with ...-pub async fn forward_to(base: String, headers: Vec<(String, String)>) -> Result<HttpProxy>-/// Joins an upstream base URL and a ...-pub fn join_url(base: &str, path_and_query: &str) -> String-/// Validates that `url` is a plain-HTTP ...-pub fn require_loopback_http(url: &str) -> Result<()>--// mod refs-/// The message of Erro ...-pub fn ambiguous_message(name: &str, candidates: &[SandboxRef]) -> String-/// `host:port`, bracketing an IPv6 literal.-pub fn authority(host: &str, port: u16) -> String-/// Canonicalizes any accepted spelling ...-pub fn canonical(input: &str) -> Result<String>-/// Resolves `wanted` among `known` (every ...-pub fn resolve(wanted: &SandboxRef, known: impl IntoIterator<Item = SandboxRef>) -> Result<SandboxRef>-/// `resolve` over `(display name, ref)` ...-pub fn resolve_named(wanted: &SandboxRef, known: impl IntoIterator<Item = (String, SandboxRef)>) -> Result<SandboxRef>-/// Relay machine ids are DNS-label safe ...-pub fn valid_machine_id(id: &str) -> bool--// mod settings-/// The cloud pool settings with the user's ...-pub fn auto_pool_config() -> AutoPoolConfig-/// The hint appended to "no cloud ...-pub fn cloud_default_hint(source: &Source) -> Option<String>-/// `$CUA_HOME/config.toml`.-pub fn config_path() -> PathBuf-/// The cua home: `$CUA_HOME`, else ...-pub fn cua_home() -> PathBuf-/// The setting named `name`.-pub fn key(name: &str) -> Result<Key, SettingsError>-/// Checks and normalises a value for `key`.-pub fn normalize(key: Key, value: &str) -> Result<String, SettingsError>--// mod state-/// `~/.cua/sandboxes` ( ...-pub fn default_state_dir() -> PathBuf-/// datetime.now(timezo ...-pub fn python_utc_now() -> String-/// Image.from_registry(ref, os_type=... ...-pub fn registry_image_dict(reference: &str, os_type: &str, kind: Option<&str>) -> Value-```--## Constants--```rust-/// The one "Cua Cloud has ended" message ...-pub const CLOUD_ENDED: &str = "Cua Cloud has ended; use a local sandbox or your own machine. \- See https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended";-/// Your own cloud accounts as locations ...-pub const CLOUD_LOCATIONS: &[&str] = _;-/// Every contrib location word the refs ...-pub const CONTRIB_LOCATIONS: &[&str] = _;-/// Default spacesd port.-pub const ENV_PORT: u16 = 3211;-/// Why a cloud (Fleet) sandbox cannot have ...-pub const FLEET_NO_GPU_REASON: &str = sandbox::FLEET_NO_GPU;-/// Directory of the ephemeral-sandbox ...-pub const LEASE_DIR: &str = ".ephemeral";-/// How long a bare-name lookup waits for ...-pub const LOOKUP_CLOUD_TIMEOUT: Duration = _;-/// The error for Fleet `macos` templates ...-pub const MACOS_FLEET_UNSUPPORTED: &str = /* ... */;-/// The status word of a local record whose ...-pub const MISSING: &str = "missing";-/// Image-string prefix naming a Fleet pool ...-pub const POOL_PREFIX: &str = "pool:";-/// How long `Sandboxes::create` waits for ...-pub const SPACESD_READY_TIMEOUT: Duration = _;--// mod byoc-/// The instance detail naming where a ...-pub const DETAIL_PLACE: &str = "place";-/// The instance detail naming the relay ...-pub const DETAIL_RELAY_MACHINE: &str = "relay_machine";--// mod byoc::meta-/// That home's device name, for "delete it ...-pub const DEVICE: &str = "cua.cloud.device";-/// That home's own relay machine, when it ...-pub const HOST: &str = "cua.cloud.host";-/// The cua home that created it (its ...-pub const OWNER: &str = "cua.cloud.owner";-/// Where it runs, for people ("AWS · ...-pub const PLACE: &str = "cua.cloud.place";-/// The provider word (`aws`, `gcp` ...-pub const PROVIDER: &str = "cua.cloud.provider";-/// The sandbox's name.-pub const SANDBOX: &str = "cua.cloud.sandbox";--// mod fleet_local-/// Deprecated spelling of `POOL_PREFIX` ...-pub const FLEET_PREFIX: &str = "fleet:";--// mod mcp-/// The default MCP endpoint path of a ...-pub const DEFAULT_PATH: &str = "/mcp";--// mod settings-/// Every setting, in display order.-pub const KEYS: [Key; 9] = _;--// mod state-/// State-file key: why a local sandbox ...-pub const STOP_REASON: &str = "stop_reason";-```--## Type aliases--```rust-/// A connected rmcp client ...-pub type McpClient = RunningService<RoleClient, ClientConfig>;-/// A streamed request body.-pub type RequestBody = UnsyncBoxBody<Bytes, BodyError>;-/// Result alias.-pub type Result<T, E = Error> = Result<T, E>;-/// Result of a runtime call; errors are ...-pub type RuntimeResult<T> = Result<T, RuntimeError>;-/// A streamed response (the body arrives ...-pub type StreamingResponse = Response<Incoming>;--// mod http-/// Error type of streamed bodies.-pub type BodyError = Box<dyn Error + Send + Sync>;--// mod proxy-/// Boxed future of a `ProxyRouter`.-pub type RouteFuture = Pin<Box<dyn Future<Output = RouteDecision> + Send>>;-```--## Re-exports--`sandbox::BuildFile`, `sandbox::BuildSpec`, `tokio_util::sync::CancellationToken`, `cua_vmm::cleanup`, `cua_fleet`, `cua_spacesd_client`, `cua_vmm::gpu`, `sandbox::ImageLayer`, `rmcp`, `cua_vmm::progress`, `sandbox::RegistryCredentials`, `cua_vmm::error::failure_kind`, `sandbox::Sidecar`.diff --git a/docs/content/docs/cua-sdk/reference/rust/cua-sdk.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-sdk.mdxindex d77b7206d5..e0eb936708 100644--- a/docs/content/docs/cua-sdk/reference/rust/cua-sdk.mdx+++ b/docs/content/docs/cua-sdk/reference/rust/cua-sdk.mdx@@ -18,7 +18,7 @@ The cua SDK: the only `#[uniffi::export]` crate of `libs/cua`.These are the objects, records, enums and functions the language bindings export, documented once in the [Cua SDK reference](/cua-sdk/reference), whose Rust tabs show each signature. Objects are `Arc<T>` handles whose methods are `async fn` returning `Result<_, CuaError>`, records are structs with public fields, and names are snake_case.-[`agent_event_category`](/cua-sdk/reference/agents#agent_event_category), [`agent_harnesses`](/cua-sdk/reference/agents#agent_harnesses), [`AgentActionReport`](/cua-sdk/reference/spaces/agents#agentactionreport-record), [`AgentArtifact`](/cua-sdk/reference/agents#agentartifact-record), [`AgentDelivery`](/cua-sdk/reference/spaces/persistent-agents#agentdelivery-record), [`AgentEvent`](/cua-sdk/reference/agents#agentevent-record), [`AgentEventPage`](/cua-sdk/reference/agents#agenteventpage-record), [`AgentFile`](/cua-sdk/reference/agents#agentfile-record), [`AgentInfo`](/cua-sdk/reference/agent-setup#agentinfo-record), [`AgentMcpServer`](/cua-sdk/reference/agent-setup#agentmcpserver-record), [`AgentPauseReport`](/cua-sdk/reference/spaces/persistent-agents#agentpausereport-record), [`AgentResumeReport`](/cua-sdk/reference/spaces/persistent-agents#agentresumereport-record), [`AgentRun`](/cua-sdk/reference/agents#agentrun), [`AgentRunInfo`](/cua-sdk/reference/agents#agentruninfo-record), [`AgentRunMcpServer`](/cua-sdk/reference/agents#agentrunmcpserver-record), [`AgentRunOptions`](/cua-sdk/reference/agents#agentrunoptions-record), [`AgentRunResult`](/cua-sdk/reference/agents#agentrunresult-record), [`AgentRunStatus`](/cua-sdk/reference/spaces/agents#agentrunstatus-record), [`Agents`](/cua-sdk/reference/agents#agents), [`AgentSetup`](/cua-sdk/reference/agent-setup#agentsetup), [`AgentSetupChange`](/cua-sdk/reference/agent-setup#agentsetupchange-enum), [`AgentSetupOutcome`](/cua-sdk/reference/agent-setup#agentsetupoutcome-record), [`AgentSetupTarget`](/cua-sdk/reference/agent-setup#agentsetuptarget-enum), [`AgentStartReport`](/cua-sdk/reference/spaces/agents#agentstartreport-record), [`AgentTranscript`](/cua-sdk/reference/agents#agenttranscript), [`AgentTranscriptItem`](/cua-sdk/reference/agents#agenttranscriptitem-record), [`ambiguous_sandbox_candidates`](/cua-sdk/reference/sandbox#ambiguous_sandbox_candidates), [`AudioPacket`](/cua-sdk/reference/spacesd/media#audiopacket-record), [`AudioSink`](/cua-sdk/reference/spacesd/media#audiosink), [`Auth`](/cua-sdk/reference/auth#auth), [`AuthIdentity`](/cua-sdk/reference/auth#authidentity-record), [`AuthStatus`](/cua-sdk/reference/auth#authstatus-record), [`BuildFile`](/cua-sdk/reference/image#buildfile-record), [`BundledSkill`](/cua-sdk/reference/agent-setup#bundledskill-record), [`canonical_image`](/cua-sdk/reference/image#canonical_image), [`canonical_image_tier`](/cua-sdk/reference/image#canonical_image_tier), [`check_placement`](/cua-sdk/reference/cua#check_placement), [`CloudCheck`](/cua-sdk/reference/spaces/cloud#cloudcheck-record), [`CloudConnected`](/cua-sdk/reference/spaces/cloud#cloudconnected-record), [`CloudCredentials`](/cua-sdk/reference/spaces/cloud#cloudcredentials-record), [`CloudDisconnected`](/cua-sdk/reference/spaces/cloud#clouddisconnected-record), [`CloudKind`](/cua-sdk/reference/spaces/cloud#cloudkind-record), [`CloudOptions`](/cua-sdk/reference/sandbox/options#cloudoptions-record), [`CloudProvider`](/cua-sdk/reference/spaces/cloud#cloudprovider-record), [`CloudResource`](/cua-sdk/reference/spaces/cloud#cloudresource-record), [`CloudStatus`](/cua-sdk/reference/spaces/cloud#cloudstatus-record), [`CloudSweepItem`](/cua-sdk/reference/spaces/cloud#cloudsweepitem-record), [`CloudSweepReport`](/cua-sdk/reference/spaces/cloud#cloudsweepreport-record), [`CloudTarget`](/cua-sdk/reference/spaces/cloud#cloudtarget-record), [`CloudTestReport`](/cua-sdk/reference/spaces/cloud#cloudtestreport-record), [`ComputerGrant`](/cua-sdk/reference/spaces/persistent-agents#computergrant-record), [`config_get`](/cua-sdk/reference/cua#config_get), [`config_list`](/cua-sdk/reference/cua#config_list), [`config_path`](/cua-sdk/reference/cua#config_path), [`config_set`](/cua-sdk/reference/cua#config_set), [`config_unset`](/cua-sdk/reference/cua#config_unset), [`ConfigEntry`](/cua-sdk/reference/cua#configentry-record), [`Container`](/cua-sdk/reference/sandbox/options#container-record), [`contrib_providers_built`](/cua-sdk/reference/sandbox#contrib_providers_built), [`Cua`](/cua-sdk/reference/cua#cua), [`CuaConfig`](/cua-sdk/reference/cua#cuaconfig-record), [`CuaInfo`](/cua-sdk/reference/cua#cuainfo-record), [`CuaMode`](/cua-sdk/reference/cua#cuamode-enum), [`CursorArt`](/cua-sdk/reference/spaces/streams#cursorart-record), [`DeviceEnrollment`](/cua-sdk/reference/spaces/devices#deviceenrollment-record), [`Devices`](/cua-sdk/reference/spaces/devices#devices), [`DevicesSnapshot`](/cua-sdk/reference/spaces/devices#devicessnapshot-record), [`DoctorReport`](/cua-sdk/reference/local#doctorreport-record), [`DriveAccessRequest`](/cua-sdk/reference/spaces/volume#driveaccessrequest-record), [`DriveAudit`](/cua-sdk/reference/spaces/volume#driveaudit-record), [`DriveAuditEvent`](/cua-sdk/reference/spaces/volume#driveauditevent-record), [`DriveCacheStats`](/cua-sdk/reference/spaces/volume-sync#drivecachestats-record), [`DriveConflict`](/cua-sdk/reference/spaces/volume-sync#driveconflict-record), [`DriveDevice`](/cua-sdk/reference/spaces/volume-sync#drivedevice-record), [`DriveEntry`](/cua-sdk/reference/spaces/volume#driveentry-record), [`DriveFile`](/cua-sdk/reference/spaces/volume#drivefile-record), [`DriveFileSync`](/cua-sdk/reference/spaces/volume#drivefilesync-record), [`DriveGrant`](/cua-sdk/reference/spaces/volume#drivegrant-record), [`DriveListing`](/cua-sdk/reference/spaces/volume#drivelisting-record), [`DriveMountStatus`](/cua-sdk/reference/spaces/volume-sync#drivemountstatus-record), [`DriveObject`](/cua-sdk/reference/spaces/volume#driveobject-record), [`DrivePendingUpload`](/cua-sdk/reference/spaces/volume-sync#drivependingupload-record), [`DriveS3Settings`](/cua-sdk/reference/spaces/volume-sync#drives3settings-record), [`DriveSpaceVolume`](/cua-sdk/reference/spaces/volume-sync#drivespacevolume-record), [`DriveStorage`](/cua-sdk/reference/spaces/volume-sync#drivestorage-record), [`DriveStorageCheck`](/cua-sdk/reference/spaces/volume-sync#drivestoragecheck-record), [`DriveStorageUpdate`](/cua-sdk/reference/spaces/volume-sync#drivestorageupdate-record), [`DriveSyncEvent`](/cua-sdk/reference/spaces/volume-sync#drivesyncevent-record), [`DriveSyncEvents`](/cua-sdk/reference/spaces/volume-sync#drivesyncevents-record), [`DriveSyncStatus`](/cua-sdk/reference/spaces/volume-sync#drivesyncstatus-record), [`DriveVersion`](/cua-sdk/reference/spaces/volume#driveversion-record), [`DriveView`](/cua-sdk/reference/spaces/volume#driveview-record), [`Fleet`](/cua-sdk/reference/errors#fleet), [`fleet_check_runtime`](/cua-sdk/reference/fleet/images#fleet_check_runtime), [`fleet_generate_claim_token`](/cua-sdk/reference/fleet#fleet_generate_claim_token), [`fleet_image_variant`](/cua-sdk/reference/fleet/images#fleet_image_variant), [`fleet_resolve_runtime`](/cua-sdk/reference/fleet/images#fleet_resolve_runtime), [`fleet_size_limits`](/cua-sdk/reference/fleet/images#fleet_size_limits), [`FleetBillingCard`](/cua-sdk/reference/fleet/images#fleetbillingcard-record), [`FleetBillingCredit`](/cua-sdk/reference/fleet/images#fleetbillingcredit-record), [`FleetBillingStatus`](/cua-sdk/reference/fleet/images#fleetbillingstatus-record), [`FleetClaim`](/cua-sdk/reference/fleet/claims#fleetclaim-record), [`FleetClaimOptions`](/cua-sdk/reference/fleet/claims#fleetclaimoptions-record), [`FleetGcReport`](/cua-sdk/reference/fleet#fleetgcreport-record), [`FleetManagedPool`](/cua-sdk/reference/fleet#fleetmanagedpool-record), [`FleetPool`](/cua-sdk/reference/fleet#fleetpool-record), [`FleetPoolExport`](/cua-sdk/reference/fleet#fleetpoolexport-record), [`FleetPools`](/cua-sdk/reference/fleet#fleetpools), [`FleetPoolSpec`](/cua-sdk/reference/fleet#fleetpoolspec-record), [`FleetSandbox`](/cua-sdk/reference/fleet/claims#fleetsandbox-record), [`FleetSettings`](/cua-sdk/reference/cua#fleetsettings-record), [`FleetSignedUrl`](/cua-sdk/reference/fleet/claims#fleetsignedurl-record), [`FleetSizeLimits`](/cua-sdk/reference/fleet/images#fleetsizelimits-record), [`FleetUsagePricing`](/cua-sdk/reference/fleet/images#fleetusagepricing-record), [`FrameSink`](/cua-sdk/reference/spacesd/media#framesink), [`GpuOption`](/cua-sdk/reference/spaces/create#gpuoption-record), [`GpuSupport`](/cua-sdk/reference/spaces/create#gpusupport-record), [`GuestDisplay`](/cua-sdk/reference/sandbox/without-spacesd#guestdisplay), [`HomeTransfer`](/cua-sdk/reference/spaces/persistent-agents#hometransfer-record), [`Host`](/cua-sdk/reference/spaces/host#host), [`HostAccessRecord`](/cua-sdk/reference/spaces/host#hostaccessrecord-record), [`HostPermission`](/cua-sdk/reference/spaces/host#hostpermission-record), [`HostProvidedSpace`](/cua-sdk/reference/spaces/host#hostprovidedspace-record), [`HostSettingsChange`](/cua-sdk/reference/spaces/host#hostsettingschange-record), [`HostSetupOptions`](/cua-sdk/reference/spaces/host#hostsetupoptions-record), [`HostSpacesAuditRecord`](/cua-sdk/reference/spaces/host#hostspacesauditrecord-record), [`HostStatus`](/cua-sdk/reference/spaces/host#hoststatus-record), [`HttpHeader`](/cua-sdk/reference/services#httpheader-record), [`HttpResponse`](/cua-sdk/reference/services#httpresponse-record), [`image_alias`](/cua-sdk/reference/image#image_alias), [`ImageBuild`](/cua-sdk/reference/image#imagebuild-record), [`ImageInfo`](/cua-sdk/reference/image#imageinfo-record), [`ImageLayer`](/cua-sdk/reference/image#imagelayer-enum), [`Local`](/cua-sdk/reference/local#local), [`LocalImage`](/cua-sdk/reference/local#localimage-record), [`LocalStorage`](/cua-sdk/reference/local#localstorage-record), [`LocationInfo`](/cua-sdk/reference/cua#locationinfo-record), [`locations`](/cua-sdk/reference/cua#locations), [`LoginAttempt`](/cua-sdk/reference/auth#loginattempt), [`LoginMethod`](/cua-sdk/reference/auth#loginmethod-enum), [`may_have_fleet_session`](/cua-sdk/reference/auth#may_have_fleet_session), [`mcp_connect`](/cua-sdk/reference/services#mcp_connect), [`mcp_connect_url`](/cua-sdk/reference/services#mcp_connect_url), [`McpClient`](/cua-sdk/reference/services#mcpclient), [`McpConfig`](/cua-sdk/reference/services#mcpconfig-record), [`MediaBridge`](/cua-sdk/reference/spacesd/media#mediabridge-record), [`MediaEvent`](/cua-sdk/reference/spacesd/media#mediaevent-record), [`MediaSession`](/cua-sdk/reference/spacesd/media#mediasession), [`MediaStats`](/cua-sdk/reference/spacesd/media#mediastats-record), [`normalize_image`](/cua-sdk/reference/image#normalize_image), [`NotificationInfo`](/cua-sdk/reference/spaces/persistent-agents#notificationinfo-record), [`omarchy_image`](/cua-sdk/reference/image#omarchy_image), [`Overlay`](/cua-sdk/reference/sandbox#overlay-record), [`OverlayResult`](/cua-sdk/reference/sandbox#overlayresult-record), [`PairingCode`](/cua-sdk/reference/spaces/host#pairingcode-record), [`parse_sandbox_ref`](/cua-sdk/reference/sandbox#parse_sandbox_ref), [`PersistentAgentInfo`](/cua-sdk/reference/spaces/persistent-agents#persistentagentinfo-record), [`PersistentAgentOptions`](/cua-sdk/reference/spaces/persistent-agents#persistentagentoptions-record), [`PoolOptions`](/cua-sdk/reference/fleet#pooloptions-record), [`PortForward`](/cua-sdk/reference/services#portforward), [`presence_color`](/cua-sdk/reference/spaces/streams#presence_color), [`presence_conformance_json`](/cua-sdk/reference/spaces/streams#presence_conformance_json), [`presence_cursor_art`](/cua-sdk/reference/spaces/streams#presence_cursor_art), [`presence_cursor_art_all`](/cua-sdk/reference/spaces/streams#presence_cursor_art_all), [`presence_cursor_art_svg`](/cua-sdk/reference/spaces/streams#presence_cursor_art_svg), [`presence_now_ms`](/cua-sdk/reference/spaces/streams#presence_now_ms), [`presence_text_color`](/cua-sdk/reference/spaces/streams#presence_text_color), [`PresenceCursor`](/cua-sdk/reference/spaces/streams#presencecursor-record), [`PresenceDrawable`](/cua-sdk/reference/spaces/streams#presencedrawable-record), [`PresenceEvent`](/cua-sdk/reference/spaces/streams#presenceevent-record), [`PresenceIdentity`](/cua-sdk/reference/spaces/streams#presenceidentity-record), [`PresenceMember`](/cua-sdk/reference/spaces/streams#presencemember-record), [`PresenceParticipant`](/cua-sdk/reference/spaces/streams#presenceparticipant-record), [`PresencePoint`](/cua-sdk/reference/spaces/streams#presencepoint-record), [`PresenceView`](/cua-sdk/reference/spaces/streams#presenceview), [`PublicUrl`](/cua-sdk/reference/services#publicurl-record), [`qualify_sandbox_ref`](/cua-sdk/reference/sandbox#qualify_sandbox_ref), [`ReadinessProbe`](/cua-sdk/reference/sandbox/options#readinessprobe-record), [`RegistrySecret`](/cua-sdk/reference/image#registrysecret-enum), [`Relay`](/cua-sdk/reference/spaces/host#relay), [`RelayAuditEvent`](/cua-sdk/reference/spaces/devices#relayauditevent-record), [`RelayClientInfo`](/cua-sdk/reference/spaces/host#relayclientinfo-record), [`RelayDevice`](/cua-sdk/reference/spaces/devices#relaydevice-record), [`RelayMachine`](/cua-sdk/reference/spaces/host#relaymachine-record), [`ReplayMode`](/cua-sdk/reference/spacesd/shell#replaymode-enum), [`resolve_image`](/cua-sdk/reference/image#resolve_image), [`resolve_image_with_secret`](/cua-sdk/reference/image#resolve_image_with_secret), [`ResolvedImage`](/cua-sdk/reference/image#resolvedimage-record), [`RoutineInfo`](/cua-sdk/reference/spaces/persistent-agents#routineinfo-record), [`RuntimeCheck`](/cua-sdk/reference/local#runtimecheck-record), [`RuntimeCheckStatus`](/cua-sdk/reference/local#runtimecheckstatus-enum), [`Sandbox`](/cua-sdk/reference/sandbox#sandbox), [`sandbox_locations`](/cua-sdk/reference/sandbox#sandbox_locations), [`SandboxCreateOptions`](/cua-sdk/reference/sandbox/options#sandboxcreateoptions-record), [`Sandboxes`](/cua-sdk/reference/sandbox#sandboxes), [`SandboxInfo`](/cua-sdk/reference/sandbox#sandboxinfo-record), [`SandboxListing`](/cua-sdk/reference/sandbox#sandboxlisting-record), [`SandboxPhase`](/cua-sdk/reference/sandbox#sandboxphase-enum), [`SandboxRefParts`](/cua-sdk/reference/sandbox#sandboxrefparts-record), [`SandboxSpec`](/cua-sdk/reference/fleet#sandboxspec-record), [`SandboxStatus`](/cua-sdk/reference/sandbox#sandboxstatus-enum), [`Service`](/cua-sdk/reference/services#service), [`ServiceEndpoint`](/cua-sdk/reference/services#serviceendpoint-record), [`SetupStep`](/cua-sdk/reference/local#setupstep-record), [`SiteLoginOptions`](/cua-sdk/reference/spaces/space#siteloginoptions-record), [`SiteLoginReport`](/cua-sdk/reference/spaces/space#siteloginreport-record), [`Space`](/cua-sdk/reference/spaces/space#space), [`SpaceAgentOptions`](/cua-sdk/reference/spaces/agents#spaceagentoptions-record), [`SpaceAppIcon`](/cua-sdk/reference/spaces/windows#spaceappicon-record), [`SpaceAppIconRequest`](/cua-sdk/reference/spaces/windows#spaceappiconrequest-record), [`SpaceBashResult`](/cua-sdk/reference/spaces/space#spacebashresult-record), [`SpaceCancelOutcome`](/cua-sdk/reference/spaces/create#spacecanceloutcome-record), [`SpaceCreateListener`](/cua-sdk/reference/spaces/create#spacecreatelistener), [`SpaceCreateOptions`](/cua-sdk/reference/spaces/create#spacecreateoptions-record), [`SpaceCreateProgress`](/cua-sdk/reference/spaces/create#spacecreateprogress-record), [`SpaceCreateResult`](/cua-sdk/reference/spaces/create#spacecreateresult-record), [`SpaceDisplay`](/cua-sdk/reference/spaces/windows#spacedisplay-record), [`SpaceHotspotStatus`](/cua-sdk/reference/spaces/space#spacehotspotstatus-record), [`SpaceInfo`](/cua-sdk/reference/spaces#spaceinfo-record), [`SpacePowerReport`](/cua-sdk/reference/spaces#spacepowerreport-record), [`SpacePresence`](/cua-sdk/reference/spaces/streams#spacepresence), [`SpaceRelayRegistration`](/cua-sdk/reference/spaces/space#spacerelayregistration-record), [`Spaces`](/cua-sdk/reference/spaces#spaces), [`spaces_tool_methods`](/cua-sdk/reference/spaces#spaces_tool_methods), [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient), [`SpacesdHttpHeader`](/cua-sdk/reference/spacesd#spacesdhttpheader-record), [`SpacesdHttpRequest`](/cua-sdk/reference/spacesd#spacesdhttprequest-record), [`SpacesdHttpResponse`](/cua-sdk/reference/spacesd#spacesdhttpresponse-record), [`SpacesdProcess`](/cua-sdk/reference/spacesd/shell#spacesdprocess), [`SpaceSendFileOptions`](/cua-sdk/reference/spaces/space#spacesendfileoptions-record), [`SpaceSendFileReport`](/cua-sdk/reference/spaces/space#spacesendfilereport-record), [`SpaceSentFile`](/cua-sdk/reference/spaces/space#spacesentfile-record), [`SpaceShareEntry`](/cua-sdk/reference/spaces/space#spaceshareentry-record), [`SpaceShares`](/cua-sdk/reference/spaces/space#spaceshares-record), [`SpacesHost`](/cua-sdk/reference/spaces/space#spaceshost-record), [`SpacesHostLimit`](/cua-sdk/reference/spaces/space#spaceshostlimit-record), [`SpacesToolMethod`](/cua-sdk/reference/spaces#spacestoolmethod-record), [`SpaceStreamOptions`](/cua-sdk/reference/spaces/streams#spacestreamoptions-record), [`SpaceStreamSession`](/cua-sdk/reference/spaces/streams#spacestreamsession), [`SpaceStreamStats`](/cua-sdk/reference/spaces/streams#spacestreamstats-record), [`SpaceStreamTicket`](/cua-sdk/reference/spaces/streams#spacestreamticket-record), [`SpaceToolInfo`](/cua-sdk/reference/spaces/space#spacetoolinfo-record), [`SpaceToolResult`](/cua-sdk/reference/spaces/space#spacetoolresult-record), [`SpaceTransferReport`](/cua-sdk/reference/spaces/space#spacetransferreport-record), [`SpaceUsage`](/cua-sdk/reference/spaces/windows#spaceusage-record), [`SpaceWindow`](/cua-sdk/reference/spaces/space#spacewindow-record), [`SpaceWriteReport`](/cua-sdk/reference/spaces/space#spacewritereport-record), [`StorageVolume`](/cua-sdk/reference/local#storagevolume-record), [`StreamStatsReport`](/cua-sdk/reference/telemetry#streamstatsreport-record), [`telemetry_acknowledge_notice`](/cua-sdk/reference/telemetry#telemetry_acknowledge_notice), [`telemetry_flush`](/cua-sdk/reference/telemetry#telemetry_flush), [`telemetry_notice_text`](/cua-sdk/reference/telemetry#telemetry_notice_text), [`telemetry_record_bench_run`](/cua-sdk/reference/telemetry#telemetry_record_bench_run), [`telemetry_record_feature`](/cua-sdk/reference/telemetry#telemetry_record_feature), [`telemetry_record_onboarding_step`](/cua-sdk/reference/telemetry#telemetry_record_onboarding_step), [`telemetry_record_stream_stats`](/cua-sdk/reference/telemetry#telemetry_record_stream_stats), [`telemetry_reset_id`](/cua-sdk/reference/telemetry#telemetry_reset_id), [`telemetry_schema_json`](/cua-sdk/reference/telemetry#telemetry_schema_json), [`telemetry_set_enabled`](/cua-sdk/reference/telemetry#telemetry_set_enabled), [`telemetry_set_surface`](/cua-sdk/reference/telemetry#telemetry_set_surface), [`telemetry_show_last`](/cua-sdk/reference/telemetry#telemetry_show_last), [`telemetry_status`](/cua-sdk/reference/telemetry#telemetry_status), [`telemetry_use_app_notice`](/cua-sdk/reference/telemetry#telemetry_use_app_notice), [`TelemetryStatus`](/cua-sdk/reference/telemetry#telemetrystatus-record), [`TeleportApprover`](/cua-sdk/reference/spaces/teleport#teleportapprover), [`TeleportDecision`](/cua-sdk/reference/spaces/teleport#teleportdecision-record), [`TeleportItem`](/cua-sdk/reference/spaces/teleport#teleportitem-record), [`TeleportManifest`](/cua-sdk/reference/spaces/teleport#teleportmanifest-record), [`TeleportReceipt`](/cua-sdk/reference/spaces/teleport#teleportreceipt-record), [`VideoFrame`](/cua-sdk/reference/spacesd/media#videoframe-record), [`ViewerLink`](/cua-sdk/reference/sandbox#viewerlink-record), [`ViewerOptions`](/cua-sdk/reference/sandbox#vieweroptions-record).+[`agent_event_category`](/cua-sdk/reference/agents#agent_event_category), [`agent_harnesses`](/cua-sdk/reference/agents#agent_harnesses), [`AgentActionReport`](/cua-sdk/reference/spaces#agentactionreport-record), [`AgentArtifact`](/cua-sdk/reference/agents#agentartifact-record), [`AgentDelivery`](/cua-sdk/reference/spaces/persistent-agents#agentdelivery-record), [`AgentEvent`](/cua-sdk/reference/agents#agentevent-record), [`AgentEventPage`](/cua-sdk/reference/agents#agenteventpage-record), [`AgentFile`](/cua-sdk/reference/agents#agentfile-record), [`AgentInfo`](/cua-sdk/reference/agents#agentinfo-record), [`AgentMcpServer`](/cua-sdk/reference/agents#agentmcpserver-record), [`AgentPauseReport`](/cua-sdk/reference/spaces/persistent-agents#agentpausereport-record), [`AgentResumeReport`](/cua-sdk/reference/spaces/persistent-agents#agentresumereport-record), [`AgentRun`](/cua-sdk/reference/agents#agentrun), [`AgentRunInfo`](/cua-sdk/reference/agents#agentruninfo-record), [`AgentRunMcpServer`](/cua-sdk/reference/agents#agentrunmcpserver-record), [`AgentRunOptions`](/cua-sdk/reference/agents#agentrunoptions-record), [`AgentRunResult`](/cua-sdk/reference/agents#agentrunresult-record), [`AgentRunStatus`](/cua-sdk/reference/spaces#agentrunstatus-record), [`Agents`](/cua-sdk/reference/agents#agents), [`AgentSetup`](/cua-sdk/reference/agents#agentsetup), [`AgentSetupChange`](/cua-sdk/reference/agents#agentsetupchange-enum), [`AgentSetupOutcome`](/cua-sdk/reference/agents#agentsetupoutcome-record), [`AgentSetupTarget`](/cua-sdk/reference/agents#agentsetuptarget-enum), [`AgentStartReport`](/cua-sdk/reference/spaces#agentstartreport-record), [`AgentTranscript`](/cua-sdk/reference/agents#agenttranscript), [`AgentTranscriptItem`](/cua-sdk/reference/agents#agenttranscriptitem-record), [`ambiguous_sandbox_candidates`](/cua-sdk/reference/sandbox#ambiguous_sandbox_candidates), [`AudioPacket`](/cua-sdk/reference/spacesd/computer#audiopacket-record), [`AudioSink`](/cua-sdk/reference/spacesd/computer#audiosink), [`Auth`](/cua-sdk/reference/auth#auth), [`AuthIdentity`](/cua-sdk/reference/auth#authidentity-record), [`AuthStatus`](/cua-sdk/reference/auth#authstatus-record), [`BuildFile`](/cua-sdk/reference/image#buildfile-record), [`BundledSkill`](/cua-sdk/reference/agents#bundledskill-record), [`canonical_image`](/cua-sdk/reference/image#canonical_image), [`canonical_image_tier`](/cua-sdk/reference/image#canonical_image_tier), [`check_placement`](/cua-sdk/reference/cua#check_placement), [`CloudCheck`](/cua-sdk/reference/spaces/persistent-agents#cloudcheck-record), [`CloudConnected`](/cua-sdk/reference/spaces/persistent-agents#cloudconnected-record), [`CloudCredentials`](/cua-sdk/reference/spaces/persistent-agents#cloudcredentials-record), [`CloudDisconnected`](/cua-sdk/reference/spaces/persistent-agents#clouddisconnected-record), [`CloudKind`](/cua-sdk/reference/spaces/persistent-agents#cloudkind-record), [`CloudOptions`](/cua-sdk/reference/image#cloudoptions-record), [`CloudProvider`](/cua-sdk/reference/spaces/persistent-agents#cloudprovider-record), [`CloudResource`](/cua-sdk/reference/spaces/persistent-agents#cloudresource-record), [`CloudStatus`](/cua-sdk/reference/spaces/persistent-agents#cloudstatus-record), [`CloudSweepItem`](/cua-sdk/reference/spaces/persistent-agents#cloudsweepitem-record), [`CloudSweepReport`](/cua-sdk/reference/spaces/persistent-agents#cloudsweepreport-record), [`CloudTarget`](/cua-sdk/reference/spaces/persistent-agents#cloudtarget-record), [`CloudTestReport`](/cua-sdk/reference/spaces/persistent-agents#cloudtestreport-record), [`ComputerGrant`](/cua-sdk/reference/spaces/persistent-agents#computergrant-record), [`config_get`](/cua-sdk/reference/cua#config_get), [`config_list`](/cua-sdk/reference/cua#config_list), [`config_path`](/cua-sdk/reference/cua#config_path), [`config_set`](/cua-sdk/reference/cua#config_set), [`config_unset`](/cua-sdk/reference/cua#config_unset), [`ConfigEntry`](/cua-sdk/reference/cua#configentry-record), [`Container`](/cua-sdk/reference/image#container-record), [`contrib_providers_built`](/cua-sdk/reference/sandbox#contrib_providers_built), [`Cua`](/cua-sdk/reference/cua#cua), [`CuaConfig`](/cua-sdk/reference/cua#cuaconfig-record), [`CuaInfo`](/cua-sdk/reference/cua#cuainfo-record), [`CuaMode`](/cua-sdk/reference/cua#cuamode-enum), [`CursorArt`](/cua-sdk/reference/spaces/streams#cursorart-record), [`DeviceEnrollment`](/cua-sdk/reference/spaces/host#deviceenrollment-record), [`Devices`](/cua-sdk/reference/spaces/host#devices), [`DevicesSnapshot`](/cua-sdk/reference/spaces/host#devicessnapshot-record), [`DoctorReport`](/cua-sdk/reference/cua#doctorreport-record), [`DriveAccessRequest`](/cua-sdk/reference/spaces/volume#driveaccessrequest-record), [`DriveAudit`](/cua-sdk/reference/spaces/volume#driveaudit-record), [`DriveAuditEvent`](/cua-sdk/reference/spaces/volume#driveauditevent-record), [`DriveCacheStats`](/cua-sdk/reference/spaces/volume#drivecachestats-record), [`DriveConflict`](/cua-sdk/reference/spaces/volume#driveconflict-record), [`DriveDevice`](/cua-sdk/reference/spaces/volume#drivedevice-record), [`DriveEntry`](/cua-sdk/reference/spaces/volume#driveentry-record), [`DriveFile`](/cua-sdk/reference/spaces/volume#drivefile-record), [`DriveFileSync`](/cua-sdk/reference/spaces/volume#drivefilesync-record), [`DriveGrant`](/cua-sdk/reference/spaces/volume#drivegrant-record), [`DriveListing`](/cua-sdk/reference/spaces/volume#drivelisting-record), [`DriveMountStatus`](/cua-sdk/reference/spaces/volume#drivemountstatus-record), [`DriveObject`](/cua-sdk/reference/spaces/volume#driveobject-record), [`DrivePendingUpload`](/cua-sdk/reference/spaces/volume#drivependingupload-record), [`DriveS3Settings`](/cua-sdk/reference/spaces/volume#drives3settings-record), [`DriveSpaceVolume`](/cua-sdk/reference/spaces/volume#drivespacevolume-record), [`DriveStorage`](/cua-sdk/reference/spaces/volume#drivestorage-record), [`DriveStorageCheck`](/cua-sdk/reference/spaces/volume#drivestoragecheck-record), [`DriveStorageUpdate`](/cua-sdk/reference/spaces/volume#drivestorageupdate-record), [`DriveSyncEvent`](/cua-sdk/reference/spaces/volume#drivesyncevent-record), [`DriveSyncEvents`](/cua-sdk/reference/spaces/volume#drivesyncevents-record), [`DriveSyncStatus`](/cua-sdk/reference/spaces/volume#drivesyncstatus-record), [`DriveVersion`](/cua-sdk/reference/spaces/volume#driveversion-record), [`DriveView`](/cua-sdk/reference/spaces/volume#driveview-record), [`Fleet`](/cua-sdk/reference/errors#fleet), [`fleet_check_runtime`](/cua-sdk/reference/fleet/images#fleet_check_runtime), [`fleet_generate_claim_token`](/cua-sdk/reference/fleet#fleet_generate_claim_token), [`fleet_image_variant`](/cua-sdk/reference/fleet/images#fleet_image_variant), [`fleet_resolve_runtime`](/cua-sdk/reference/fleet/images#fleet_resolve_runtime), [`fleet_size_limits`](/cua-sdk/reference/fleet/images#fleet_size_limits), [`FleetBillingCard`](/cua-sdk/reference/fleet/images#fleetbillingcard-record), [`FleetBillingCredit`](/cua-sdk/reference/fleet/images#fleetbillingcredit-record), [`FleetBillingStatus`](/cua-sdk/reference/fleet/images#fleetbillingstatus-record), [`FleetClaim`](/cua-sdk/reference/fleet/claims#fleetclaim-record), [`FleetClaimOptions`](/cua-sdk/reference/fleet/claims#fleetclaimoptions-record), [`FleetGcReport`](/cua-sdk/reference/fleet#fleetgcreport-record), [`FleetManagedPool`](/cua-sdk/reference/fleet#fleetmanagedpool-record), [`FleetPool`](/cua-sdk/reference/fleet#fleetpool-record), [`FleetPoolExport`](/cua-sdk/reference/fleet#fleetpoolexport-record), [`FleetPools`](/cua-sdk/reference/fleet#fleetpools), [`FleetPoolSpec`](/cua-sdk/reference/fleet#fleetpoolspec-record), [`FleetSandbox`](/cua-sdk/reference/fleet/claims#fleetsandbox-record), [`FleetSettings`](/cua-sdk/reference/cua#fleetsettings-record), [`FleetSignedUrl`](/cua-sdk/reference/fleet/claims#fleetsignedurl-record), [`FleetSizeLimits`](/cua-sdk/reference/fleet/images#fleetsizelimits-record), [`FleetUsagePricing`](/cua-sdk/reference/fleet/images#fleetusagepricing-record), [`FrameSink`](/cua-sdk/reference/spacesd/computer#framesink), [`GpuOption`](/cua-sdk/reference/spaces#gpuoption-record), [`GpuSupport`](/cua-sdk/reference/spaces#gpusupport-record), [`GuestDisplay`](/cua-sdk/reference/spacesd#guestdisplay), [`HomeTransfer`](/cua-sdk/reference/spaces/persistent-agents#hometransfer-record), [`Host`](/cua-sdk/reference/spaces/host#host), [`HostAccessRecord`](/cua-sdk/reference/spaces/host#hostaccessrecord-record), [`HostPermission`](/cua-sdk/reference/spaces/host#hostpermission-record), [`HostProvidedSpace`](/cua-sdk/reference/spaces/host#hostprovidedspace-record), [`HostSettingsChange`](/cua-sdk/reference/spaces/host#hostsettingschange-record), [`HostSetupOptions`](/cua-sdk/reference/spaces/host#hostsetupoptions-record), [`HostSpacesAuditRecord`](/cua-sdk/reference/spaces/host#hostspacesauditrecord-record), [`HostStatus`](/cua-sdk/reference/spaces/host#hoststatus-record), [`HttpHeader`](/cua-sdk/reference/services#httpheader-record), [`HttpResponse`](/cua-sdk/reference/services#httpresponse-record), [`image_alias`](/cua-sdk/reference/image#image_alias), [`ImageBuild`](/cua-sdk/reference/image#imagebuild-record), [`ImageInfo`](/cua-sdk/reference/image#imageinfo-record), [`ImageLayer`](/cua-sdk/reference/image#imagelayer-enum), [`Local`](/cua-sdk/reference/cua#local), [`LocalImage`](/cua-sdk/reference/cua#localimage-record), [`LocalStorage`](/cua-sdk/reference/cua#localstorage-record), [`LocationInfo`](/cua-sdk/reference/cua#locationinfo-record), [`locations`](/cua-sdk/reference/cua#locations), [`LoginAttempt`](/cua-sdk/reference/auth#loginattempt), [`LoginMethod`](/cua-sdk/reference/auth#loginmethod-enum), [`may_have_fleet_session`](/cua-sdk/reference/auth#may_have_fleet_session), [`mcp_connect`](/cua-sdk/reference/services#mcp_connect), [`mcp_connect_url`](/cua-sdk/reference/services#mcp_connect_url), [`McpClient`](/cua-sdk/reference/services#mcpclient), [`McpConfig`](/cua-sdk/reference/services#mcpconfig-record), [`MediaBridge`](/cua-sdk/reference/spacesd/computer#mediabridge-record), [`MediaEvent`](/cua-sdk/reference/spacesd/computer#mediaevent-record), [`MediaSession`](/cua-sdk/reference/spacesd/computer#mediasession), [`MediaStats`](/cua-sdk/reference/spacesd/computer#mediastats-record), [`normalize_image`](/cua-sdk/reference/image#normalize_image), [`NotificationInfo`](/cua-sdk/reference/spaces/persistent-agents#notificationinfo-record), [`omarchy_image`](/cua-sdk/reference/image#omarchy_image), [`Overlay`](/cua-sdk/reference/sandbox#overlay-record), [`OverlayResult`](/cua-sdk/reference/sandbox#overlayresult-record), [`PairingCode`](/cua-sdk/reference/spaces/host#pairingcode-record), [`parse_sandbox_ref`](/cua-sdk/reference/sandbox#parse_sandbox_ref), [`PersistentAgentInfo`](/cua-sdk/reference/spaces/persistent-agents#persistentagentinfo-record), [`PersistentAgentOptions`](/cua-sdk/reference/spaces/persistent-agents#persistentagentoptions-record), [`PoolOptions`](/cua-sdk/reference/fleet#pooloptions-record), [`PortForward`](/cua-sdk/reference/services#portforward), [`presence_color`](/cua-sdk/reference/spaces/streams#presence_color), [`presence_conformance_json`](/cua-sdk/reference/spaces/streams#presence_conformance_json), [`presence_cursor_art`](/cua-sdk/reference/spaces/streams#presence_cursor_art), [`presence_cursor_art_all`](/cua-sdk/reference/spaces/streams#presence_cursor_art_all), [`presence_cursor_art_svg`](/cua-sdk/reference/spaces/streams#presence_cursor_art_svg), [`presence_now_ms`](/cua-sdk/reference/spaces/streams#presence_now_ms), [`presence_text_color`](/cua-sdk/reference/spaces/streams#presence_text_color), [`PresenceCursor`](/cua-sdk/reference/spaces/streams#presencecursor-record), [`PresenceDrawable`](/cua-sdk/reference/spaces/streams#presencedrawable-record), [`PresenceEvent`](/cua-sdk/reference/spaces/streams#presenceevent-record), [`PresenceIdentity`](/cua-sdk/reference/spaces/streams#presenceidentity-record), [`PresenceMember`](/cua-sdk/reference/spaces/streams#presencemember-record), [`PresenceParticipant`](/cua-sdk/reference/spaces/streams#presenceparticipant-record), [`PresencePoint`](/cua-sdk/reference/spaces/streams#presencepoint-record), [`PresenceView`](/cua-sdk/reference/spaces/streams#presenceview), [`PublicUrl`](/cua-sdk/reference/services#publicurl-record), [`qualify_sandbox_ref`](/cua-sdk/reference/sandbox#qualify_sandbox_ref), [`ReadinessProbe`](/cua-sdk/reference/image#readinessprobe-record), [`RegistrySecret`](/cua-sdk/reference/image#registrysecret-enum), [`Relay`](/cua-sdk/reference/spaces/host#relay), [`RelayAuditEvent`](/cua-sdk/reference/spaces/host#relayauditevent-record), [`RelayClientInfo`](/cua-sdk/reference/spaces/host#relayclientinfo-record), [`RelayDevice`](/cua-sdk/reference/spaces/host#relaydevice-record), [`RelayMachine`](/cua-sdk/reference/spaces/host#relaymachine-record), [`ReplayMode`](/cua-sdk/reference/spacesd#replaymode-enum), [`resolve_image`](/cua-sdk/reference/image#resolve_image), [`resolve_image_with_secret`](/cua-sdk/reference/image#resolve_image_with_secret), [`ResolvedImage`](/cua-sdk/reference/image#resolvedimage-record), [`RoutineInfo`](/cua-sdk/reference/spaces/persistent-agents#routineinfo-record), [`RuntimeCheck`](/cua-sdk/reference/cua#runtimecheck-record), [`RuntimeCheckStatus`](/cua-sdk/reference/cua#runtimecheckstatus-enum), [`Sandbox`](/cua-sdk/reference/sandbox#sandbox), [`sandbox_locations`](/cua-sdk/reference/sandbox#sandbox_locations), [`SandboxCreateOptions`](/cua-sdk/reference/image#sandboxcreateoptions-record), [`Sandboxes`](/cua-sdk/reference/sandbox#sandboxes), [`SandboxInfo`](/cua-sdk/reference/sandbox#sandboxinfo-record), [`SandboxListing`](/cua-sdk/reference/sandbox#sandboxlisting-record), [`SandboxPhase`](/cua-sdk/reference/sandbox#sandboxphase-enum), [`SandboxRefParts`](/cua-sdk/reference/sandbox#sandboxrefparts-record), [`SandboxSpec`](/cua-sdk/reference/fleet#sandboxspec-record), [`SandboxStatus`](/cua-sdk/reference/sandbox#sandboxstatus-enum), [`Service`](/cua-sdk/reference/services#service), [`ServiceEndpoint`](/cua-sdk/reference/services#serviceendpoint-record), [`SetupStep`](/cua-sdk/reference/cua#setupstep-record), [`SiteLoginOptions`](/cua-sdk/reference/spaces/space#siteloginoptions-record), [`SiteLoginReport`](/cua-sdk/reference/spaces/space#siteloginreport-record), [`Space`](/cua-sdk/reference/spaces/space#space), [`SpaceAgentOptions`](/cua-sdk/reference/spaces#spaceagentoptions-record), [`SpaceAppIcon`](/cua-sdk/reference/spaces/space#spaceappicon-record), [`SpaceAppIconRequest`](/cua-sdk/reference/spaces/space#spaceappiconrequest-record), [`SpaceBashResult`](/cua-sdk/reference/spaces/space#spacebashresult-record), [`SpaceCancelOutcome`](/cua-sdk/reference/spaces#spacecanceloutcome-record), [`SpaceCreateListener`](/cua-sdk/reference/spaces#spacecreatelistener), [`SpaceCreateOptions`](/cua-sdk/reference/spaces#spacecreateoptions-record), [`SpaceCreateProgress`](/cua-sdk/reference/spaces#spacecreateprogress-record), [`SpaceCreateResult`](/cua-sdk/reference/spaces#spacecreateresult-record), [`SpaceDisplay`](/cua-sdk/reference/spaces/space#spacedisplay-record), [`SpaceHotspotStatus`](/cua-sdk/reference/spaces/space#spacehotspotstatus-record), [`SpaceInfo`](/cua-sdk/reference/spaces#spaceinfo-record), [`SpacePowerReport`](/cua-sdk/reference/spaces#spacepowerreport-record), [`SpacePresence`](/cua-sdk/reference/spaces/streams#spacepresence), [`SpaceRelayRegistration`](/cua-sdk/reference/spaces/space#spacerelayregistration-record), [`Spaces`](/cua-sdk/reference/spaces#spaces), [`spaces_tool_methods`](/cua-sdk/reference/spaces#spaces_tool_methods), [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient), [`SpacesdHttpHeader`](/cua-sdk/reference/spacesd#spacesdhttpheader-record), [`SpacesdHttpRequest`](/cua-sdk/reference/spacesd#spacesdhttprequest-record), [`SpacesdHttpResponse`](/cua-sdk/reference/spacesd#spacesdhttpresponse-record), [`SpacesdProcess`](/cua-sdk/reference/spacesd#spacesdprocess), [`SpaceSendFileOptions`](/cua-sdk/reference/spaces/space#spacesendfileoptions-record), [`SpaceSendFileReport`](/cua-sdk/reference/spaces/space#spacesendfilereport-record), [`SpaceSentFile`](/cua-sdk/reference/spaces/space#spacesentfile-record), [`SpaceShareEntry`](/cua-sdk/reference/spaces/space#spaceshareentry-record), [`SpaceShares`](/cua-sdk/reference/spaces/space#spaceshares-record), [`SpacesHost`](/cua-sdk/reference/spaces/space#spaceshost-record), [`SpacesHostLimit`](/cua-sdk/reference/spaces/space#spaceshostlimit-record), [`SpacesToolMethod`](/cua-sdk/reference/spaces#spacestoolmethod-record), [`SpaceStreamOptions`](/cua-sdk/reference/spaces/streams#spacestreamoptions-record), [`SpaceStreamSession`](/cua-sdk/reference/spaces/streams#spacestreamsession), [`SpaceStreamStats`](/cua-sdk/reference/spaces/streams#spacestreamstats-record), [`SpaceStreamTicket`](/cua-sdk/reference/spaces/streams#spacestreamticket-record), [`SpaceToolInfo`](/cua-sdk/reference/spaces/space#spacetoolinfo-record), [`SpaceToolResult`](/cua-sdk/reference/spaces/space#spacetoolresult-record), [`SpaceTransferReport`](/cua-sdk/reference/spaces/space#spacetransferreport-record), [`SpaceUsage`](/cua-sdk/reference/spaces/space#spaceusage-record), [`SpaceWindow`](/cua-sdk/reference/spaces/space#spacewindow-record), [`SpaceWriteReport`](/cua-sdk/reference/spaces/space#spacewritereport-record), [`StorageVolume`](/cua-sdk/reference/cua#storagevolume-record), [`StreamStatsReport`](/cua-sdk/reference/auth#streamstatsreport-record), [`telemetry_acknowledge_notice`](/cua-sdk/reference/auth#telemetry_acknowledge_notice), [`telemetry_flush`](/cua-sdk/reference/auth#telemetry_flush), [`telemetry_notice_text`](/cua-sdk/reference/auth#telemetry_notice_text), [`telemetry_record_bench_run`](/cua-sdk/reference/auth#telemetry_record_bench_run), [`telemetry_record_feature`](/cua-sdk/reference/auth#telemetry_record_feature), [`telemetry_record_onboarding_step`](/cua-sdk/reference/auth#telemetry_record_onboarding_step), [`telemetry_record_stream_stats`](/cua-sdk/reference/auth#telemetry_record_stream_stats), [`telemetry_reset_id`](/cua-sdk/reference/auth#telemetry_reset_id), [`telemetry_schema_json`](/cua-sdk/reference/auth#telemetry_schema_json), [`telemetry_set_enabled`](/cua-sdk/reference/auth#telemetry_set_enabled), [`telemetry_set_surface`](/cua-sdk/reference/auth#telemetry_set_surface), [`telemetry_show_last`](/cua-sdk/reference/auth#telemetry_show_last), [`telemetry_status`](/cua-sdk/reference/auth#telemetry_status), [`telemetry_use_app_notice`](/cua-sdk/reference/auth#telemetry_use_app_notice), [`TelemetryStatus`](/cua-sdk/reference/auth#telemetrystatus-record), [`TeleportApprover`](/cua-sdk/reference/spaces/space#teleportapprover), [`TeleportDecision`](/cua-sdk/reference/spaces/space#teleportdecision-record), [`TeleportItem`](/cua-sdk/reference/spaces/space#teleportitem-record), [`TeleportManifest`](/cua-sdk/reference/spaces/space#teleportmanifest-record), [`TeleportReceipt`](/cua-sdk/reference/spaces/space#teleportreceipt-record), [`VideoFrame`](/cua-sdk/reference/spacesd/computer#videoframe-record), [`ViewerLink`](/cua-sdk/reference/sandbox#viewerlink-record), [`ViewerOptions`](/cua-sdk/reference/sandbox#vieweroptions-record).## Typesdiff --git a/docs/content/docs/cua-sdk/reference/rust/cua-spaces-agents-mcp.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-spaces-agents-mcp.mdxdeleted file mode 100644index 8a956aa7a0..0000000000--- a/docs/content/docs/cua-sdk/reference/rust/cua-spaces-agents-mcp.mdx+++ /dev/null@@ -1,301 +0,0 @@-----title: "cua-spaces: agents and MCP"-description: "Agents in Spaces and the Spaces MCP server (stdio and HTTP)."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-rust- Source: rustdoc JSON (nightly-2026-09-20, format 61) of cua-spaces- Version: 0.5.0-*/}--Part of the public API of the `cua-spaces` crate (`cua_spaces`): agents and MCP. Summaries and declarations only (`cargo doc -p cua-spaces --open` in `libs/cua` has the full comments); see [Rust crates](/cua-sdk/reference/rust) for stability.--More of this crate: [registry and primitives](/cua-sdk/reference/rust/cua-spaces), [client](/cua-sdk/reference/rust/cua-spaces-client).--## Modules--- `agents`: Coding agents inside a Space: `cua_agents` over the ...-- `agents::keys`: Provider keys for agent runs, kept on this machine (Cua ...-- `agents::telemetry`: Agent-run telemetry: the host install that starts a run ...-- `mcp`: The Spaces MCP server: the contract's tools over ...-- `mcp::codes`: JSON-RPC error codes.-- `mcp::http`: MCP streamable HTTP: `POST /mcp` with a JSON-RPC body ...-- `mcp::stdio`: MCP over stdio: newline-delimited JSON-RPC.--## Types--### `agents::CapabilitiesReport`--`agent_capabilities`.--```rust-pub struct CapabilitiesReport {- pub protocol: &'static str,- pub statuses: Vec<&'static str>,- pub event_kinds: &'static [&'static str],- pub harnesses: Vec<HarnessInfo>,- pub forwardable_env: Vec<&'static str>,- pub runner: &'static str,-}-```--### `agents::keys::AgentKeys`--The stored agent keys of one credential store.--```rust-pub struct AgentKeys { /* private fields */ }-impl AgentKeys {- fn new(store: Store) -> Self;- fn unavailable(reason: &str) -> Self;- fn available(&self) -> bool;- fn list(&self) -> Result<Vec<KeyInfo>>;- fn report(&self) -> Result<KeysReport>;- fn set(&self, provider: &str, env: Option<&str>, value: &str) -> Result<KeyInfo>;- fn remove(&self, env: &str) -> Result<bool>;- fn names(&self) -> Vec<String>;- fn values(&self, names: &[&str]) -> BTreeMap<String, String>;-}-```--### `agents::keys::KeyInfo`--What the APIs answer about a stored key.--```rust-pub struct KeyInfo {- pub provider: String,- pub env: String,- pub last4: String,- pub added_ms: u64,-}-```--### `agents::keys::KeysReport`--`agent_keys.list`: the stored keys and whether this ...--```rust-pub struct KeysReport {- pub keys: Vec<KeyInfo>,- pub providers: Vec<Provider>,- pub available: bool,- pub unavailable: Option<String>,-}-```--### `agents::keys::Provider`--A provider with its own row in Settings.--```rust-pub struct Provider {- pub id: &'static str,- pub label: &'static str,- pub env: &'static str,-}-```--### `mcp::McpServer`--The server.--```rust-pub struct McpServer { /* private fields */ }-impl McpServer {- fn new(spaces: Spaces) -> Self;- fn remote(backend: Arc<dyn ToolBackend>) -> Self;- fn with_session_broker(self, broker: Arc<dyn SessionBroker>) -> Self;- fn with_client_info_hook(self, hook: ClientInfoHook) -> Self;- fn with_extension(self, extension: Arc<dyn ToolExtension>) -> Self;- fn with_filter(self, filter: ToolFilter) -> Self;- fn with_name(self, name: &'static str) -> Self;- fn with_instructions(self, instructions: &'static str) -> Self;- fn spaces(&self) -> Option<&Spaces>;- fn tools_list(&self) -> Value;- async fn call(&self, name: &str, arguments: Value) -> ToolOutcome;- async fn handle(&self, message: Value) -> Option<Value>;-}-```--### `mcp::ToolBackend`--Where contract tool calls go when the server does not ...--```rust-pub trait ToolBackend: Send + Sync {- async fn call(&self, tool: &str, arguments: Value) -> ToolOutcome;-}-```--### `mcp::ToolExtension`--Tools served next to the Spaces contract (the `cua` ...--```rust-pub trait ToolExtension: Send + Sync {- fn tools(&self) -> Vec<Value>;- async fn call(&self, tool: &str, arguments: Value) -> Option<ToolOutcome>;-}-```--### `mcp::ToolOutcome`--The result of one tool call, as MCP content.--```rust-pub struct ToolOutcome {- pub content: Vec<Value>,- pub structured: Option<Value>,- pub is_error: bool,- pub meta: Option<Value>,-}-impl ToolOutcome {- fn text(text: impl Into<String>) -> Self;- fn json<T: Serialize>(value: &T) -> Self;- fn error(e: &Error) -> Self;- fn error_message(kind: &str, message: impl Into<String>) -> Self;- fn first_text(&self) -> Option<&str>;- fn to_result(&self) -> Value;-}-```--## Functions--```rust-// mod agents-/// What every harness is, can and cannot ...-pub fn capabilities() -> CapabilitiesReport-/// Resolves `names` from this process's ...-pub fn env_from_host(names: &[String]) -> Result<(BTreeMap<String, String>, Vec<String>)>-/// `env_from_host` over the given saved ...-pub fn env_from_host_with(saved: &AgentKeys, names: &[String]) -> Result<(BTreeMap<String, String>, Vec<String>)>-/// The provider key variables a host may ...-pub fn forwardable_env() -> Vec<&'static str>-/// The first of `h`'s keys this server can ...-pub fn host_key(h: &Harness) -> Option<&'static str>-/// `host_key` given the names of the saved ...-pub fn host_key_with(h: &Harness, saved: &[String]) -> Option<&'static str>-/// The provider keys a run of `harness` ...-pub fn run_env(harness: &str, env: &BTreeMap<String, String>, env_from_host: &[String], custom_endpoint: bool) -> Result<(BTreeMap<String, String>, Vec<String>)>-/// `run_env` over the given saved keys.-pub fn run_env_with(saved: &AgentKeys, harness: &str, env: &BTreeMap<String, String>, env_from_host: &[String], custom_endpoint: bool) -> Result<(BTreeMap<String, String>, Vec<String>)>-/// The run options of an `agent_start` ...-pub fn start_options(a: &AgentStart) -> Result<(RunOptions, Vec<String>)>-/// `start_options` over the given saved ...-pub fn start_options_with(saved: &AgentKeys, a: &AgentStart) -> Result<(RunOptions, Vec<String>)>--// mod agents::keys-/// Runs one of `APP_METHODS` against ...-pub fn app_call(keys: &AgentKeys, name: &str, args: Value) -> Option<Result<KeysReport>>-/// `app_call` on this process's keys as a ...-pub fn app_tool(name: &str, args: Value) -> Option<ToolOutcome>-/// This process's agent keys: the default ...-pub fn global() -> &'static AgentKeys-/// Whether `name` is one of `APP_METHODS`.-pub fn is_app_method(name: &str) -> bool-/// The provider id for a variable: its ...-pub fn provider_of(env: &str) -> &'static str-/// Checks a name for an Other key: an env ...-pub fn validate_name(name: &str) -> Result<()>--// mod agents::telemetry-/// Before stopping `run_id`: records an ...-pub async fn before_stop(agents: &Agents, run_id: &str)-/// The error variant of `e` (never its ...-pub fn error_variant(e: &Error) -> &'static str-/// A run's status was read: records its ...-pub fn observe(info: &RunInfo)-/// Starting a run failed.-pub fn start_failed(harness: &str, space: &str, entry: &str, e: &Error)-/// A run was started from `entry` in the ...-pub fn started(agents: &Agents, space: &str, entry: &str, s: &Started)-/// A run was stopped before its first turn ...-pub fn stopped(run_id: &str)-/// Follows `run_id` in the background ...-pub fn watch(agents: Agents, run_id: String)--// mod mcp-/// Runs a Space-scoped contract tool ...-pub async fn call_on(space: &Space, tool: &str, arguments: Value) -> ToolOutcome--// mod mcp::http-/// The `/mcp` router.-pub fn router(server: McpServer, bearer: Option<String>) -> Router-/// Serves `router` on `listener` until the ...-pub async fn serve(server: McpServer, listener: TcpListener, bearer: Option<String>) -> Result<()>--// mod mcp::stdio-/// Serves until `input` reaches EOF.-pub async fn serve<R, W>(server: McpServer, input: R, output: W) -> Result<()> where R: AsyncRead + Unpin, W: AsyncWrite + Unpin + Send + 'static-/// Serves on the process's stdin/stdout.-pub async fn serve_process_stdio(server: McpServer) -> Result<()>-```--## Constants--```rust-// mod agents-/// The extension operation `agent_start` ...-pub const WATCH_OP: &str = "agent_start.watch";--// mod agents::keys-/// The app's settings methods ...-pub const APP_METHODS: &[&str] = _;-/// Anthropic and OpenAI; anything else is ...-pub const PROVIDERS: &[Provider] = _;-/// The store's secret name.-pub const SECRET_NAME: &str = "agent-keys";--// mod agents::telemetry-/// How long a watcher follows a run before ...-pub const WATCH_FOR: Duration = _;--// mod mcp-/// Server instructions sent in ...-pub const INSTRUCTIONS: &str = /* ... */;-/// Server name in `initialize`.-pub const SERVER_NAME: &str = "cua-spaces";-/// Server version in `initialize`.-pub const SERVER_VERSION: &str = "0.1.0";-/// Tools `call_on` accepts.-pub const SPACE_SCOPED_TOOLS: &[&str] = _;-/// Protocol revisions this server accepts ...-pub const SUPPORTED_PROTOCOL_VERSIONS: [&str; 3] = _;--// mod mcp::codes-/// `tools/call` without a tool `name`.-pub const INVALID_PARAMS: i64 = -32602;-/// The message is not a JSON-RPC request ...-pub const INVALID_REQUEST: i64 = -32600;-/// An unknown method, or `tools/call` of a ...-pub const METHOD_NOT_FOUND: i64 = -32601;-/// The message is not valid JSON.-pub const PARSE_ERROR: i64 = -32700;--// mod mcp::http-/// Largest accepted request body (16 MiB).-pub const MAX_BODY_BYTES: usize = _;-/// Session header.-pub const SESSION_HEADER: &str = "mcp-session-id";--// mod mcp::stdio-/// Longest accepted message line (16 MiB).-pub const MAX_LINE_BYTES: usize = _;-```--## Type aliases--```rust-// mod mcp-/// See `McpServer::with_client_info_hook`.-pub type ClientInfoHook = Arc<dyn Fn(&Value) + Send + Sync>;-/// Which contract tools a server exposes ...-pub type ToolFilter = Arc<dyn Fn(&str) -> bool + Send + Sync>;-```--## Re-exports--`cua_agents::AgentEvent`, `cua_agents::Agents`, `cua_agents::Artifact`, `cua_agents::Attachment`, `cua_agents::Endpoint`, `cua_agents::EventPage`, `cua_agents::events`, `cua_agents::harness`, `cua_agents::installables`, `cua_agents::McpServer`, `cua_agents::quote`, `cua_agents::RunInfo`, `cua_agents::RunOptions`, `cua_agents::RunResult`, `cua_agents::runs`, `cua_agents::RunStatus`, `cua_agents::Started`, `cua_agents::transcript`, `cua_agents::Transcript`, `cua_agents::TranscriptItem`, `cua_agents::Wire`.diff --git a/docs/content/docs/cua-sdk/reference/rust/cua-spaces-client.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-spaces-client.mdxdeleted file mode 100644index 6b2a271412..0000000000--- a/docs/content/docs/cua-sdk/reference/rust/cua-spaces-client.mdx+++ /dev/null@@ -1,938 +0,0 @@-----title: "cua-spaces: client"-description: "The Spaces client: transports, model, control and teleport."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-rust- Source: rustdoc JSON (nightly-2026-09-20, format 61) of cua-spaces- Version: 0.5.0-*/}--Part of the public API of the `cua-spaces` crate (`cua_spaces`): client. Summaries and declarations only (`cargo doc -p cua-spaces --open` in `libs/cua` has the full comments); see [Rust crates](/cua-sdk/reference/rust) for stability.--More of this crate: [registry and primitives](/cua-sdk/reference/rust/cua-spaces), [agents and MCP](/cua-sdk/reference/rust/cua-spaces-agents-mcp).--## Modules--- `client`: The typed Spaces control-plane client, over any MCP ...-- `client::conformance`: `cua.control.session/1`; the cross-language ...-- `client::control`: The control plane: every advertised tool behind a typed ...-- `client::coverage`: Which typed call reaches each advertised tool.-- `client::error`: One flat error type.-- `client::framing`: The newline-delimited framer.-- `client::metadata`: The one place a run's application metadata is smuggled ...-- `client::model`: The control plane's value types.-- `client::persistent`: Persistent agents, routines, notifications and ...-- `client::teleport`: Session teleport: pushing a logged-in host app session ...-- `client::transport`: The MCP stdio transport, and the one seam where a ...--## Types--### `client::conformance::Node`--An ordered JSON value.--```rust-pub enum Node {- Null,- Bool(bool),- Int(i64),- Str(String),- Array(Vec<Node>),- Object(Vec<(String, Node)>),-}-impl Node {- fn object(entries: Vec<(&str, Node)>) -> Node;- fn string(value: impl Into<String>) -> Node;- fn optional_string(value: &Option<String>) -> Node;- fn optional_int(value: Option<i64>) -> Node;- fn optional_bool(value: Option<bool>) -> Node;- fn strings(values: &[String]) -> Node;- fn to_json(&self) -> String;-}-```--### `client::Connection`--A connection to a Spaces backend.--```rust-pub struct Connection { /* private fields */ }-impl Connection {- fn new(transport: Arc<dyn ToolTransport>) -> Self;- fn transport(&self) -> Arc<dyn ToolTransport>;- fn available_tools(&self) -> Result<Vec<String>>;- fn call_tool_raw(&self, tool: &str, arguments_json: &str) -> Result<String>;- fn spaces(&self) -> Result<Vec<SpaceInfo>>;- fn attach(self: &Arc<Self>, space_id: &str, require_ready: bool) -> Result<Space>;- fn create_space(self: &Arc<Self>, options: CreateSpaceOptions) -> Result<Space>;- fn delete_space(&self, space_id: &str) -> Result<()>;- fn add_space(&self, url: &str, token: Option<&str>, name: Option<&str>) -> Result<SpaceInfo>;- fn remove_space(&self, space_id: &str) -> Result<()>;- fn hotspot_start(&self, space_id: &str) -> Result<HotspotStatus>;- fn hotspot_stop(&self) -> Result<HotspotStatus>;- fn hotspot_status(&self) -> Result<HotspotStatus>;- fn volume_ls(&self, path: &str, as_agent: Option<&str>, in_space: Option<&str>) -> Result<Map<String, Value>>;- fn volume_read(&self, path: &str, version: Option<&str>, as_agent: Option<&str>, in_space: Option<&str>) -> Result<Map<String, Value>>;- fn volume_write(&self, path: &str, content: &str, encoding: Option<&str>, if_etag: Option<&str>, create_only: bool, as_agent: Option<&str>) -> Result<Map<String, Value>>;- fn volume_delete(&self, path: &str, if_etag: Option<&str>) -> Result<Map<String, Value>>;- fn volume_history(&self, path: &str) -> Result<Map<String, Value>>;- fn volume_restore(&self, path: &str, version: &str) -> Result<Map<String, Value>>;- fn volume_grant(&self, principal: &str, prefix: &str, mode: &str, expires_in_secs: Option<u64>) -> Result<Map<String, Value>>;- fn volume_revoke(&self, grant_id: &str) -> Result<Map<String, Value>>;- fn volume_grants(&self, all: bool) -> Result<Map<String, Value>>;- fn volume_request_access(&self, as_agent: &str, prefix: &str, mode: &str, reason: &str) -> Result<Map<String, Value>>;- fn volume_requests(&self) -> Result<Map<String, Value>>;- fn volume_approve(&self, request_id: &str) -> Result<Map<String, Value>>;- fn volume_deny(&self, request_id: &str) -> Result<Map<String, Value>>;- fn volume_audit(&self, limit: u32) -> Result<Map<String, Value>>;- fn volume_storage(&self) -> Result<Map<String, Value>>;- fn volume_storage_set(&self, update: Value) -> Result<Map<String, Value>>;- fn volume_mount_status(&self) -> Result<Map<String, Value>>;- fn volume_mount(&self) -> Result<Map<String, Value>>;- fn volume_unmount(&self) -> Result<Map<String, Value>>;- fn volume_sync_status(&self) -> Result<Map<String, Value>>;- fn volume_sync_events(&self, since_seq: u64, wait_ms: u32) -> Result<Map<String, Value>>;- fn volume_sync_resolve(&self, path: &str) -> Result<Map<String, Value>>;- fn volume_cache_stats(&self) -> Result<Map<String, Value>>;- fn volume_cache_set(&self, capacity_bytes: u64) -> Result<Map<String, Value>>;- fn volume_cache_clear(&self) -> Result<Map<String, Value>>;- fn cloud_status(&self, provider: Option<&str>) -> Result<Map<String, Value>>;- fn cloud_connect(&self, target: Value, make_default: bool, ttl_hours: Option<u32>) -> Result<Map<String, Value>>;- fn cloud_test(&self, target: Value) -> Result<Map<String, Value>>;- fn cloud_disconnect(&self, provider: &str) -> Result<Map<String, Value>>;- fn cloud_sweep(&self, provider: Option<&str>, dry_run: bool, all: bool) -> Result<Map<String, Value>>;- fn create_persistent_agent(&self, name: &str, harness: &str, space_id: &str, model: Option<&str>, base_url: Option<&str>, env_from_host: &[String]) -> Result<Record>;- fn persistent_agents(&self) -> Result<Vec<Record>>;- fn remove_persistent_agent(&self, name: &str) -> Result<Record>;- fn send_to_persistent_agent(&self, name: &str, text: &str) -> Result<Record>;- fn save_agent_home(&self, name: &str) -> Result<Record>;- fn pause_agent(&self, name: &str) -> Result<Record>;- fn resume_agent(&self, name: &str, prompt: Option<&str>) -> Result<Record>;- fn add_routine(&self, agent: &str, title: &str, prompt: &str, schedule: &RoutineSchedule) -> Result<Record>;- fn routines(&self, agent: Option<&str>) -> Result<Vec<Record>>;- fn remove_routine(&self, id: &str) -> Result<()>;- fn set_routine_enabled(&self, id: &str, enabled: bool) -> Result<Record>;- fn notify_user(&self, title: &str, body: &str) -> Result<String>;- fn notifications(&self, unread_only: bool) -> Result<Vec<Record>>;- fn mark_notifications_read(&self, ids: &[String]) -> Result<u64>;- fn allow_computer(&self, agent: &str, machine: &str) -> Result<Record>;- fn revoke_computer(&self, agent: &str, machine: Option<&str>) -> Result<u64>;- fn computer_access(&self, agent: Option<&str>) -> Result<Vec<Record>>;-}-```--### `client::coverage::ToolCoverage`--One row of the coverage table.--```rust-pub struct ToolCoverage {- pub tool: String,- pub sdk_symbol: String,- pub providers: Vec<String>,- pub metering: String,-}-```--### `client::InProcessTransport`--The typed client driving the Rust MCP server ...--```rust-pub struct InProcessTransport { /* private fields */ }-impl InProcessTransport {- fn new(server: McpServer, runtime: Handle) -> Self;-}-```--### `client::LineFramer`--```rust-pub struct LineFramer { /* private fields */ }-impl LineFramer {- fn new(maximum_frame_bytes: usize) -> Self;- fn maximum_frame_bytes(&self) -> usize;- fn buffered_byte_count(&self) -> usize;- fn append(&mut self, chunk: &[u8]);- fn take_frame(&mut self) -> Result<Option<Vec<u8>>>;- fn take_frames(&mut self) -> Result<Vec<Vec<u8>>>;-}-```--### `client::model::Admission`--```rust-pub struct Admission {- pub accepted: Vec<TransferCandidate>,- pub rejected: Vec<Rejection>,-}-```--### `client::model::AgentEvent`--Agent output as typed events.--```rust-pub struct AgentEvent {- pub run_id: String,- pub line_index: u32,- pub kind: AgentEventKind,- pub text: String,- pub state: Option<AgentState>,- pub exit_code: Option<i32>,- pub is_inferred: bool,-}-```--### `client::model::AgentEventKind`--```rust-pub enum AgentEventKind {- Text,- StateChanged,- Finished,- Raw,- ToolUse,- Artifact,- Question,-}-impl AgentEventKind {- fn as_str(self) -> &'static str;- fn is_inferred_only(self) -> bool;-}-```--### `client::model::AgentKindInfo`--Which agent harness to start, and whether it is real.--```rust-pub struct AgentKindInfo {- pub id: String,- pub is_production_ready: bool,-}-```--### `client::model::AgentRunHandle`--The handle `start_agent` returns.--```rust-pub struct AgentRunHandle {- pub id: String,- pub space: String,- pub agent: String,- pub turn_model: TurnModel,- pub notes: Vec<String>,- pub approvals_are_enforced: bool,-}-impl AgentRunHandle {- fn directory(&self) -> String;-}-```--### `client::model::AgentStartRequest`--What to start.--```rust-pub struct AgentStartRequest {- pub agent: String,- pub prompt: String,- pub metadata: Vec<MetadataEntry>,- pub shows_window: bool,- pub timeout_seconds: Option<u32>,-}-```--### `client::model::AgentState`--The status vocabulary the Spaces agent harness ...--```rust-pub enum AgentState {- Running,- AwaitingInput,- Idle,- Finished,- Failed,- Crashed,- Unknown,-}-impl AgentState {- fn from_wire(wire: Option<&str>) -> Self;- fn as_str(self) -> &'static str;- fn is_live(self) -> bool;- fn has_ended(self) -> bool;-}-```--### `client::model::CreateSpaceOptions`--Options for `crate::client::Connection::create_space` ...--```rust-pub struct CreateSpaceOptions {- pub image: Option<String>,- pub on: Option<String>,- pub kind: Option<String>,- pub runtime: Option<String>,- pub name: Option<String>,- pub reuse: bool,- pub wait: Option<bool>,-}-```--### `client::model::Delivery`--The result of a send, with **one** shape and a ...--```rust-pub struct Delivery {- pub run_id: String,- pub accepted: bool,- pub reason: String,- pub state_at_refusal: Option<AgentState>,- pub queued_for_ms: Option<u64>,-}-impl Delivery {- fn decode(row: &Map<String, Value>, run_id: &str, queued_for_ms: Option<u64>) -> Self;- fn required(self) -> Result<Delivery>;-}-```--### `client::model::DeliveryMode`--How a message should be delivered to a run that may be ...--```rust-pub enum DeliveryMode {- RefuseIfBusy,- AbandonCurrentTurn,- QueueUntilIdle,-}-```--### `client::model::HarnessCapabilities`--What the server says about its agent harnesses.--```rust-pub struct HarnessCapabilities {- pub statuses: Vec<String>,- pub harnesses: Vec<AgentKindInfo>,- pub status_classifier: String,-}-impl HarnessCapabilities {- fn decode(row: &Map<String, Value>) -> Self;-}-```--### `client::model::HotspotStatus`--Whether this Mac is sharing its network, and with which ...--```rust-pub struct HotspotStatus {- pub is_sharing: bool,- pub space: Option<String>,- pub detail: String,-}-impl HotspotStatus {- fn decode(row: &Map<String, Value>) -> Self;-}-```--### `client::model::MetadataEntry`--A metadata key/value.--```rust-pub struct MetadataEntry {- pub key: String,- pub value: String,-}-```--### `client::model::ProviderCapabilities`--What a provider can actually do, declared rather than ...--```rust-pub struct ProviderCapabilities {- pub provider: String,- pub agents: bool,- pub window_list: bool,- pub upload: bool,- pub download: bool,- pub rcdp_streaming: bool,- pub teleport: bool,- pub provisioning: bool,- pub server_backstop: bool,- pub notes: Vec<String>,-}-```--### `client::model::Rejection`--```rust-pub struct Rejection {- pub candidate: TransferCandidate,- pub violation: String,-}-```--### `client::model::RemoteFile`--A file that now exists inside the Space, at the path ...--```rust-pub struct RemoteFile {- pub path: String,- pub name: String,- pub byte_count: Option<u64>,-}-```--### `client::model::RunSnapshot`--**One** state type, returned in full by every call that ...--```rust-pub struct RunSnapshot {- pub id: String,- pub space: String,- pub agent: String,- pub state: AgentState,- pub reason: String,- pub accepts_message: bool,- pub exit_code: Option<i32>,- pub summary: String,- pub output_tail: Option<String>,- pub output_truncated: bool,- pub created_at_ms: Option<i64>,- pub reason_is_carried_forward: bool,- pub raw_prompt: Option<String>,-}-impl RunSnapshot {- fn decode(row: &Map<String, Value>, run_id: &str, space: &str, requested_tail: Option<u32>, previous: Option<&RunSnapshot>) -> Self;- fn differs_visibly(&self, other: &RunSnapshot) -> bool;-}-```--### `client::model::SchedulerFacts`--What the core can honestly say about recurring work.--```rust-pub struct SchedulerFacts {- pub is_server_backed: bool,- pub missed_slot_policy: String,-}-```--### `client::model::ServiceCatalog`--```rust-pub struct ServiceCatalog {- pub service: String,- pub tools: Vec<SpaceTool>,- pub other_services: Vec<String>,- pub instructions: Option<String>,- pub not_ready_warning: Option<String>,-}-impl ServiceCatalog {- fn is_empty_but_reachable(&self) -> bool;-}-```--### `client::model::SpaceInfo`--A Space as the account sees it.--```rust-pub struct SpaceInfo {- pub id: String,- pub provider: SpaceProvider,- pub operating_system: String,- pub state: SpaceState,- pub raw_phase: String,- pub ip_address: Option<String>,-}-impl SpaceInfo {- fn from_row(row: &Map<String, Value>) -> Self;- fn is_ready(&self) -> bool;- fn capabilities(&self) -> ProviderCapabilities;-}-```--### `client::model::SpaceProvider`--Which kind of Space this is.--```rust-pub enum SpaceProvider {- Local,- Fleet,- Direct,- Demo,- Unknown,-}-impl SpaceProvider {- fn from_raw(raw: &str) -> Self;- fn as_str(self) -> &'static str;- fn home(self) -> &'static str;- fn default_upload_directory(self) -> String;- fn capabilities(self) -> ProviderCapabilities;-}-```--### `client::model::SpaceState`--One normalised readiness vocabulary.--```rust-pub enum SpaceState {- Ready,- Starting,- Stopped,- Failed,- Unknown,-}-impl SpaceState {- fn from_phase(phase: &str) -> Self;- fn is_ready(self) -> bool;- fn as_str(self) -> &'static str;-}-```--### `client::model::SpaceTool`--```rust-pub struct SpaceTool {- pub service: String,- pub name: String,- pub summary: String,- pub input_schema_json: String,-}-```--### `client::model::SpaceWindow`--A window inside a Space, and the rcdp target that ...--```rust-pub struct SpaceWindow {- pub id: String,- pub app: String,- pub title: String,- pub width_px: u32,- pub height_px: u32,- pub scale_factor_hundredths: u32,- pub visible: bool,- pub process_id: Option<i32>,-}-impl SpaceWindow {- fn from_row(row: &Map<String, Value>) -> Self;- fn looks_like_rcdp_target(&self) -> bool;-}-```--### `client::model::StopOutcome`--The result of a stop, which **verifies** rather than ...--```rust-pub struct StopOutcome {- pub stopped: bool,- pub alive: Option<bool>,- pub reason: String,-}-impl StopOutcome {- fn decode(row: &Map<String, Value>) -> Self;-}-```--### `client::model::StreamEndpoint`--Where an in-product stream connects.--```rust-pub struct StreamEndpoint {- pub host: String,- pub port: u16,- pub driver_port: u16,- pub token: String,-}-impl StreamEndpoint {- fn from_row(row: &Map<String, Value>, fallback_host: Option<&str>) -> Self;-}-```--### `client::model::ToolContentPart`--A content part returned by an in-Space tool. cua-driver ...--```rust-pub struct ToolContentPart {- pub kind: String,- pub text: String,- pub data_base64: String,- pub mime_type: String,-}-```--### `client::model::TransferCandidate`--```rust-pub struct TransferCandidate {- pub name: String,- pub byte_count: u64,-}-```--### `client::model::TransferLimits`--Caller-declared transfer limits, checked before any I/O.--```rust-pub struct TransferLimits {- pub max_file_count: u32,- pub max_bytes_per_file: u64,- pub max_bytes_per_batch: u64,- pub is_server_published: bool,-}-impl TransferLimits {- fn conservative_default() -> Self;- fn unlimited() -> Self;- fn admit(&self, candidates: &[TransferCandidate]) -> Admission;- fn check(&self, candidates: &[TransferCandidate]) -> Result<()>;-}-```--### `client::model::TurnModel`--What the harness published about how a run takes turns ...--```rust-pub struct TurnModel {- pub kind: String,- pub accepts_follow_ups: bool,-}-impl TurnModel {- fn from_row(row: &Map<String, Value>) -> Self;-}-```--### `client::model::UploadPlacement`--```rust-pub struct UploadPlacement {- pub kind: UploadPlacementKind,- pub path: String,-}-impl UploadPlacement {- fn collision_safe_default() -> Self;-}-```--### `client::model::UploadPlacementKind`--Where an upload should land.--```rust-pub enum UploadPlacementKind {- ExactPath,- CollisionSafe,- Clobbering,-}-```--### `client::persistent::RoutineSchedule`--When a routine fires.--```rust-pub enum RoutineSchedule {- EveryMinutes(i64),- DailyAt(String),- WeeklyOn(String),-}-```--### `client::ScriptedTransport`--An in-process backend driven by a JSON script, so the ...--```rust-pub struct ScriptedTransport { /* private fields */ }-impl ScriptedTransport {- const SCRIPT_SCHEMA: &'static str = "cua.control.script/1";;- fn from_script(script_json: &str) -> Result<Self>;- fn calls(&self) -> Vec<(String, Value)>;- fn call_count(&self) -> usize;-}-```--### `client::Space`--A handle on one Space.--```rust-pub struct Space {- pub info: SpaceInfo,-}-impl Space {- fn id(&self) -> &str;- fn provider(&self) -> SpaceProvider;- fn capabilities(&self) -> ProviderCapabilities;- fn home(&self) -> &'static str;- fn connection(&self) -> Arc<Connection>;- fn delete(&self) -> Result<()>;- fn stop(&self) -> Result<Map<String, Value>>;- fn start(&self) -> Result<Map<String, Value>>;- fn share_with(&self, who: &str, role: &str) -> Result<Map<String, Value>>;- fn unshare(&self, who: Option<&str>) -> Result<Map<String, Value>>;- fn shares(&self) -> Result<Map<String, Value>>;- fn relay_register(&self) -> Result<Map<String, Value>>;- fn relay_unregister(&self) -> Result<Map<String, Value>>;- fn bash(&self, command: &str) -> Result<String>;- fn write_text(&self, text: &str, path: &str) -> Result<RemoteFile>;- fn upload(&self, local_path: &str, placement: &UploadPlacement, byte_count: Option<u64>) -> Result<RemoteFile>;- fn send_file(&self, local_path: &str, target_directory: Option<String>, respect_ignorefiles: Option<bool>) -> Result<String>;- fn download(&self, remote_path: &str, into_directory: Option<String>) -> Result<String>;- fn windows(&self) -> Result<Vec<SpaceWindow>>;- fn window_of_process(&self, process_id: i32) -> Result<Option<SpaceWindow>>;- fn stream_endpoint(&self, force_refresh: bool) -> Result<StreamEndpoint>;- fn stream_window_to_operator_desktop(&self, window_id: &str) -> Result<()>;- fn pin_picture_in_picture_on_operator_desktop(&self) -> Result<()>;- fn unpin_picture_in_picture_from_operator_desktop(&self) -> Result<()>;- fn open_viewer_on_operator_desktop(&self) -> Result<()>;- fn service_catalog(&self, service: Option<String>, matching: Option<String>) -> Result<ServiceCatalog>;- fn services(&self) -> Result<Vec<String>>;- fn call_service_tool(&self, tool: &str, service: Option<String>, arguments_json: &str) -> Result<Vec<ToolContentPart>>;- fn start_agent(&self, request: &AgentStartRequest) -> Result<AgentRunHandle>;- fn run_status(&self, run_id: &str, tail: u32) -> Result<RunSnapshot>;- fn runs(&self) -> Result<Vec<RunSnapshot>>;- fn send_message(&self, run_id: &str, text: &str, mode: DeliveryMode, queue_timeout_ms: Option<u64>) -> Result<Delivery>;- fn stop_run(&self, run_id: &str) -> Result<StopOutcome>;- fn events_after(&self, run_id: &str, cursor: u64, max: u32) -> Result<Map<String, Value>>;- fn interrupt_run(&self, run_id: &str) -> Result<bool>;- fn harness_capabilities(&self) -> Result<HarnessCapabilities>;- fn run_events(&self, run_id: &str, tail: u32) -> Result<Vec<AgentEvent>>;- fn approve_run(&self, _run_id: &str, _decision: &str) -> Result<()>;- fn teleport_manifest(&self, app: &str, scope: TeleportScope) -> Result<TeleportManifest>;- fn teleport_send(&self, approval: &Approval) -> Result<TeleportReceipt>;-}-```--### `client::SpacesError`--Everything that can go wrong, on the language's error ...--```rust-pub enum SpacesError {- TransportUnavailable(String),- TransportFraming(String),- ToolFailed { tool: String, message: String },- RpcFailed { method: String, code: i64, message: String },- MalformedResponse { tool: String, detail: String },- UnsupportedByProvider { tool: String, provider: String, detail: String },- SpaceUnavailable(String, String),- RunNotFound(String),- LimitExceeded(String),- WouldProvision(String),- LocalFileUnavailable(String),- TimedOut { waiting_for: String, after_ms: u64 },- NotImplementedYet(String),- TeleportRefused(String),-}-impl SpacesError {- fn tag(&self) -> &'static str;-}-```--### `client::teleport::Approval`--Proof a human agreed, and to what.--```rust-pub struct Approval { /* private fields */ }-impl Approval {- fn app(&self) -> &str;- fn scope(&self) -> TeleportScope;- fn space(&self) -> &str;- fn approved_bytes(&self) -> u64;- fn approved_paths(&self) -> Vec<String>;- fn uses_server_default(&self) -> bool;-}-```--### `client::teleport::TeleportItem`--One transferable item in an app's manifest.--```rust-pub struct TeleportItem {- pub relative_path: String,- pub label: String,- pub estimated_bytes: u64,- pub is_sensitive: bool,- pub is_checked_by_default: bool,- pub count: Option<u32>,- pub count_noun: Option<String>,- pub explanation: String,-}-impl TeleportItem {- fn from_row(row: &Map<String, Value>) -> Self;-}-```--### `client::teleport::TeleportManifest`--Exactly what would leave this machine, before anything ...--```rust-pub struct TeleportManifest {- pub app: String,- pub display_name: String,- pub scope: TeleportScope,- pub server_scope: String,- pub items: Vec<TeleportItem>,- pub total_estimated_bytes: u64,- pub notes: Vec<String>,-}-impl TeleportManifest {- fn decode(app: &str, scope: TeleportScope, payload: &Value) -> Self;- fn sensitive_items(&self) -> Vec<TeleportItem>;- fn default_selection(&self) -> Vec<TeleportItem>;- fn login_only_selection(&self) -> Vec<TeleportItem>;- fn approving(&self, space_id: &str, relative_paths: &[String], acknowledging_sensitive_items: bool) -> Result<Approval>;- fn approving_server_default(&self, space_id: &str, acknowledging_sensitive_items: bool) -> Result<Approval>;-}-```--### `client::teleport::TeleportReceipt`--What actually moved.--```rust-pub struct TeleportReceipt {- pub app: String,- pub space: String,- pub method: String,- pub transferred_paths: Vec<String>,- pub raw_result: String,-}-```--### `client::teleport::TeleportScope`--How much of an app's session to consider.--```rust-pub enum TeleportScope {- Full,- Tabs,-}-impl TeleportScope {- fn as_str(self) -> &'static str;-}-```--### `client::ToolTransport`--The one thing the control plane needs from a Spaces ...--```rust-pub trait ToolTransport: Send + Sync {- fn call_tool(&self, name: &str, arguments: &Value) -> Result<Value>;- fn available_tools(&self) -> Result<Vec<String>>;-}-```--## Functions--```rust-// mod client::conformance-/// Drive the whole typed control-plane ...-pub fn run_session(script_json: &str) -> Result<String>-/// The scripted backend the session runs ...-pub fn session_script() -> String--// mod client::coverage-/// The coverage table, in contract order ...-pub fn coverage() -> Vec<ToolCoverage>--// mod client::metadata-/// The metadata carried by a prompt echo ...-pub fn decode(text: &str) -> Vec<MetadataEntry>-/// The prompt as it should be sent.-pub fn encode(prompt: &str, metadata: &[MetadataEntry]) -> String-/// The text with the marker removed, for ...-pub fn strip(text: &str) -> String--// mod client::model-pub fn agent_kind(id: &str) -> AgentKindInfo-/// Split a snapshot into events, **without ...-pub fn events_from_snapshot(snapshot: &RunSnapshot) -> Vec<AgentEvent>-/// The provider half of a qualified Space ...-pub fn provider_prefix(space_id: &str) -> Option<&str>-pub fn scheduler_facts() -> SchedulerFacts-pub fn tool_content_parts(payload: &Value) -> Vec<ToolContentPart>--// mod client::transport-/// The **only** place `isError` is read ...-pub fn decode_tool_result(tool: &str, result: &Value) -> Result<Value>-/// The payload as an array, tolerating the ...-pub fn expect_array(payload: &Value, unwrapping: Option<&str>) -> Vec<Value>-/// The payload as an object, or a ...-pub fn expect_object(tool: &str, payload: &Value) -> Result<Map<String, Value>>-```--## Constants--```rust-// mod client-/// The version of this client.-pub const VERSION: &str = "0.1.0";--// mod client::conformance-pub const SESSION_SCHEMA: &str = "cua.control.session/1";--// mod client::framing-/// 64 MiB.-pub const DEFAULT_MAXIMUM_FRAME_BYTES: usize = _;--// mod client::metadata-pub const CLOSE_MARKER: &str = "-->";-/// Recognisable, greppable, and last: so ...-pub const OPEN_MARKER: &str = "<!--cua-spaces-meta:";--// mod client::model-/// `false` in every shipping backend.-pub const APPROVALS_ARE_ENFORCED: bool = false;-/// The two harnesses that are wired end to ...-pub const PRODUCTION_READY_AGENTS: [&str; 2] = _;-pub const SCHEDULER_IS_SERVER_BACKED: bool = false;--// mod client::transport-pub const CLIENT_NAME: &str = "cua-spaces-client";-/// The MCP revision the client announces.-pub const CLIENT_PROTOCOL_VERSION: &str = "2024-11-05";-pub const CLIENT_VERSION: &str = "0.1.0";-```--## Type aliases--```rust-// mod client-pub type Result<T> = Result<T, SpacesError>;--// mod client::persistent-/// One JSON record.-pub type Record = Map<String, Value>;-```diff --git a/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdx b/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdxdeleted file mode 100644index 95cdcd2b02..0000000000--- a/docs/content/docs/cua-sdk/reference/rust/cua-spaces.mdx+++ /dev/null@@ -1,2507 +0,0 @@-----title: "cua-spaces: registry and primitives"-description: "The Spaces registry and primitives (files, exec, streams, presence, services, teleport, hotspot, relay)."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-rust- Source: rustdoc JSON (nightly-2026-09-20, format 61) of cua-spaces- Version: 0.5.0-*/}--Public API of the `cua-spaces` crate (`cua_spaces`). Summaries and declarations only (`cargo doc -p cua-spaces --open` in `libs/cua` has the full comments); see [Rust crates](/cua-sdk/reference/rust) for stability.--Cua Spaces: interactive sandboxes on any image, and everything a person-or an agent does with one. cua-spacesd, when the image runs it, adds-the desktop, shell, files, streaming and teleport primitives.--More of this crate: [client](/cua-sdk/reference/rust/cua-spaces-client), [agents and MCP](/cua-sdk/reference/rust/cua-spaces-agents-mcp).--## Modules--- `app_icon`: App icons for a Space's windows, as the guest's own ...-- `audit`: A hash-chained audit log (the share audit).-- `cloud`: Spaces in your own cloud account: a cloud sandbox ...-- `creating`: Creates in flight: cancelling one, and finishing what a ...-- `error`: One error type for every Spaces call, with a stable ...-- `exec`: Shell and literal-file primitives over the spacesd's ...-- `extension`: Extension points for the capabilities that ship with ...-- `files`: Moving files between this host and a Space.-- `fleet_runtime`: The Fleet runtime ↔ image pairing for Spaces.-- `groups`: Group chats: one human and two to six Bots in one ...-- `host_spaces`: Spaces on your machines: a machine set up with cua ...-- `hotspot`: Hotspot: a Space borrows this machine's network.-- `id`: Space ids: the unified sandbox ref scheme (a Space is a ...-- `install_cache`: Pinned install archives, fetched once on this machine ...-- `mesh`: Relay Spaces over the WireGuard®-based mesh ...-- `operator`: Presenting a Space to the human: picture-in-picture ...-- `presence`: Presence: who is looking at a Space and where their ...-- `presence::art`: The shared presence cursor art (ass ...-- `presence::view`: The presence netcode model every client draws from ...-- `reattach`: Keeping a host-served link to a Space alive across ...-- `registry`: The persisted Spaces registry.-- `relay`: `relay:<machine-id>`: machines of the signed-in cua.ai ...-- `routines`: Routines: recurring tasks a Bot runs on a schedule.-- `routines::iso`: ISO 8601 in UTC with whole seconds, the portable form ...-- `routines::iso::option`-- `services`: Tools inside a Space, from two kinds of MCP service:-- `share`: Sharing a Space with other accounts, to watch or to ...-- `site_login`: The Keyvault seam and the whole `request_site_login` ...-- `stream`: Streams: targets, media tickets, and a Rust media ...-- `teleport_broker`: The Keyvault broker seam the `teleport_app` MCP tool ...-- `thumbnails`: Space thumbnails, cached once for every client on this ...-- `volume`: A volume mounted in a Space's guest, served from this ...-- `walk`: Host-side folder walks for transfers, optionally ...--## Types--### `app_icon::IconPlatform`--Which lookup a guest gets.--```rust-pub enum IconPlatform {- Macos,- Linux,-}-impl IconPlatform {- fn of(os: OsFamily) -> Option<IconPlatform>;-}-```--### `AppIcon`--An app icon, normalized by the icon cache.--```rust-pub struct AppIcon {- pub bytes: Vec<u8>,- pub bytes_1x: Vec<u8>,- pub content_type: &'static str,-}-```--### `audit::AuditLog`--An append-only, hash-chained log file.--```rust-pub struct AuditLog { /* private fields */ }-impl AuditLog {- fn new(path: impl Into<PathBuf>) -> AuditLog;- fn path(&self) -> &Path;- fn append(&self, principal: &str, action: &str, path: &str, detail: &str) -> Result<()>;- fn tail(&self, limit: usize) -> Result<(Vec<Event>, Result<(), String>)>;- fn verify(&self) -> Result<()>;-}-```--### `audit::Event`--The hashed part of a line (field order is the canonical ...--```rust-pub struct Event {- pub seq: u64,- pub ts_ms: u64,- pub principal: String,- pub action: String,- pub path: String,- pub detail: String,- pub prev: String,-}-```--### `CancelOutcome`--The result of `Spaces::cancel_create`.--```rust-pub struct CancelOutcome {- pub id: String,- pub state: CancelState,- pub message: String,-}-```--### `CancelState`--What `Spaces::cancel_create` found and did.--```rust-pub enum CancelState {- Cancelled,- NotCreating,- AlreadyCreated,-}-impl CancelState {- fn as_str(&self) -> &'static str;-}-```--### `creating::Made`--One thing a create made, recorded as soon as it exists.--```rust-pub enum Made {- LocalSandbox { name: String, fresh: bool },- FleetClaim { namespace: String, name: String },- RelayMachine { id: String },- HostSpace { host: String, machine: String },-}-```--### `Error`--Spaces errors.--```rust-pub enum Error {- InvalidArgument(String),- NotFound(String),- SpacesdNotAvailable { space: String, reason: String },- CapabilityMissing { space: String, feature: String, limitation: String },- HostCapabilityMissing { what: String, why: String },- WrongProvider { op: String, provider: String },- Transfer(String),- TeleportRefused(String),- LoginRefused(String),- Agent(String),- Timeout(String),- Stream(String),- Env(Error),- Fleet(Error),- Sandbox(Error),- Io(Error),- Json(Error),- Relay(Error),- Mcp(String),- LimitExceeded(String),- AmbiguousHost { query: String, choices: Vec<String>, message: String },- Extension { kind: &'static str, message: String },- Cancelled(String),-}-impl Error {- fn tag(&self) -> &'static str;- fn extension(kind: &str, message: impl Into<String>) -> Self;- fn needs_cua_spaces(what: &str) -> Self;- fn invalid(msg: impl Into<String>) -> Self;- fn host(what: &str, why: impl Into<String>) -> Self;-}-```--### `exec::BashOutput`--The result of `Space::bash`.--```rust-pub struct BashOutput {- pub stdout: String,- pub stderr: String,- pub exit_code: Option<i32>,- pub signal: Option<String>,- pub timed_out: bool,- pub error: Option<String>,-}-impl BashOutput {- fn success(&self) -> bool;- fn render(&self) -> String;-}-```--### `exec::WriteReport`--The result of `Space::write`.--```rust-pub struct WriteReport {- pub path: String,- pub bytes: u64,- pub sha256: String,-}-```--### `extension::SpacesExtension`--A capability served outside this crate.--```rust-pub trait SpacesExtension: Send + Sync + 'static {- fn name(&self) -> &str;- fn serves(&self, tool: &str) -> bool;- fn call_tool<'a>(&'a self, call: ToolCall<'a>) -> BoxFuture<'a, Result<ToolOutcome>>;- fn space_connected(&self, spaces: &Spaces, space: &str);- fn space_dropped<'a>(&'a self, spaces: &'a Spaces, space: &'a str) -> BoxFuture<'a, ()>;- fn as_any(&self) -> &dyn Any;-}-```--### `extension::ToolCall`--One tool call routed to an extension.--```rust-pub struct ToolCall<'a> {- pub spaces: &'a Spaces,- pub tool: &'a str,- pub args: Value,- pub broker: Option<&'a Arc<dyn SessionBroker>>,- pub pinned: Option<&'a Space>,-}-```--### `files::Conflict`--What happens when a sent file already exists in the ...--```rust-pub enum Conflict {- Overwrite,- Rename,- Skip,-}-```--### `files::DownloadReport`--The result of `Space::download`.--```rust-pub struct DownloadReport {- pub source: String,- pub dest: String,- pub kind: &'static str,- pub files: usize,- pub bytes: u64,- pub sha256: Option<String>,- pub verified: bool,-}-```--### `files::SendFileOptions`--Options for `Space::send_file`.--```rust-pub struct SendFileOptions {- pub subdir: String,- pub respect_ignore_files: bool,- pub conflict: Conflict,-}-```--### `files::SendFileReport`--The result of `Space::send_file`.--```rust-pub struct SendFileReport {- pub source: String,- pub destination: String,- pub dest: String,- pub kind: &'static str,- pub files: Vec<SentFile>,- pub bytes: u64,- pub respect_ignorefiles: bool,- pub skipped_by_ignorefiles: Vec<String>,- pub skipped_count: usize,- pub skipped_by_guest: Vec<String>,- pub verified: bool,-}-```--### `files::SentFile`--One file placed by `Space::send_file`.--```rust-pub struct SentFile {- pub path: String,- pub size: u64,- pub sha256: String,-}-```--### `files::UploadReport`--The result of `Space::upload`.--```rust-pub struct UploadReport {- pub source: String,- pub dest: String,- pub kind: &'static str,- pub files: usize,- pub directories: usize,- pub bytes: u64,- pub sha256: Option<String>,- pub verified: bool,-}-```--### `groups::GroupChat`--A group chat.--```rust-pub struct GroupChat {- pub id: String,- pub title: String,- pub created_at: DateTime<Utc>,- pub messages: Vec<GroupMessage>,-}-impl GroupChat {- fn new(title: &str, members: &[String]) -> Result<Self, GroupChatError>;- fn member_ids(&self) -> &[String];- fn is_full(&self) -> bool;- fn is_at_floor(&self) -> bool;- fn membership_label(&self) -> String;- fn remaining_seats(&self) -> usize;- fn add(&mut self, bot_id: &str) -> Result<(), GroupChatError>;- fn remove(&mut self, bot_id: &str) -> Result<(), GroupChatError>;-}-```--### `groups::GroupChatError`--A membership rule was broken.--```rust-pub enum GroupChatError {- TooFewBots(usize),- TooManyBots(usize),- Full,- AtFloor,- AlreadyAMember(String),- NotAMember(String),- UnknownChat(String),-}-```--### `groups::GroupChatStore`--Group chats: membership, fan-out, and the merged ...--```rust-pub struct GroupChatStore {- pub chats: Vec<GroupChat>,- pub last_error: Option<String>,- pub working: HashMap<String, BTreeSet<String>>,-}-impl GroupChatStore {- fn new() -> Self;- fn attach(&mut self, messenger: Arc<dyn GroupMessenger>);- fn chat(&self, id: &str) -> Option<&GroupChat>;- fn create(&mut self, title: &str, members: &[String]) -> Result<GroupChat, GroupChatError>;- fn delete(&mut self, id: &str);- async fn add(&mut self, bot_id: &str, chat_id: &str) -> Result<(), GroupChatError>;- async fn remove(&mut self, bot_id: &str, chat_id: &str) -> Result<(), GroupChatError>;- async fn send(&mut self, text: &str, chat_id: &str) -> Vec<GroupDelivery>;- async fn collect_replies(&mut self, chat_id: &str) -> Vec<GroupMessage>;- fn react(&mut self, emoji: &str, chat_id: &str);- async fn refresh_working(&mut self, chat_id: &str);- fn working_bots(&self, chat_id: &str) -> Vec<String>;-}-```--### `groups::GroupDelivery`--The result of fanning one message out to one member.--```rust-pub struct GroupDelivery {- pub bot_id: String,- pub accepted: bool,- pub reason: String,-}-```--### `groups::GroupMessage`--One line of a group transcript.--```rust-pub struct GroupMessage {- pub id: String,- pub speaker: GroupSpeaker,- pub text: String,- pub at: DateTime<Utc>,- pub undelivered: bool,- pub reaction: Option<String>,-}-```--### `groups::GroupMessenger`--How a group reaches its Bots.--```rust-pub trait GroupMessenger: Send + Sync {- async fn deliver(&self, text: &str, bot_id: &str) -> GroupDelivery;- async fn latest_reply(&self, bot_id: &str) -> Option<String>;- async fn is_working(&self, bot_id: &str) -> bool;- async fn display_name(&self, bot_id: &str) -> String;-}-```--### `groups::GroupSpeaker`--Who said a line: the human, a Bot, or the group itself.--```rust-pub enum GroupSpeaker {- Human,- Bot { bot_id: String },- System,-}-```--### `host_spaces::HostCaller`--Who asked the host for a Space.--```rust-pub struct HostCaller {- pub account: String,- pub email: Option<String>,- pub name: Option<String>,- pub role: String,- pub via: String,-}-impl HostCaller {- fn local() -> Self;- fn from_metadata(value: Option<&str>) -> Result<Self>;- fn from_grpc_metadata(metadata: &MetadataMap) -> Result<Self>;- fn label(&self) -> String;- fn is_owner(&self) -> bool;- fn may_create(&self) -> bool;-}-```--### `host_spaces::HostLimit`--One limit of a host and how much of it is used ...--```rust-pub struct HostLimit {- pub resource: String,- pub used: u32,- pub limit: u32,- pub reason: String,-}-```--### `host_spaces::HostOffer`--One of your machines that provides Spaces, as ...--```rust-pub struct HostOffer {- pub id: String,- pub name: String,- pub via: String,- pub online: bool,- pub os: String,- pub limits: Vec<HostLimit>,-}-```--### `host_spaces::HostSpacesServer`--The host half: what this machine's cua daemon does for ...--```rust-pub struct HostSpacesServer { /* private fields */ }-impl HostSpacesServer {- fn new(spaces: Spaces) -> Arc<Self>;- async fn restore_direct_forwards(&self);- async fn get(&self, caller: &HostCaller) -> Result<GetHostSpacesResponse>;- async fn create(&self, caller: &HostCaller, req: CreateHostSpaceRequest) -> Result<HostSpace>;- async fn cancel(&self, caller: &HostCaller, space: &str) -> Result<String>;- async fn delete_cloud(&self, caller: &HostCaller, space: &str) -> Result<String>;- async fn delete(&self, caller: &HostCaller, space: &str) -> Result<String>;- async fn set_power(&self, caller: &HostCaller, space: &str, on: bool) -> Result<SetHostSpacePowerResponse>;-}-```--### `host_spaces::ResolvedHost`--A machine that provides Spaces, as ...--```rust-pub enum ResolvedHost {- Relay(RelayMachine),- Direct(DirectHost),-}-impl ResolvedHost {- fn via(&self) -> &'static str;- fn name(&self) -> String;-}-```--### `hotspot::Hotspot`--A running hotspot.--```rust-pub struct Hotspot { /* private fields */ }-impl Hotspot {- fn id(&self) -> &str;- fn socks_address(&self) -> &str;- fn space(&self) -> &Space;- fn is_running(&self) -> bool;- async fn status(&self) -> Result<HotspotStatus>;- async fn stop(self) -> Result<()>;-}-```--### `hotspot::HotspotOptions`--Options for `Space::start_hotspot`.--```rust-pub struct HotspotOptions {- pub socks_port: u32,- pub set_system_proxy: bool,- pub bypass: Vec<String>,- pub dialer: Dialer,-}-```--### `hotspot::HotspotStatus`--Hotspot state as reported by the Space.--```rust-pub struct HotspotStatus {- pub space: String,- pub state: String,- pub hotspot_id: String,- pub socks_address: String,- pub active_connections: u32,- pub bytes_out: u64,- pub bytes_in: u64,- pub served_here: bool,-}-```--### `IconRequest`--One app to look up: a window's app as the window list ...--```rust-pub struct IconRequest {- pub app_name: String,- pub app_id: String,- pub pid: u32,-}-```--### `install_cache::StageEvent`--One staging report line, with bytes.--```rust-pub struct StageEvent {- pub detail: String,- pub done: u64,- pub total: u64,-}-```--### `operator::ControlServerDisplay`--The Cua Spaces app's loopback control server.--```rust-pub struct ControlServerDisplay { /* private fields */ }-impl ControlServerDisplay {- fn new(config: impl Into<PathBuf>) -> Self;-}-```--### `operator::NoDisplay`--No display: every call reports host ...--```rust-pub struct NoDisplay;-```--### `operator::OperatorDisplay`--Something that can present Spaces on the operator's ...--```rust-pub trait OperatorDisplay: Send + Sync {- async fn stream_window(&self, request: WindowStreamRequest) -> Result<()>;- async fn pin_pip(&self, space_id: &str) -> Result<()>;- async fn unpin_pip(&self, space_id: &str) -> Result<()>;- async fn open_viewer(&self, space_id: &str) -> Result<()>;-}-```--### `operator::WindowStreamRequest`--A request to draw one Space window on the operator's ...--```rust-pub struct WindowStreamRequest {- pub space_id: String,- pub window_id: String,- pub app_name: String,- pub title: String,- pub media_url: String,- pub media_session_id: String,-}-```--### `PendingSpace`--A Space `Spaces::create` started with `wait = false`.--```rust-pub struct PendingSpace {- pub id: String,- pub phase: &'static str,-}-```--### `presence::art::CursorArt`--One shape's art.--```rust-pub struct CursorArt {- pub shape: CursorShape,- pub path_d: String,- pub hotspot_x: f64,- pub hotspot_y: f64,- pub canvas: f64,- pub outline_color: String,- pub outline_width: f64,-}-```--### `presence::Cursor`--A cursor position, normalized to `[0, 1]` within the ...--```rust-pub struct Cursor {- pub display_id: String,- pub window_id: Option<String>,- pub x: f64,- pub y: f64,- pub visible: bool,- pub pressed: bool,- pub shape: CursorShape,- pub shape_source: ShapeSource,- pub at_ms: f64,- pub received_ms: f64,-}-impl Cursor {- fn at(x: f64, y: f64) -> Self;- fn hidden(self) -> Self;-}-```--### `presence::CursorSender`--Publishes the caller's cursor at most every ...--```rust-pub struct CursorSender { /* private fields */ }-impl CursorSender {- fn uses_datagrams(&self) -> bool;- async fn update(&self, cursor: &Cursor) -> Result<()>;-}-```--### `presence::CursorShape`--A pointer shape, the portable vocabulary of ...--```rust-pub enum CursorShape {- Arrow,- Text,- Pointer,- ResizeNs,- ResizeEw,- ResizeNesw,- ResizeNwse,- Wait,- Progress,- NotAllowed,- Crosshair,- Grab,- Grabbing,- Move,-}-impl CursorShape {- const ALL: [CursorShape; 14] = _;;- fn from_wire(v: i32) -> Self;- fn to_wire(self) -> i32;- fn as_str(self) -> &'static str;- fn parse(name: &str) -> Self;-}-```--### `presence::CursorUplink`--Where outgoing cursors go: the datagram channel when ...--```rust-pub trait CursorUplink: Send + Sync {- async fn send(&self, cursor: &Cursor) -> Result<bool>;-}-```--### `presence::Drawable`--One cursor to draw.--```rust-pub struct Drawable {- pub participant_id: String,- pub display_name: String,- pub color: String,- pub is_me: bool,- pub is_agent: bool,- pub x: f64,- pub y: f64,- pub shape: CursorShape,- pub shape_source: ShapeSource,- pub alpha: f64,- pub display_id: String,- pub window_id: Option<String>,-}-```--### `presence::Identity`--Who is joining.--```rust-pub struct Identity {- pub id: String,- pub display_name: String,- pub color: String,- pub agent: bool,-}-impl Identity {- fn agent(id: &str, display_name: &str) -> Self;-}-```--### `presence::Participant`--A participant as seen in the roster.--```rust-pub struct Participant {- pub participant_id: String,- pub principal_id: String,- pub display_name: String,- pub color: String,- pub kind: String,-}-```--### `presence::PresenceDatagrams`--The presence datagram channel (`cua-presence/1` over ...--```rust-pub trait PresenceDatagrams: Send + Sync + 'static {- fn connect<'a>(&'a self, space: &'a Space, info: &'a PresenceDatagrams, timeout: Duration) -> BoxFuture<'a, Result<DatagramChannel>>;-}-```--### `presence::PresenceEvent`--One presence event.--```rust-pub enum PresenceEvent {- Joined { participant: Participant },- Left { participant_id: String, reason: String },- CursorMoved { participant_id: String, cursor: Cursor },- ShapeChanged { participant_id: String, shape: CursorShape, source: ShapeSource },- Heartbeat { participant_ids: Vec<String> },- KeepAlive,-}-```--### `presence::PresenceSession`--A joined presence session.--```rust-pub struct PresenceSession { /* private fields */ }-impl PresenceSession {- fn me(&self) -> &Participant;- fn roster(&self) -> &[(Participant, Option<Cursor>)];- fn uses_datagrams(&self) -> bool;- fn view(&self) -> PresenceView;- fn sender(&self) -> CursorSender;- async fn update_cursor(&self, cursor: &Cursor) -> Result<()>;- async fn next_event(&mut self, timeout: Duration) -> Result<Option<PresenceEvent>>;- async fn wait_for(&mut self, timeout: Duration, max_events: usize, pred: impl FnMut(&PresenceEvent) -> bool) -> Result<PresenceEvent>;- async fn leave(self) -> Result<()>;-}-```--### `presence::PresenceView`--Who is present and what to draw for each, folded from ...--```rust-pub struct PresenceView { /* private fields */ }-impl PresenceView {- fn new(me: &str, delay_ms: f64) -> Self;- fn me(&self) -> &str;- fn set_heartbeat_interval_ms(&mut self, ms: f64);- fn upsert(&mut self, participant: Participant);- fn participant_ids(&self) -> Vec<String>;- fn participant(&self, id: &str) -> Option<&Participant>;- fn shape_of(&self, id: &str) -> Option<(CursorShape, ShapeSource)>;- fn apply(&mut self, event: &PresenceEvent, local_ms: f64) -> bool;- fn expire(&mut self, local_ms: f64) -> Vec<String>;- fn drawables(&mut self, local_ms: f64, local_pointer: Option<(f64, f64)>) -> Vec<Drawable>;-}-```--### `presence::Roster`--Who is present and where their cursors are, folded from ...--```rust-pub struct Roster {- pub me: String,- pub entries: Vec<(Participant, Option<Cursor>)>,-}-impl Roster {- fn from_session(session: &PresenceSession) -> Self;- fn get(&self, participant_id: &str) -> Option<&(Participant, Option<Cursor>)>;- fn color_of(&self, principal_id: &str) -> String;- fn others(&self) -> impl Iterator<Item = &(Participant, Option<Cursor>)>;- fn apply(&mut self, e: &PresenceEvent) -> bool;-}-```--### `presence::ShapeSource`--How a shape was determined (cua.env ...--```rust-pub enum ShapeSource {- Unspecified,- HitTest,- System,- Probe,-}-impl ShapeSource {- fn from_wire(v: i32) -> Self;- fn to_wire(self) -> i32;- fn as_str(self) -> &'static str;- fn parse(name: &str) -> Self;-}-```--### `presence::view::CursorSmoother`--One remote cursor's interpolation buffer.--```rust-pub struct CursorSmoother { /* private fields */ }-impl CursorSmoother {- fn new(delay_ms: f64) -> Self;- fn push(&mut self, server_ms: f64, local_ms: f64, x: f64, y: f64, target: &str);- fn reset(&mut self);- fn position(&self, local_ms: f64) -> Option<(f64, f64)>;- fn alpha(&self, local_ms: f64) -> f64;-}-```--### `ProgressSink`--Where `SpaceCreate::progress` reports go.--```rust-pub struct ProgressSink(pub Sink);-impl ProgressSink {- fn new(f: impl Fn(&CreateProgress) + Send + Sync + 'static) -> Self;-}-```--### `Provider`--Which provider backs a Space: the `location` vocabulary.--```rust-pub enum Provider {- Cloud,- Local,- Direct,- Relay,-}-impl Provider {- fn as_str(self) -> &'static str;- fn parse(s: &str) -> Option<Self>;-}-```--### `reattach::Attempt`--What a re-attach attempt did.--```rust-pub enum Attempt {- Attached,- Unsupported,-}-```--### `reattach::Backoff`--Exponential backoff between failed attempts.--```rust-pub struct Backoff { /* private fields */ }-impl Backoff {- fn new(policy: &Policy) -> Self;- fn fail(&mut self) -> Duration;- fn reset(&mut self);-}-```--### `reattach::Health`--What a link looks like right now.--```rust-pub enum Health {- Healthy,- Down,- Gone,-}-```--### `reattach::Note`--Whether to log a failure at `warn`.--```rust-pub enum Note {- Log { repeated: u32 },- Quiet,-}-```--### `reattach::Policy`--Timing of `supervise`.--```rust-pub struct Policy {- pub poll: Duration,- pub initial_backoff: Duration,- pub max_backoff: Duration,-}-```--### `reattach::RepeatLimiter`--Rate-limits identical failure messages across every ...--```rust-pub struct RepeatLimiter { /* private fields */ }-impl RepeatLimiter {- const fn new() -> Self;- fn note(&self, why: &str, now: Instant) -> Note;-}-```--### `RecoveredCreate`--`container:ghcr.io/x:1` -> `ghcr.io/x:1` (the local ...--```rust-pub struct RecoveredCreate {- pub id: String,- pub outcome: RecoveryOutcome,-}-```--### `RecoveryOutcome`--The fate of an interrupted create.--```rust-pub enum RecoveryOutcome {- Registered,- Deleted(String),- Failed(String),- AlreadyRegistered,- NothingLeft,-}-```--### `registry::Credential`--How to reach a Space again: its URL and spacesd token.--```rust-pub struct Credential {- pub url: Option<String>,- pub token: Option<String>,- pub service_urls: BTreeMap<String, String>,- pub namespace: Option<String>,-}-```--### `registry::DirectHost`--A machine that provides Spaces over its direct listener ...--```rust-pub struct DirectHost {- pub name: String,- pub space: String,- pub spaces: BTreeMap<String, String>,-}-```--### `registry::Registry`--The registry on disk.--```rust-pub struct Registry { /* private fields */ }-impl Registry {- fn new(dir: impl Into<PathBuf>) -> Self;- fn dir(&self) -> &Path;- fn spaces_path(&self) -> PathBuf;- fn credentials_path(&self) -> PathBuf;- fn list(&self) -> Result<Vec<Space>>;- fn get(&self, id: &str) -> Result<Option<Space>>;- fn credential(&self, id: &str) -> Result<Option<Credential>>;- fn lock_path(&self) -> PathBuf;- fn direct_hosts_path(&self) -> PathBuf;- fn direct_hosts(&self) -> Result<Vec<DirectHost>>;- fn direct_host_of(&self, id: &str) -> Result<Option<(DirectHost, String)>>;- fn update_direct_hosts(&self, change: impl FnOnce(&mut Vec<DirectHost>)) -> Result<()>;- fn upsert_direct_host(&self, name: &str, space: &str) -> Result<()>;- fn forget_direct(&self, id: &str) -> Result<bool>;- fn upsert(&self, space: Space, credential: Credential) -> Result<()>;- fn remove(&self, id: &str) -> Result<bool>;-}-```--### `RelayAccount`--The relay and the account Spaces lists machines for.--```rust-pub struct RelayAccount {- pub url: String,- pub tokens: Arc<dyn AccountTokens>,- pub device: Option<Arc<DeviceAuth>>,- pub spaces_api: Option<String>,-}-impl RelayAccount {- fn new(url: impl Into<String>, tokens: Arc<dyn AccountTokens>) -> Self;- fn with_spaces_api(self, url: impl Into<String>) -> Self;- fn spaces_api(&self) -> Result<SpacesApiClient>;- fn with_device(self, device: Arc<DeviceAuth>) -> Self;- async fn device_session(&self) -> Option<String>;- async fn client(&self) -> Result<RelayClient>;-}-```--### `routines::FileStorage`--A JSON file (written atomically).--```rust-pub struct FileStorage(pub PathBuf);-```--### `routines::FiringRecord`--One line of the scheduler's log, newest first.--```rust-pub struct FiringRecord {- pub routine_id: String,- pub title: String,- pub at: DateTime<Utc>,- pub firing: RoutineFiring,-}-```--### `routines::MemoryStorage`--In memory.--```rust-pub struct MemoryStorage(pub Mutex<Option<String>>);-```--### `routines::Routine`--One routine.--```rust-pub struct Routine {- pub id: String,- pub bot_id: String,- pub title: String,- pub prompt: String,- pub schedule: Schedule,- pub is_enabled: bool,- pub created_at: DateTime<Utc>,- pub last_fired_at: Option<DateTime<Utc>>,- pub last_run_id: Option<String>,- pub last_outcome: Option<String>,-}-impl Routine {- fn next_fire(&self, reference: DateTime<Utc>) -> Option<DateTime<Utc>>;- fn is_due(&self, now: DateTime<Utc>) -> bool;- fn turn_text(&self) -> String;-}-```--### `routines::RoutineFiring`--What happened when a routine fired.--```rust-pub enum RoutineFiring {- Started { run_id: String },- Refused { reason: String },- Failed { reason: String },-}-impl RoutineFiring {- fn summary(&self) -> String;- fn run_id(&self) -> Option<&str>;-}-```--### `routines::RoutineRunner`--Gives a Bot its routine turn.--```rust-pub trait RoutineRunner: Send + Sync {- async fn fire(&self, routine: &Routine) -> RoutineFiring;-}-```--### `routines::RoutineStorage`--Where the routine list lives.--```rust-pub trait RoutineStorage: Send + Sync {- fn load(&self) -> Result<Option<String>>;- fn save(&self, json: &str) -> Result<()>;-}-```--### `routines::RoutineStore`--Routines: storage, editing, and the clock that fires ...--```rust-pub struct RoutineStore {- pub routines: Vec<Routine>,- pub log: Vec<FiringRecord>,-}-impl RoutineStore {- fn new(storage: Box<dyn RoutineStorage>) -> Self;- fn attach(&mut self, runner: Arc<dyn RoutineRunner>);- fn runner(&self) -> Option<Arc<dyn RoutineRunner>>;- fn load(&mut self);- fn save(&mut self) -> bool;- fn routines_for(&self, bot_id: &str) -> Vec<Routine>;- fn routine(&self, id: &str) -> Option<&Routine>;- fn create(&mut self, bot_id: &str, title: &str, prompt: &str, schedule: Schedule, enabled: bool, now: DateTime<Utc>) -> Routine;- fn update(&mut self, routine: Routine);- fn delete(&mut self, id: &str);- fn set_enabled(&mut self, id: &str, enabled: bool);- fn due(&self, now: DateTime<Utc>) -> Vec<Routine>;- fn record(&mut self, routine: &Routine, firing: RoutineFiring, now: DateTime<Utc>) -> FiringRecord;- async fn fire(&mut self, routine: &Routine, now: DateTime<Utc>) -> FiringRecord;- async fn tick(&mut self, now: DateTime<Utc>) -> Vec<FiringRecord>;-}-```--### `routines::Schedule`--The three recurrence shapes.--```rust-pub enum Schedule {- EveryMinutes { minutes: i64 },- DailyAt { hour: u32, minute: u32 },- WeeklyOn { weekday: u32, hour: u32, minute: u32 },-}-impl Schedule {- fn next_fire(&self, reference: DateTime<Utc>) -> Option<DateTime<Utc>>;- fn label(&self) -> String;-}-```--### `services::ServiceRoute`--Where a `service` argument leads.--```rust-pub enum ServiceRoute {- Driver,- Mcp(String),-}-impl ServiceRoute {- fn name(&self) -> &str;-}-```--### `services::ToolInfo`--A tool description.--```rust-pub struct ToolInfo {- pub name: String,- pub description: String,- pub input_schema: Value,- pub output_schema: Option<Value>,- pub read_only: bool,- pub destructive: bool,-}-```--### `services::ToolResult`--A tool call's result, as MCP content parts.--```rust-pub struct ToolResult {- pub content: Vec<Value>,- pub structured: Option<Value>,- pub is_error: bool,- pub meta: Option<Value>,-}-impl ToolResult {- fn from_mcp(raw: Value) -> Self;-}-```--### `ServiceSource`--How a declared service is reached.--```rust-pub enum ServiceSource {- Sandbox(Box<Service>),- Url(ServiceEndpoint),-}-```--### `share::RelayRegistration`--A Space published on the relay.--```rust-pub struct RelayRegistration {- pub space: String,- pub relay_space: String,- pub machine: String,- pub url: String,- pub online: bool,-}-```--### `share::ShareAudit`--One owner-side audit line (newest first in listings).--```rust-pub struct ShareAudit {- pub ts_ms: u64,- pub action: String,- pub space: String,- pub detail: String,-}-```--### `share::ShareConsent`--The user's confirmation before a Space is shared ...--```rust-pub trait ShareConsent: Send + Sync {- fn confirm(&self, reason: &str) -> Result<(), String>;-}-```--### `share::ShareEntry`--One person a Space is shared with.--```rust-pub struct ShareEntry {- pub who: String,- pub role: ShareRole,- pub connected: bool,-}-```--### `share::ShareRole`--What a person may do in a shared Space.--```rust-pub enum ShareRole {- Viewer,- Editor,-}-impl ShareRole {- fn parse(s: &str) -> Result<ShareRole>;- fn as_str(self) -> &'static str;-}-```--### `share::SpaceShares`--A Space's shares.--```rust-pub struct SpaceShares {- pub space: String,- pub machine: String,- pub invitee_space: String,- pub url: String,- pub online: bool,- pub shares: Vec<ShareEntry>,-}-```--### `site_login::BrowserTab`--The browser tab to sign in (cua-driver ids, all ...--```rust-pub struct BrowserTab {- pub session: Option<String>,- pub target_id: Option<String>,- pub tab_id: Option<String>,-}-```--### `site_login::SiteLoginAsk`--One sign-in request.--```rust-pub struct SiteLoginAsk {- pub target: String,- pub url: String,- pub username: Option<String>,- pub agent: Option<String>,- pub browser: BrowserTab,- pub relay_plaintext_ack: bool,-}-```--### `site_login::SiteLoginBroker`--The Keyvault operations `request_site_login` uses.--```rust-pub trait SiteLoginBroker: Send + Sync {- async fn request_login(&self, ask: &SiteLoginAsk) -> Result<String, SiteLoginError>;- async fn await_and_fill(&self, request_id: &str, ask: &SiteLoginAsk, timeout: Duration) -> Result<SiteLoginOutcome, SiteLoginError>;-}-```--### `site_login::SiteLoginError`--A Keyvault failure, surfaced with its code (`denied` ...--```rust-pub struct SiteLoginError {- pub code: String,- pub message: String,-}-```--### `site_login::SiteLoginFilled`--What a sign-in did.--```rust-pub struct SiteLoginFilled {- pub site: String,- pub origin: String,- pub username_hint: String,- pub submitted: bool,- pub page_url: String,- pub browser: BrowserTab,-}-```--### `site_login::SiteLoginOutcome`--The outcome of awaiting a decision and (when granted) ...--```rust-pub enum SiteLoginOutcome {- Pending,- Denied(String),- Filled(SiteLoginFilled),-}-```--### `Space`--A connected Space.--```rust-pub struct Space { /* private fields */ }-impl Space {- async fn app_icon(&self, app_name: &str, app_id: &str, pid: u32) -> Result<Option<AppIcon>>;- async fn app_icons(&self, requests: &[IconRequest]) -> Result<Vec<Option<AppIcon>>>;- fn shell_command(&self, line: &str) -> Command;- async fn bash(&self, command: &str, timeout: Duration) -> Result<BashOutput>;- async fn write(&self, path: &str, content: impl Into<Bytes>) -> Result<WriteReport>;- async fn home(&self) -> Result<String>;- fn services(&self) -> Vec<String>;- fn resolve_service(&self, service: Option<&str>) -> Result<ServiceRoute>;- async fn mcp(&self, service: &str) -> Result<Arc<McpClient>>;- async fn list_tools(&self, service: Option<&str>) -> Result<(Vec<ToolInfo>, String)>;- async fn call_tool(&self, service: Option<&str>, tool: &str, arguments: Map<String, Value>, timeout: Option<Duration>) -> Result<ToolResult>;- fn generic(id: SpaceId, name: impl Into<String>, services: BTreeMap<String, SpaceService>) -> Self;- fn attach(id: SpaceId, name: impl Into<String>, env: SpacesdClient, caps: GetCapabilitiesResponse, ws_headers: Vec<(String, String)>) -> Self;- fn with_services(self, services: BTreeMap<String, SpaceService>) -> Self;- fn image(&self) -> Option<(&str, &str)>;- fn platform(&self) -> (String, String);- fn id(&self) -> &SpaceId;- fn name(&self) -> &str;- fn provider(&self) -> Provider;- fn spacesd(&self) -> Result<&SpacesdClient>;- fn has_spacesd(&self) -> bool;- fn spacesd_unreachable_cause(&self) -> Option<String>;- fn capabilities(&self) -> &GetCapabilitiesResponse;- fn declared_services(&self) -> &BTreeMap<String, SpaceService>;- fn env_token(&self) -> Option<&str>;- fn feature(&self, name: &str) -> Option<&Feature>;- fn supports(&self, name: &str) -> bool;- fn require(&self, name: &str) -> Result<()>;- fn require_any(&self, names: &[&str]) -> Result<()>;- fn os_family(&self) -> OsFamily;- fn reported_os(&self) -> Option<(&'static str, &str, &str)>;- fn is_windows(&self) -> bool;- async fn websocket_headers(&self) -> Result<Vec<(String, String)>>;- fn websocket_url(&self, ws_path: &str) -> Result<String>;- async fn agents(&self) -> Result<Agents>;- async fn send_file(&self, local: &Path, options: SendFileOptions) -> Result<SendFileReport>;- async fn upload(&self, local: &Path, dest: Option<&str>) -> Result<UploadReport>;- async fn download(&self, remote: &str, dest_dir: &Path) -> Result<DownloadReport>;- async fn start_hotspot(&self, options: HotspotOptions) -> Result<Hotspot>;- async fn hotspot_status(&self) -> Result<HotspotStatus>;- async fn stage_install_archives(&self, ids: &[&str], arch: &str, home: &str, events: UnboundedSender<StageEvent>) -> Result<Vec<String>>;- fn presence_participant(&self) -> Option<String>;- async fn join_presence(&self, identity: Identity, timeout: Duration) -> Result<PresenceSession>;- async fn join_presence_with(&self, identity: Identity, timeout: Duration, datagrams: bool) -> Result<PresenceSession>;- async fn set_presence_settings(&self, cursor_probe: Option<bool>) -> Result<()>;- async fn displays(&self) -> Result<Vec<DisplayInfo>>;- async fn window_thumbnail(&self, window_id: &str, epoch: u64, max_dimension: u32) -> Result<Option<Vec<u8>>>;- async fn usage(&self) -> Result<Usage>;- async fn stream_targets(&self, include_windows: bool) -> Result<ListTargetsResponse>;- async fn windows(&self, app: Option<&str>) -> Result<Vec<WindowTarget>>;- async fn all_windows(&self, app: Option<&str>) -> Result<Vec<WindowTarget>>;- async fn find_window(&self, app: &str) -> Result<WindowTarget>;- async fn open_stream(&self, target: StreamTarget, options: StreamOptions) -> Result<StreamTicket>;- async fn close_stream(&self, media_session_id: &str) -> Result<()>;- async fn stream_session(&self, target: StreamTarget, options: StreamOptions, frames: Arc<dyn FrameSink>, audio: Option<Arc<dyn AudioSink>>) -> Result<StreamSession>;- async fn attach_volume<D, F>(&self, dial: D, mount_path: Option<String>) -> Result<VolumeAttachment> where D: Fn(String, u16) -> F + Send + Sync + 'static, F: Future<Output = Result<TcpStream>> + Send + 'static;- fn volume_backend(&self) -> Option<String>;- async fn volume_status(&self) -> Result<VolumeGuestStatus>;-}-```--### `SpaceCreate`--Options for `Spaces::create`: the same location / kind ...--```rust-pub struct SpaceCreate {- pub image: Option<String>,- pub on: Option<On>,- pub kind: Kind,- pub runtime: Runtime,- pub name: Option<String>,- pub cpus: Option<u32>,- pub memory_mb: Option<u64>,- pub disk_gb: Option<u32>,- pub timeout: Option<Duration>,- pub wait: Option<bool>,- pub reuse: bool,- pub command: Option<Vec<String>>,- pub env: BTreeMap<String, String>,- pub services: BTreeMap<String, u16>,- pub spacesd: Option<bool>,- pub env_token: Option<String>,- pub progress: Option<ProgressSink>,- pub create_id: Option<String>,- pub gpu: Option<String>,-}-```--### `SpaceCreated`--What `Spaces::create` returns.--```rust-pub enum SpaceCreated {- Ready { info: SpaceInfo, reused: bool },- Starting(PendingSpace),-}-impl SpaceCreated {- fn ready(self) -> Result<SpaceInfo, PendingSpace>;- fn reused(&self) -> bool;-}-```--### `SpaceId`--A parsed Space id.--```rust-pub enum SpaceId {- Cloud { name: String, namespace: Option<String> },- Local { name: String },- Direct { authority: String },- Relay { machine_id: String },-}-impl SpaceId {- fn parse(input: &str) -> Result<Self>;- fn from_ref(r: SandboxRef) -> Option<Self>;- fn to_ref(&self) -> SandboxRef;- fn provider(&self) -> Provider;- fn short_name(&self) -> &str;-}-```--### `SpaceInfo`--A registered Space as listed, whether or not it is ...--```rust-pub struct SpaceInfo {- pub id: String,- pub name: String,- pub provider: Provider,- pub spacesd_version: String,- pub features: Vec<String>,- pub os: String,- pub os_name: String,- pub os_pretty_name: String,- pub image: String,- pub image_digest: String,- pub kind: String,- pub arch: String,- pub services: Vec<String>,- pub added_at: Option<String>,- pub host: String,- pub host_name: String,- pub power: String,- pub power_state: String,- pub cloud: String,- pub cloud_place: String,- pub cloud_delete: String,- pub status: String,- pub stop_reason: String,-}-```--### `SpacePower`--What `crate::Spaces::stop` or `crate::Spaces::start` ...--```rust-pub struct SpacePower {- pub space: String,- pub state: String,- pub power: String,- pub message: String,-}-impl SpacePower {- fn new(space: &str, control: PowerControl, state: PowerState) -> Self;-}-```--### `Spaces`--The Spaces runtime: a registry of spacesd sandboxes and ...--```rust-pub struct Spaces { /* private fields */ }-impl Spaces {- fn cloud_sandbox_of(&self, space: &str) -> Result<Option<String>>;- async fn cancel_create(&self, key: &str) -> Result<CancelOutcome>;- async fn hosts(&self) -> Result<Vec<HostOffer>>;- async fn resolve_host(&self, query: &str) -> Result<ResolvedHost>;- async fn add_direct_host(&self, url: &str, token: Option<String>, name: Option<String>) -> Result<SpaceInfo>;- async fn host_spaces(&self, host: &str) -> Result<GetHostSpacesResponse>;- fn builder() -> SpacesBuilder;- fn home_dir(&self) -> &Path;- fn registry(&self) -> &Registry;- fn sandboxes(&self) -> &Sandboxes;- fn operator_display(&self) -> &Arc<dyn OperatorDisplay>;- fn fleet_namespace(&self) -> &str;- fn list(&self) -> Result<Vec<SpaceInfo>>;- async fn list_all(&self) -> Result<Vec<SpaceInfo>>;- fn this_relay_machine_id(&self) -> Option<String>;- fn relay_account(&self) -> Option<RelayAccount>;- fn set_site_login_broker(&self, broker: Option<Arc<dyn SiteLoginBroker>>);- fn site_login_broker(&self) -> Option<Arc<dyn SiteLoginBroker>>;- fn set_share_consent(&self, consent: Option<Arc<dyn ShareConsent>>);- fn has_share_consent(&self) -> bool;- fn set_relay(&self, relay: Option<RelayAccount>);- async fn explain_mesh_cut(&self, space: &str, e: Error) -> Error;- async fn mesh_status(&self) -> Vec<(String, Status)>;- async fn relay_machines(&self) -> Result<Vec<RelayMachine>>;- async fn find(&self, space: &str) -> Result<SpaceInfo>;- fn resolve(&self, space: &str) -> Result<SpaceId>;- async fn add(&self, url: &str, token: Option<String>, name: Option<String>) -> Result<SpaceInfo>;- async fn add_with_service(&self, url: &str, token: Option<String>, name: Option<String>, service: Option<String>) -> Result<SpaceInfo>;- async fn remove(&self, space: &str) -> Result<SpaceInfo>;- async fn space(&self, space: &str) -> Result<Space>;- async fn forget_connection(&self, space: &str) -> Result<()>;- async fn create(&self, opts: SpaceCreate) -> Result<SpaceCreated>;- async fn gpu_support(&self, on: &On) -> Vec<GpuSupport>;- fn fleet_pool_name(&self, runtime: FleetRuntime, image: &str) -> String;- async fn recover_interrupted_creates(&self, budget: Duration) -> Vec<RecoveredCreate>;- async fn delete(&self, space: &str) -> Result<String>;- fn thumbnails(&self) -> &ThumbnailCache;- async fn thumbnail(&self, space: &str, max_age: Option<Duration>) -> Result<Thumbnail>;- async fn refresh_thumbnails(&self) -> usize;- fn spawn_thumbnail_refresh(&self) -> JoinHandle<()>;- fn power_of(&self, id: &str) -> (String, String);- fn stop_reason_of(&self, id: &str) -> String;- async fn stop(&self, space: &str) -> Result<SpacePower>;- async fn start(&self, space: &str) -> Result<SpacePower>;- fn download_dir(&self) -> &Path;- fn extensions(&self) -> &[Arc<dyn SpacesExtension>];- fn extension<T: SpacesExtension>(&self) -> Option<&T>;- fn extension_for(&self, tool: &str) -> Option<&Arc<dyn SpacesExtension>>;- async fn call_extension(&self, what: &str, op: &str, args: Value) -> Result<Value>;- async fn hotspot_start(&self, space: &str, options: HotspotOptions) -> Result<HotspotStatus>;- async fn hotspot_stop(&self, space: Option<&str>) -> Result<Vec<String>>;- async fn hotspot_statuses(&self, space: Option<&str>) -> Result<Vec<HotspotStatus>>;- fn share_audit(&self, space: Option<&str>, limit: usize) -> Result<Vec<ShareAudit>>;- async fn share_space(&self, space: &str, who: &str, role: ShareRole) -> Result<SpaceShares>;- async fn unshare_space(&self, space: &str, who: Option<&str>) -> Result<SpaceShares>;- async fn share_with_team(&self, space: &str, team: &str) -> Result<SpaceShares>;- async fn share_with_team_waiting(&self, space: &str, team: &str, waiting: &mut dyn FnMut(Duration) + Send) -> Result<SpaceShares>;- async fn unshare_from_team(&self, space: &str, team: &str) -> Result<SpaceShares>;- async fn relay_register(&self, space: &str) -> Result<RelayRegistration>;- async fn relay_unregister(&self, space: &str) -> Result<bool>;- async fn space_shares(&self, space: &str) -> Result<SpaceShares>;-}-```--### `SpacesBuilder`--Builder for `Spaces`.--```rust-pub struct SpacesBuilder { /* private fields */ }-impl SpacesBuilder {- fn share_consent(self, consent: Arc<dyn ShareConsent>) -> Self;- fn extension(self, extension: Arc<dyn SpacesExtension>) -> Self;- fn relay(self, relay: RelayAccount) -> Self;- fn home(self, dir: impl Into<PathBuf>) -> Self;- fn fleet(self, fleet: FleetClient) -> Self;- fn local_runtime(self, runtime: Arc<dyn LocalRuntime>) -> Self;- fn sandboxes(self, sandboxes: Sandboxes) -> Self;- fn fleet_namespace(self, ns: impl Into<String>) -> Self;- fn operator_display(self, display: Arc<dyn OperatorDisplay>) -> Self;- fn probe_timeout(self, timeout: Duration) -> Self;- fn download_dir(self, dir: impl Into<PathBuf>) -> Self;- fn build(self) -> Spaces;-}-```--### `SpaceService`--A service a Space declares (an MCP server, a web app ...--```rust-pub struct SpaceService {- pub source: ServiceSource,- pub mcp_path: String,-}-impl SpaceService {- async fn endpoint(&self) -> Result<ServiceEndpoint>;- async fn mcp_config(&self) -> Result<McpConfig>;-}-```--### `stream::AudioPacket`--One audio packet of a negotiated track.--```rust-pub struct AudioPacket {- pub track_id: u16,- pub sequence: u32,- pub pts_us: u64,- pub frame_samples: u16,- pub lost: u32,- pub dtx: bool,- pub data: Vec<u8>,-}-```--### `stream::AudioSink`--Receives audio packets on the session's delivery thread.--```rust-pub trait AudioSink: Send + Sync {- fn on_audio(&self, packet: AudioPacket);-}-```--### `stream::DisplayInfo`--One of the Space's displays (Comput ...--```rust-pub struct DisplayInfo {- pub id: String,- pub name: String,- pub primary: bool,- pub width_px: u32,- pub height_px: u32,- pub scale_factor: f64,-}-```--### `stream::FrameSink`--Receives video frames and control events.--```rust-pub trait FrameSink: Send + Sync {- fn on_frame(&self, frame: VideoFrame);- fn on_event(&self, _event: StreamEvent);-}-```--### `stream::StreamClient`--The streaming client behind `StreamSession`: it ...--```rust-pub trait StreamClient: Send + Sync + 'static {- fn attach<'a>(&'a self, ticket: &'a StreamTicket, headers: &'a [(String, String)], frames: Arc<dyn FrameSink>, audio: Option<Arc<dyn AudioSink>>) -> BoxFuture<'a, Result<Box<dyn StreamConnection>>>;-}-```--### `stream::StreamConnection`--One attached media socket (see `StreamClient`).--```rust-pub trait StreamConnection: Send + Sync {- fn media_session_id(&self) -> &str;- fn codec(&self) -> &str;- fn is_closed(&self) -> bool;- fn is_open(&self) -> bool;- fn stats(&self) -> StreamStats;- fn request_keyframe(&self) -> Result<()>;- fn send_input(&self, events: Vec<Value>) -> Result<()>;- fn send_text(&self, json: String) -> Result<()>;- fn close(&mut self, wait: Duration) -> BoxFuture<'_, ()>;-}-```--### `stream::StreamEvent`--A control event.--```rust-pub enum StreamEvent {- Opened(Value),- AudioConfigured(Value),- Lifecycle(Value),- Stats(Value),- Message(Value),- Closed { code: u16, reason: String },-}-```--### `stream::StreamOptions`--Options for `Space::open_stream`.--```rust-pub struct StreamOptions {- pub codecs: Vec<MediaCodec>,- pub max_fps: u32,- pub max_dimension: u32,- pub audio: bool,- pub ticket_ttl: Option<Duration>,- pub policy: Option<SessionPolicy>,-}-```--### `stream::StreamSession`--A live media session.--```rust-pub struct StreamSession { /* private fields */ }-impl StreamSession {- async fn attach(ticket: &StreamTicket, headers: &[(String, String)], frames: Arc<dyn FrameSink>, audio: Option<Arc<dyn AudioSink>>) -> Result<StreamSession>;- fn media_session_id(&self) -> &str;- fn codec(&self) -> &str;- fn is_closed(&self) -> bool;- fn is_open(&self) -> bool;- fn stats(&self) -> StreamStats;- fn request_keyframe(&self) -> Result<()>;- fn send_input<E: Serialize>(&self, events: Vec<E>) -> Result<()>;- fn send_text(&self, json: String) -> Result<()>;- async fn close(self) -> Result<StreamStats>;-}-```--### `stream::StreamStats`--Delivery counters.--```rust-pub struct StreamStats {- pub frames: u64,- pub keyframes: u64,- pub frames_dropped: u64,- pub frames_gated: u64,- pub keyframe_requests: u64,- pub audio_packets: u64,- pub audio_lost: u64,- pub events: u64,- pub malformed: u64,-}-```--### `stream::StreamTarget`--Which surface to stream.--```rust-pub enum StreamTarget {- Display(Option<String>),- Window(String),-}-```--### `stream::StreamTicket`--A minted media session: everything a client needs to ...--```rust-pub struct StreamTicket {- pub space: String,- pub media_session_id: String,- pub ws_url: String,- pub ticket: String,- pub ticket_expires_at: Option<String>,- pub codec: String,- pub wire_version: u32,- pub frame_size: [u32; 2],- pub needs_gateway_headers: bool,- pub raw: OpenMediaResponse,-}-```--### `stream::Usage`--Memory and storage use (`SystemService.Metrics`).--```rust-pub struct Usage {- pub memory_used: u64,- pub memory_total: u64,- pub memory_limited: bool,- pub disk_used: u64,- pub disk_total: u64,- pub disk_limited: bool,-}-```--### `stream::VideoFrame`--One encoded video access unit, keyframe-gated by the ...--```rust-pub struct VideoFrame {- pub sequence: u64,- pub codec: String,- pub keyframe: bool,- pub width: u32,- pub height: u32,- pub capture_timestamp_us: u64,- pub codec_epoch: u64,- pub geometry_epoch: u64,- pub data: Vec<u8>,-}-```--### `stream::WindowTarget`--A window target as listed.--```rust-pub struct WindowTarget {- pub window_id: String,- pub epoch: u64,- pub title: String,- pub app_name: String,- pub app_id: String,- pub pid: u32,- pub bounds: [f64; 4],- pub on_screen: bool,- pub focused: bool,- pub available: bool,- pub limitation: String,-}-impl WindowTarget {- fn is_streamable(&self) -> bool;-}-```--### `teleport_broker::SessionBroker`--The Keyvault operations `teleport_app` uses.--```rust-pub trait SessionBroker: Send + Sync {- async fn request_access(&self, app: &str, target: &str, duration_secs: u64, reason: &str) -> Result<String, SessionBrokerError>;- async fn await_and_deliver(&self, app: &str, target: &str, request_id: &str, timeout: Duration) -> Result<SessionDelivery, SessionBrokerError>;-}-```--### `teleport_broker::SessionBrokerError`--A Keyvault failure, surfaced to the tool with its code.--```rust-pub struct SessionBrokerError {- pub code: String,- pub message: String,-}-```--### `teleport_broker::SessionDelivery`--The outcome of awaiting and (when granted) performing a ...--```rust-pub enum SessionDelivery {- Pending,- Denied(String),- Delivered { app: String, target: String, items: Vec<String>, imported: Vec<String>, import_ids: Vec<String>, expires_ms: u64 },-}-```--### `thumbnails::CaptureFailure`--The last failed capture of a Space (cleared by a good ...--```rust-pub struct CaptureFailure {- pub at: Instant,- pub attempts: u32,- pub denied: bool,- pub message: String,-}-impl CaptureFailure {- fn backoff(&self) -> Duration;-}-```--### `thumbnails::Thumbnail`--One Space's latest thumbnail.--```rust-pub struct Thumbnail {- pub image: Vec<u8>,- pub format: String,- pub width: u32,- pub height: u32,- pub captured_at: SystemTime,-}-impl Thumbnail {- fn is_fresh(&self, max_age: Option<Duration>, now: SystemTime) -> bool;-}-```--### `thumbnails::ThumbnailCache`--The cache.--```rust-pub struct ThumbnailCache { /* private fields */ }-impl ThumbnailCache {- fn new(dir: Option<PathBuf>, disk_bytes: u64) -> Self;- fn in_home(home: &Path) -> Self;- fn dir(&self) -> Option<&Path>;- fn get(&self, space: &str) -> Option<Thumbnail>;- fn spaces(&self) -> Vec<String>;- fn put(&self, space: &str, t: Thumbnail);- fn fail(&self, space: &str, now: Instant, denied: bool, message: String);- fn backing_off(&self, space: &str, now: Instant) -> Option<CaptureFailure>;- fn remove(&self, space: &str);- fn retain(&self, keep: &HashSet<String>);- fn note_interest(&self, now: Instant);- fn interested(&self, now: Instant) -> bool;- fn due(&self, space: &str, now: SystemTime) -> bool;-}-```--### `volume::VolumeAttachment`--A mounted volume in a Space.--```rust-pub struct VolumeAttachment { /* private fields */ }-impl VolumeAttachment {- fn volume_id(&self) -> &str;- fn mount_path(&self) -> &str;- fn backend(&self) -> &str;- fn is_live(&self) -> bool;- async fn wait_mounted(&self, timeout: Duration) -> Result<VolumeGuestStatus>;- async fn detach(self) -> Result<()>;-}-```--### `volume::VolumeGuestStatus`--The guest's view of its mount.--```rust-pub struct VolumeGuestStatus {- pub state: String,- pub mount_path: String,- pub backend: String,- pub detail: String,- pub bytes_in: u64,- pub bytes_out: u64,-}-```--### `walk::Walk`--The result of `walk`.--```rust-pub struct Walk {- pub entries: Vec<WalkEntry>,- pub skipped: Vec<String>,-}-```--### `walk::WalkEntry`--One file or directory to transfer.--```rust-pub struct WalkEntry {- pub path: PathBuf,- pub rel: String,- pub is_dir: bool,- pub size: u64,- pub mode: u32,- pub modified: Option<SystemTime>,-}-```--## Functions--```rust-/// Whether `image` is expected to run ...-pub fn expects_spacesd(image: Option<&str>, explicit: Option<bool>) -> bool-/// A name in the form `SpaceCreate::name` ...-pub fn is_generated_name(name: &str) -> bool-/// The key a Fleet pool is named after ...-pub fn pool_key(image: &str, command: Option<&[String]>, env: &BTreeMap<String, String>, services: &BTreeMap<String, u16>) -> String-/// Lowercase DNS label: `[a-z0-9-]` ...-pub fn sanitize_label(value: &str) -> String-/// `pool_key` plus the size ...-pub fn sized_pool_key(image: &str, command: Option<&[String]>, env: &BTreeMap<String, String>, services: &BTreeMap<String, u16>, cpus: Option<u32>, memory_mb: Option<u32>) -> String--// mod app_icon-/// The guest script for a batch: looks ...-pub fn batch_script(p: IconPlatform, requests: &[IconRequest], bundle: &str) -> String-/// What the bytes are: a PNG or an SVG ...-pub fn content_type(bytes: &[u8]) -> Option<&'static str>-/// The app's stable identity in the icon ...-pub fn icon_identity(app_name: &str, app_id: &str) -> String-/// The guest script: prints the path of ...-pub fn icon_script(p: IconPlatform, app_name: &str, app_id: &str, pid: u32, out: &str) -> String-/// The files in a bundle `batch_script` ...-pub fn parse_bundle(bytes: &[u8]) -> Vec<(usize, Vec<u8>)>-/// The path the script printed: its last ...-pub fn printed_path(stdout: &str) -> Option<&str>-/// A name safe to splice into the script ...-pub fn shell_word(s: &str) -> String--// mod cloud-/// Whether a relay machine is a Space in ...-pub fn is_cloud_machine(m: &RelayMachine) -> bool--// mod exec-/// The tail of `text`, with a marker when ...-pub fn cap_output(text: &str) -> String--// mod extension-/// The JSON a `ToolOutcome` carries (its ...-pub fn outcome_json(out: ToolOutcome) -> Result<Value>--// mod files-/// Proves this process can read `path` ...-pub async fn check_host_readable(path: &Path) -> Result<()>-/// Normalizes a `send_file` target to a ...-pub fn downloads_subdir(target: Option<&str>, home: Option<&str>) -> Result<String>-/// The macOS privacy-protected location ...-pub fn protected_folder(path: &Path, home: Option<&Path>) -> Option<&'static str>--// mod fleet_runtime-/// `resolve` with the image evidence ...-pub fn check(runtime: Option<FleetRuntime>, image: &str, evidence: &ImageEvidence) -> Result<RuntimeKind>-/// The default Space image: the canonical ...-pub fn default_image(_runtime: FleetRuntime) -> String-/// The guest OS (`linux`, `windows` ...-pub fn guest_os(image: &str, resolved_os: Option<&str>) -> String-/// `guest_os` with the catalog lookup ...-pub fn guest_os_with(image: &str, catalog_os: Option<String>, resolved_os: Option<&str>) -> String-/// The tag of an image reference (see ...-pub fn image_tag(image: &str) -> Option<&str>-/// Parses the wire spelling of a runtime ...-pub fn parse_runtime(value: &str) -> Result<FleetRuntime>-/// Validates the runtime/image pairing ...-pub async fn resolve(runtime: Option<FleetRuntime>, image: &str) -> Result<RuntimeKind>-/// `resolve` returning the whole ...-pub async fn resolve_image(runtime: Option<FleetRuntime>, image: &str) -> Result<FleetImage>--// mod groups-/// Whether a Create button should be ...-pub fn can_create(members: &[String]) -> bool-/// The framing each member receives: the ...-pub fn frame_message(text: &str, title: &str, others: &[String]) -> String--// mod host_spaces-/// The relay URL a Space on this host ...-pub fn guest_relay_url(relay_url: &str, kind: &str) -> String-/// A `tonic::Status` carrying a ...-pub fn to_status(e: &Error) -> Status--// mod hotspot-/// The default dialer: plain TCP from this ...-pub fn direct_dialer() -> Dialer--// mod id-/// Canonicalizes a stored id (legacy ...-pub fn canonical_id(id: &str) -> String--// mod install_cache-/// The host cache directory.-pub fn cache_dir() -> PathBuf-/// `a` in the host cache under `dir` ...-pub async fn fetch(dir: &Path, a: &StagedArchive, progress: &mut dyn FnMut(u64, u64) + Send) -> Result<PathBuf>-/// Whether to stage through the host for a ...-pub fn wanted(url: &Url) -> bool--// mod mesh-/// The policy for this process now ...-pub fn policy() -> MeshPolicy--// mod presence-/// The stable presence color of an agent ...-pub fn color_for(id: &str) -> &'static str-/// Local Unix time in milliseconds, the ...-pub fn now_ms() -> f64-/// Registers the presence datagram channel ...-pub fn register_presence_datagrams(channel: Arc<dyn PresenceDatagrams>)-/// Black or white, whichever reads better ...-pub fn text_color_on(background: &str) -> &'static str--// mod presence::art-/// The art for every shape, in wire order.-pub fn all_cursor_art() -> &'static [CursorArt]-/// The art for `shape`.-pub fn cursor_art(shape: CursorShape) -> &'static CursorArt-/// A standalone SVG of `shape` filled with ...-pub fn cursor_art_svg(shape: CursorShape, color: &str, size: f64) -> String--// mod presence::view-/// Opacity of a cursor idle for `idle_ms`.-pub fn idle_alpha(idle_ms: f64) -> f64--// mod reattach-/// Checks a link every `policy.poll` and ...-pub async fn supervise<H, HF, R, RF>(policy: Policy, health: H, reattach: R) where H: FnMut() -> HF, HF: Future<Output = Health>, R: FnMut() -> RF, RF: Future<Output = Result<Attempt, String>>--// mod registry-/// The cua home: `$CUA_HOME`, else ...-pub fn cua_home() -> PathBuf--// mod routines-/// `8:05 AM`.-pub fn clock_label(hour: u32, minute: u32) -> String-/// A fresh id (UUID v4 form, upper case ...-pub fn new_id() -> String-/// The background loop: one for every ...-pub fn spawn_scheduler(store: Arc<Mutex<RoutineStore>>, every: Duration) -> JoinHandle<()>-/// One tick against a shared store ...-pub async fn tick_shared(store: &Mutex<RoutineStore>, now: DateTime<Utc>) -> Vec<FiringRecord>--// mod routines::iso-pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<DateTime<Utc>, D::Error>-pub fn format(d: &DateTime<Utc>) -> String-pub fn parse(s: &str) -> Result<DateTime<Utc>, ParseError>-pub fn serialize<S: Serializer>(d: &DateTime<Utc>, s: S) -> Result<S::Ok, S::Error>--// mod routines::iso::option-pub fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Option<DateTime<Utc>>, D::Error>-pub fn serialize<S: Serializer>(d: &Option<DateTime<Utc>>, s: S) -> Result<S::Ok, S::Error>--// mod services-/// Converts a `CallToolResponse` into MCP ...-pub fn tool_result(resp: CallToolResponse) -> ToolResult--// mod share-/// Moves `who` onto the list for `role` ...-pub fn apply_share(allow: &mut Vec<String>, viewers: &mut Vec<String>, who: &str, role: Option<ShareRole>)-/// Normalizes an invitee: an email ...-pub fn normalize_who(who: &str) -> Result<String>-/// The team a `team:<id>` invitee names ...-pub fn team_of(who: &str) -> Option<Result<String>>--// mod site_login-/// The `request_site_login` tool: files a ...-pub async fn request_site_login(spaces: &Spaces, a: RequestSiteLogin, agent: Option<String>) -> Result<Value>--// mod stream-/// Whether a streaming client is ...-pub fn has_stream_client() -> bool-/// The words a person sees for input the ...-pub fn input_refusal_text(message: &str) -> Option<&'static str>-/// Registers the streaming client for this ...-pub fn register_stream_client(client: Arc<dyn StreamClient>)--// mod thumbnails-/// The `desktop_stream` feature of a host ...-pub fn desktop_not_shared(caps: &GetCapabilitiesResponse) -> Option<&Feature>--// mod walk-/// A single file as a walk entry named ...-pub fn single(path: &Path, name: &str) -> Result<WalkEntry>-/// Enumerates everything under `root` (not ...-pub fn walk(root: &Path, respect_ignore_files: bool) -> Result<Walk>-```--## Constants--```rust-/// Default time allowed for the ...-pub const DEFAULT_PROBE_TIMEOUT: Duration = _;-/// The spacesd pseudo-feature every ...-pub const SPACESD_FEATURE: &str = "spacesd";--// mod app_icon-/// How long the guest script may run.-pub const ICON_SCRIPT_TIMEOUT: Duration = _;-/// Largest icon file accepted.-pub const MAX_ICON_BYTES: usize = _;--// mod audit-/// The chain's first `prev`.-pub const GENESIS: &str = /* ... */;--// mod cloud-/// `SpaceInfo::cloud_delete`: only the ...-pub const DELETE_ELSEWHERE: &str = "elsewhere";-/// `SpaceInfo::cloud_delete`: this home ...-pub const DELETE_HERE: &str = "here";--// mod exec-/// Default `space_bash` timeout.-pub const DEFAULT_BASH_TIMEOUT: Duration = _;-/// Characters of each output stream kept ...-pub const MAX_OUTPUT_CHARS: usize = 16_000;--// mod files-/// Chunk used when the driver does not say.-pub const DEFAULT_SEND_CHUNK: usize = _;-/// How long opening a host file or folder ...-pub const HOST_OPEN_TIMEOUT: Duration = _;-/// Largest chunk sent to ...-pub const MAX_SEND_CHUNK: usize = _;--// mod groups-pub const MAX_BOTS: usize = 6;-/// The product bound: a group of one is a ...-pub const MIN_BOTS: usize = 2;--// mod host_spaces-/// Metadata carrying the relay-verified ...-pub const CALLER_METADATA: &str = "x-cua-host-caller";-/// The spacesd feature a host reports ...-pub const HOST_SPACES_FEATURE: &str = "host_spaces";-/// `HostLimit::resource` of a host the ...-pub const STOPPED_SHARING: &str = "sharing";--// mod presence-/// Roster heartbeat interval the SDK asks ...-pub const HEARTBEAT_INTERVAL: Duration = _;-/// The cursor palette, in the server's ...-pub const PALETTE: &[&str] = _;-/// Shortest interval between two cursor ...-pub const SEND_INTERVAL: Duration = _;--// mod presence::art-/// The art JSON, verbatim.-pub const CURSOR_ART_JSON: &str = /* ... */;--// mod presence::view-/// The conformance vectors every ...-pub const CONFORMANCE_JSON: &str = /* ... */;-/// Render delay on the 30 Hz datagram ...-pub const DATAGRAM_DELAY_MS: f64 = 66.0;-/// Longest extrapolation past the newest ...-pub const EXTRAPOLATE_MS: f64 = 100.0;-/// Heartbeat interval the SDKs ask for.-pub const HEARTBEAT_INTERVAL_MS: f64 = 5_000.0;-/// Missed heartbeats before everyone else ...-pub const HEARTBEAT_MISSES: f64 = 3.0;-/// A cursor idle this long starts fading.-pub const IDLE_FADE_AFTER_MS: f64 = 5_000.0;-/// Fade duration.-pub const IDLE_FADE_MS: f64 = 300.0;-/// A jump longer than this (normalized ...-pub const SNAP_DISTANCE: f64 = 0.25;-/// Render delay on the 20 Hz `Join` stream.-pub const STREAM_DELAY_MS: f64 = 100.0;--// mod reattach-/// How often the same re-attach failure is ...-pub const REPEAT_LOG_EVERY: Duration = _;--// mod registry-/// File name of the 0600 credential store.-pub const CREDENTIALS_FILE: &str = "spaces-credentials.json";-/// File name of the direct-host list.-pub const DIRECT_HOSTS_FILE: &str = "direct-hosts.json";-/// Advisory lock file serializing writers ...-pub const LOCK_FILE: &str = "spaces.lock";-/// File name of the registry.-pub const SPACES_FILE: &str = "spaces.json";--// mod routines-/// Marks a routine-originated turn in a ...-pub const ROUTINE_PREFIX: &str = "[routine]";--// mod services-/// Names that mean "the Space's own ...-pub const DRIVER_ALIASES: [&str; 5] = _;-/// The service name of the spacesd's own ...-pub const DRIVER_SERVICE: &str = "driver";--// mod share-/// Relay machine meta: the OS of the Space ...-pub const META_SPACE_OS: &str = "cua.space.os";-/// The spacesd feature a Space needs to be ...-pub const RELAY_ATTACH_FEATURE: &str = "relay_attach";--// mod site_login-/// Default and maximum wait for the user's ...-pub const DEFAULT_WAIT_SECS: u32 = 20;-/// See `DEFAULT_WAIT_SECS`.-pub const MAX_WAIT_SECS: u32 = 120;--// mod stream-/// Bound of the delivery queue.-pub const DELIVERY_QUEUE: usize = 256;-/// A window narrower or shorter than this ...-pub const MIN_STREAMABLE_SIDE: f64 = 40.0;--// mod thumbnails-/// A running Space's thumbnail is captured ...-pub const BACKGROUND_INTERVAL: Duration = _;-/// After a refused capture (a host that ...-pub const DENIED_BACKOFF: Duration = _;-/// Disk cap for the whole cache.-pub const DISK_BYTES: u64 = _;-/// After another failed capture: the first ...-pub const FAILURE_BACKOFF: Duration = _;-/// How long one request keeps the ...-pub const INTEREST_WINDOW: Duration = _;-/// Long edge of a captured thumbnail ...-pub const MAX_DIMENSION: u32 = 320;-/// The longest wait after failed captures.-pub const MAX_FAILURE_BACKOFF: Duration = _;-/// JPEG quality of a captured thumbnail.-pub const QUALITY: u32 = 70;-/// How often the daemon checks which ...-pub const REFRESH_TICK: Duration = _;--// mod volume-/// The guest feature.-pub const VOLUME_FEATURE: &str = "volume.mount";--// mod walk-/// Directories always skipped when ignore ...-pub const ALWAYS_IGNORED_DIRS: [&str; 1] = _;-/// Upper bound on entries in one transfer ...-pub const MAX_ENTRIES: usize = 200_000;-/// Ignore files honored in every directory.-pub const NESTED_IGNORE_FILES: [&str; 2] = _;-/// Ignore files honored at the transfer ...-pub const ROOT_ONLY_IGNORE_FILES: [&str; 1] = _;-```--## Type aliases--```rust-/// A machine row of the relay directory.-pub type RelayMachine = Machine;-/// Result alias.-pub type Result<T, E = Error> = Result<T, E>;--// mod extension-/// A boxed, `Send` future (the extension ...-pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;--// mod hotspot-/// How this machine dials the guest's ...-pub type Dialer = Arc<dyn Fn(String, u16) -> Pin<Box<dyn Future<Output = Result<TcpStream>> + Send>> + Send + Sync>;--// mod presence-/// An open presence datagram channel: the ...-pub type DatagramChannel = (Arc<dyn CursorUplink>, Receiver<PresenceEvent>);-```--## Re-exports--`cua_sandbox_core::byoc::CloudCheck`, `cua_sandbox_core::byoc::CloudConnected`, `cua_sandbox_core::byoc::CloudCredentials`, `cua_sandbox_core::byoc::CloudDisconnected`, `cua_sandbox_core::byoc::CloudKind`, `cua_sandbox_core::byoc::CloudProvider`, `cua_sandbox_core::byoc::CloudResource`, `cua_sandbox_core::byoc::CloudStatusReport`, `cua_sandbox_core::byoc::CloudSweepItem`, `cua_sandbox_core::byoc::CloudSweepReport`, `cua_sandbox_core::byoc::CloudTarget`, `cua_sandbox_core::byoc::CloudTestReport`, `cua_spaces_contract`, `spaces::CreatePhase`, `spaces::CreateProgress`, `cua_spacesd_client`, `cua_mesh::policy::Policy`, `cua_host::relay::AccountTokens`, `cua_host::ConnectedClient`, `cua_host::DEFAULT_RELAY_URL`, `cua_host::DeviceAuth`, `cua_host::Identity`, `cua_host::relay::NoAccount`, `cua_host::relay_url_from_env`, `cua_host::relay::StaticToken`.diff --git a/docs/content/docs/cua-sdk/reference/rust/index.mdx b/docs/content/docs/cua-sdk/reference/rust/index.mdxindex 75833a483c..dff267282a 100644--- a/docs/content/docs/cua-sdk/reference/rust/index.mdx+++ b/docs/content/docs/cua-sdk/reference/rust/index.mdx@@ -16,9 +16,6 @@ Rust hosts (CLIs, Tauri apps, services) use the crates directly instead of a bin| --- | --- | --- || `cua-sdk` | The cua SDK: the only `#[uniffi::export]` crate of `libs/cua`. | [cua-sdk](/cua-sdk/reference/rust/cua-sdk) || `cua-spacesd-client` | Ergonomic async client for cua-spacesd (`cua.env.v1`). | [cua-spacesd-client](/cua-sdk/reference/rust/cua-spacesd-client) |-| `cua-fleet` | Fleet for the cua SDK. | [cua-fleet](/cua-sdk/reference/rust/cua-fleet) |-| `cua-sandbox-core` | One daemon-agnostic `Sandbox` over three providers: | [cua-sandbox-core](/cua-sdk/reference/rust/cua-sandbox-core) |-| `cua-spaces` | Cua Spaces: interactive sandboxes on any image, and everything a person or an agent does with one. cua-spacesd, when the image runs it, adds the desktop ... | [cua-spaces: registry and primitives](/cua-sdk/reference/rust/cua-spaces), [cua-spaces: client](/cua-sdk/reference/rust/cua-spaces-client), [cua-spaces: agents and MCP](/cua-sdk/reference/rust/cua-spaces-agents-mcp) |## Depend on a crate@@ -36,7 +33,7 @@ Inside this repository, use a path dependency (`path = "libs/cua/crates/cua-sdk"- All crates release in lockstep with the SDK version under one `cua-sdk-v<version>` tag. Mix crates from one tag only.- Stable: `cua-sdk` and the `cua-spacesd-client` client. Before 1.0 a minor release may break them, with a deprecated alias kept for at least one minor release where possible (for example `EnvClient`, now `SpacesdClient`). Patch releases never do.-- Unstable: `cua-fleet`, `cua-sandbox-core` and `cua-spaces` follow the Fleet and Spaces services and can change in any minor release. Items named `testing`, `conformance` or `coverage` are test support, not API.+- Unstable: `cua-sandbox-core` and `cua-spaces` follow the Spaces service and can change in any minor release, so they have no pages here: run `cargo doc -p cua-spaces --open` in `libs/cua` to read them. Items named `testing`, `conformance` or `coverage` are test support, not API.- Not API: items hidden from these pages (`#[doc(hidden)]`), the UniFFI scaffolding (`uniffi_*`, `ffi_*`), and cargo features other than the defaults.-Other workspace crates (`cua-proto`, `cua-daemon`, `cua-vmm`, `cua-image`, the media crates, `cua-cli`) are implementation details. The Cua Spaces crates (`cua-spaces-ext`, `cua-spaces-ffi`, `cua-spaces-cli`, `cua-spaces-app-core`, `cua-teleport`, `cua-keyvault`, `cua-volume`) are source-available under FSL-1.1-MIT and not part of the SDK; the Swift API of the app export is on the [Cua Spaces app export pages](/cua-sdk/reference/spaces/app-core). the wire contract is the [protocol reference](/cua-sdk/reference/protocol). Each page shows item summaries and declarations; `cargo doc --open` in `libs/cua` has the full comments.+Other workspace crates (`cua-proto`, `cua-daemon`, `cua-vmm`, `cua-image`, the media crates, `cua-cli`) are implementation details. The Cua Spaces crates (`cua-spaces-ext`, `cua-spaces-ffi`, `cua-spaces-cli`, `cua-spaces-app-core`, `cua-teleport`, `cua-keyvault`, `cua-volume`) are source-available under FSL-1.1-MIT and not part of the SDK. The wire contract is the [protocol reference](/cua-sdk/reference/protocol). Each page shows item summaries and declarations; `cargo doc --open` in `libs/cua` has the full comments.diff --git a/docs/content/docs/cua-sdk/reference/rust/meta.json b/docs/content/docs/cua-sdk/reference/rust/meta.jsonindex 0ee7fbd8de..6585ef8420 100644--- a/docs/content/docs/cua-sdk/reference/rust/meta.json+++ b/docs/content/docs/cua-sdk/reference/rust/meta.json@@ -2,11 +2,6 @@"title": "Rust crates","pages": ["cua-sdk",- "cua-spacesd-client",- "cua-fleet",- "cua-sandbox-core",- "cua-spaces",- "cua-spaces-client",- "cua-spaces-agents-mcp"+ "cua-spacesd-client"]}diff --git a/docs/content/docs/cua-sdk/reference/sandbox/index.mdx b/docs/content/docs/cua-sdk/reference/sandbox.mdxsimilarity index 82%rename from docs/content/docs/cua-sdk/reference/sandbox/index.mdxrename to docs/content/docs/cua-sdk/reference/sandbox.mdxindex 3158017cd9..f46db02b3b 100644--- a/docs/content/docs/cua-sdk/reference/sandbox/index.mdx+++ b/docs/content/docs/cua-sdk/reference/sandbox.mdx@@ -1,6 +1,6 @@---title: "Sandbox"-description: "Create, find, connect to and control sandboxes, locally, in the cloud or by address."+description: "Create, find, connect to and control sandboxes, and their lifecycle: wait, suspend, resume, restart, detach and delete."---{/*@@ -315,7 +315,7 @@ pub async fn create(&self, options: SandboxCreateOptions) -> Result<Arc<Sandbox>| Parameter | Type | Default || --- | --- | --- |-| `options` | [`SandboxCreateOptions`](/cua-sdk/reference/sandbox/options#sandboxcreateoptions-record) | required |+| `options` | [`SandboxCreateOptions`](/cua-sdk/reference/image#sandboxcreateoptions-record) | required |**Returns** [`Sandbox`](#sandbox) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)@@ -672,24 +672,24 @@ Returned by [`Sandboxes.connect`](#sandboxesconnect), [`Sandboxes.connect_url`](| [`spacesd`](#sandboxspacesd) | Attaches to cua-spacesd inside the sandbox (the `env` service or guest port 3211). || [`viewer_url`](#sandboxviewer_url) | A browser link to this sandbox's desktop in the cua-spacesd HTML5 viewer (`/viewer` on the `env` service): video, audio, input, clipboard, file drop and folder sharing, in any modern browser. || [`agents`](/cua-sdk/reference/agents#sandboxagents) | Coding agents inside this sandbox (needs cua-spacesd): run a harness over ACP, stream normalized events, follow up, interrupt, collect results; runs outlive this handle. |-| [`delete`](/cua-sdk/reference/sandbox/lifecycle#sandboxdelete) | Deletes (local: removes it; direct: forgets it; your cloud: deletes the machine). |-| [`detach`](/cua-sdk/reference/sandbox/lifecycle#sandboxdetach) | Forgets the handle this runtime holds (a Cua Cloud claim used to stop renewing; Cua Cloud has ended). |+| [`delete`](/cua-sdk/reference/sandbox#sandboxdelete) | Deletes (local: removes it; direct: forgets it; your cloud: deletes the machine). |+| [`detach`](/cua-sdk/reference/sandbox#sandboxdetach) | Forgets the handle this runtime holds (a Cua Cloud claim used to stop renewing; Cua Cloud has ended). || [`forward`](/cua-sdk/reference/services#sandboxforward) | Forwards a loopback port to guest `port`: a TCP forward locally (and over cua-spacesd's tunnel when the image has it). |-| [`guest_display`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_display) | The guest display without cua-spacesd: the VM's VNC endpoint and a host command that opens it (`lume attach`). |-| [`guest_screenshot`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_screenshot) | Captures the guest framebuffer as PNG without cua-spacesd. |-| [`guest_sh`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_sh) | Runs `line` with `/bin/sh -c` in the guest without cua-spacesd, to completion (default timeout 120 s). |-| [`keep_alive`](/cua-sdk/reference/sandbox/lifecycle#sandboxkeep_alive) | Extends the sandbox's lease by `seconds`, for a provider that has one. |+| [`guest_display`](/cua-sdk/reference/spacesd#sandboxguest_display) | The guest display without cua-spacesd: the VM's VNC endpoint and a host command that opens it (`lume attach`). |+| [`guest_screenshot`](/cua-sdk/reference/spacesd#sandboxguest_screenshot) | Captures the guest framebuffer as PNG without cua-spacesd. |+| [`guest_sh`](/cua-sdk/reference/spacesd#sandboxguest_sh) | Runs `line` with `/bin/sh -c` in the guest without cua-spacesd, to completion (default timeout 120 s). |+| [`keep_alive`](/cua-sdk/reference/sandbox#sandboxkeep_alive) | Extends the sandbox's lease by `seconds`, for a provider that has one. || [`mcp`](/cua-sdk/reference/services#sandboxmcp) | An MCP client (the official Rust SDK) for the MCP server behind `service` at `path` (default `/mcp`). || [`mcp_config`](/cua-sdk/reference/services#sandboxmcp_config) | Where the MCP server behind `service` is (URL of its endpoint at `path`, default `/mcp`, plus the headers every request needs), for any MCP client. |-| [`open_media_bridge`](/cua-sdk/reference/spacesd/media#sandboxopen_media_bridge) | Opens a media session and returns a loopback WebSocket bridge for a webview (daemon mode). |+| [`open_media_bridge`](/cua-sdk/reference/spacesd/computer#sandboxopen_media_bridge) | Opens a media session and returns a loopback WebSocket bridge for a webview (daemon mode). || [`public_url`](/cua-sdk/reference/services#sandboxpublic_url) | A shareable URL for `service` that stops working after `ttl_seconds` (60 s to 24 h, default 1 h): a loopback URL with its own token, served by the cua daemon (started if needed; `CUA_BIN` names the CLI). |-| [`refresh`](/cua-sdk/reference/sandbox/lifecycle#sandboxrefresh) | Fresh info (status from the provider). |-| [`restart`](/cua-sdk/reference/sandbox/lifecycle#sandboxrestart) | Restarts. |-| [`resume`](/cua-sdk/reference/sandbox/lifecycle#sandboxresume) | Resumes. |+| [`refresh`](/cua-sdk/reference/sandbox#sandboxrefresh) | Fresh info (status from the provider). |+| [`restart`](/cua-sdk/reference/sandbox#sandboxrestart) | Restarts. |+| [`resume`](/cua-sdk/reference/sandbox#sandboxresume) | Resumes. || [`revoke_public_url`](/cua-sdk/reference/services#sandboxrevoke_public_url) | Revokes a URL from `public_url`. || [`service`](/cua-sdk/reference/services#sandboxservice) | A named service (for example `"server"` or `"env"`). |-| [`suspend`](/cua-sdk/reference/sandbox/lifecycle#sandboxsuspend) | Suspends. |-| [`wait_ready`](/cua-sdk/reference/sandbox/lifecycle#sandboxwait_ready) | Waits until every probe passes. |+| [`suspend`](/cua-sdk/reference/sandbox#sandboxsuspend) | Suspends. |+| [`wait_ready`](/cua-sdk/reference/sandbox#sandboxwait_ready) | Waits until every probe passes. || Accessor | Returns | Description || --- | --- | --- |@@ -866,7 +866,7 @@ pub async fn viewer_url(&self, options: Option<ViewerOptions>) -> Result<ViewerLA sandbox as listed.-Returned by [`Sandbox.info`](#sandbox), [`Sandbox.refresh`](/cua-sdk/reference/sandbox/lifecycle#sandboxrefresh), [`Sandboxes.get`](#sandboxesget), [`Sandboxes.list`](#sandboxeslist), [`Sandboxes.list_all`](#sandboxeslist_all).+Returned by [`Sandbox.info`](#sandbox), [`Sandbox.refresh`](#sandboxrefresh), [`Sandboxes.get`](#sandboxesget), [`Sandboxes.list`](#sandboxeslist), [`Sandboxes.list_all`](#sandboxeslist_all).| Field | Type | Default | Description || --- | --- | --- | --- |@@ -1361,3 +1361,384 @@ pub fn sandbox_locations() -> Vec<String></Tabs>**Returns** `Vec<String>`++## Lifecycle++Lifecycle calls on a `Sandbox` handle. They act on the container or VM, locally or in the cloud.++Python programs usually use the high-level API instead: [`Sandbox` lifecycle](/cua-sdk/reference/python/sandbox#sandboxdestroy).++## Lifecycle methods++Methods of [`Sandbox`](#sandbox).++### `Sandbox.wait_ready`++Waits until every probe passes.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def wait_ready(self, probes: List[ReadinessProbe], timeout_ms: int) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+waitReady(probes: Array<ReadinessProbe>, timeoutMs: number, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func waitReady(probes: [ReadinessProbe], timeoutMs: UInt32) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun waitReady(probes: List<ReadinessProbe>, timeoutMs: UInt)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn wait_ready(&self, probes: Vec<ReadinessProbe>, timeout_ms: u32) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `probes` | [`Vec<ReadinessProbe>`](/cua-sdk/reference/image#readinessprobe-record) | required |+| `timeout_ms` | `u32` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.refresh`++Fresh info (status from the provider).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def refresh(self) -> SandboxInfo+```++</Tab>+<Tab value="TypeScript">++```ts+refresh(asyncOpts_?: { signal: AbortSignal }): Promise<SandboxInfo>+```++</Tab>+<Tab value="Swift">++```swift+func refresh() async throws -> SandboxInfo+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun refresh(): SandboxInfo+```++</Tab>+<Tab value="Rust">++```rust+pub async fn refresh(&self) -> Result<SandboxInfo, CuaError>+```++</Tab>+</Tabs>++**Returns** [`SandboxInfo`](#sandboxinfo-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.keep_alive`++Extends the sandbox's lease by `seconds`, for a provider that has one.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def keep_alive(self, seconds: int) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+keepAlive(seconds: number, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func keepAlive(seconds: UInt32) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun keepAlive(seconds: UInt)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn keep_alive(&self, seconds: u32) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `seconds` | `u32` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.suspend`++Suspends.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def suspend(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+suspend(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func suspend() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun suspend()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn suspend(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.resume`++Resumes.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def resume(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+resume(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func resume() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun resume()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn resume(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.restart`++Restarts.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def restart(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+restart(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func restart() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun restart()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn restart(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.detach`++Forgets the handle this runtime holds (a Cua Cloud claim used to+stop renewing; Cua Cloud has ended). Embedded runtime only.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def detach(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+detach(): void+```++</Tab>+<Tab value="Swift">++```swift+func detach() throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun detach()+```++</Tab>+<Tab value="Rust">++```rust+pub fn detach(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.delete`++Deletes (local: removes it; direct: forgets it; your cloud: deletes+the machine).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def delete(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+delete_(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func delete() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun delete()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn delete(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdx b/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdxdeleted file mode 100644index be6272d46a..0000000000--- a/docs/content/docs/cua-sdk/reference/sandbox/lifecycle.mdx+++ /dev/null@@ -1,392 +0,0 @@-----title: "Lifecycle"-description: "Wait for, keep alive, suspend, resume, restart, detach and delete a sandbox."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--Lifecycle calls on a `Sandbox` handle. They act on the container or VM, locally or in the cloud.--Python programs usually use the high-level API instead: [`Sandbox` lifecycle](/cua-sdk/reference/python/sandbox#sandboxdestroy).--## Lifecycle methods--Methods of [`Sandbox`](/cua-sdk/reference/sandbox#sandbox).--### `Sandbox.wait_ready`--Waits until every probe passes.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def wait_ready(self, probes: List[ReadinessProbe], timeout_ms: int) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-waitReady(probes: Array<ReadinessProbe>, timeoutMs: number, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func waitReady(probes: [ReadinessProbe], timeoutMs: UInt32) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun waitReady(probes: List<ReadinessProbe>, timeoutMs: UInt)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn wait_ready(&self, probes: Vec<ReadinessProbe>, timeout_ms: u32) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `probes` | [`Vec<ReadinessProbe>`](/cua-sdk/reference/sandbox/options#readinessprobe-record) | required |-| `timeout_ms` | `u32` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.refresh`--Fresh info (status from the provider).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def refresh(self) -> SandboxInfo-```--</Tab>-<Tab value="TypeScript">--```ts-refresh(asyncOpts_?: { signal: AbortSignal }): Promise<SandboxInfo>-```--</Tab>-<Tab value="Swift">--```swift-func refresh() async throws -> SandboxInfo-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun refresh(): SandboxInfo-```--</Tab>-<Tab value="Rust">--```rust-pub async fn refresh(&self) -> Result<SandboxInfo, CuaError>-```--</Tab>-</Tabs>--**Returns** [`SandboxInfo`](/cua-sdk/reference/sandbox#sandboxinfo-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.keep_alive`--Extends the sandbox's lease by `seconds`, for a provider that has one.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def keep_alive(self, seconds: int) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-keepAlive(seconds: number, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func keepAlive(seconds: UInt32) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun keepAlive(seconds: UInt)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn keep_alive(&self, seconds: u32) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `seconds` | `u32` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.suspend`--Suspends.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def suspend(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-suspend(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func suspend() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun suspend()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn suspend(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.resume`--Resumes.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def resume(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-resume(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func resume() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun resume()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn resume(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.restart`--Restarts.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def restart(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-restart(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func restart() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun restart()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn restart(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.detach`--Forgets the handle this runtime holds (a Cua Cloud claim used to-stop renewing; Cua Cloud has ended). Embedded runtime only.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def detach(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-detach(): void-```--</Tab>-<Tab value="Swift">--```swift-func detach() throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun detach()-```--</Tab>-<Tab value="Rust">--```rust-pub fn detach(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.delete`--Deletes (local: removes it; direct: forgets it; your cloud: deletes-the machine).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def delete(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-delete_(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func delete() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun delete()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn delete(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/sandbox/options.mdx b/docs/content/docs/cua-sdk/reference/sandbox/options.mdxdeleted file mode 100644index 2066558bb7..0000000000--- a/docs/content/docs/cua-sdk/reference/sandbox/options.mdx+++ /dev/null@@ -1,100 +0,0 @@-----title: "Create options"-description: "SandboxCreateOptions and what it holds: cloud options, readiness probes and sidecar containers."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--`Sandboxes.create` takes one `SandboxCreateOptions`. Every field means the same thing locally and in the cloud; `on` picks where the sandbox runs, `kind` and `runtime` what runs it.--Python programs usually use the high-level API instead: [`Sandbox.create` parameters](/cua-sdk/reference/python/sandbox#sandboxcreate).--## `SandboxCreateOptions` record--Options for `Sandboxes.create`.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `on` | `Option<String>` | `None` | Where it runs: `local`, `cloud`, `direct:<addr>` (an existing machine running cua-spacesd) or a registered provider. `None` (the default): the cloud when `cloud` options (or the deprecated flat cloud fields) are set, else the user default (`default.on` in `~/.cua/config.toml`, `CUA_DEFAULT_ON`, else `local`). `local` together with `cloud` is an `InvalidArgument`. |-| `kind` | `Option<String>` | `None` | What kind of machine: `auto`, `container` or `vm`. `None`: the user default (`default.kind`, else `auto`: macOS and Windows images are VMs, an image with a container rootfs is a container, a disk-only image is a VM). |-| `runtime` | `Option<String>` | `None` | Which engine: `auto` or one the location offers for the kind (local `gvisor`, `runc`, `qemu`, `lume`; cloud `gvisor`, `kubevirt`). `None`: the user default (`default.runtime`, else `auto`, the safest available). A local sandbox with sidecars needs `runc` where gVisor would run. A combination that does not exist is `InvalidPlacement`, listing the valid values. |-| `image` | `String` | `""` | Image reference. Locally, `pool:<name>` runs that cloud pool's template image. |-| `name` | `Option<String>` | `None` | Name. `None`: ephemeral (cloud: released with the sandbox; the managed capacity stays for reuse). |-| `token` | `Option<String>` | `None` | spacesd token. |-| `pool` | `Option<String>` | `None` | Cua Cloud has ended: a pool fails with the "Cua Cloud has ended" error. |-| `os` | `Option<String>` | `None` | Guest OS (`linux`, `macos`, `windows`). |-| `cpus` | `Option<u32>` | `None` | vCPUs. |-| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory (MiB). |-| `ports` | `Vec<u16>` | `[]` | Extra guest ports (local: published). |-| `services` | `HashMap<String, u16>` | `[:]` | Named services (name → guest port). `env` defaults to 3211. |-| `wait_for` / `waitFor` | [`Vec<ReadinessProbe>`](#readinessprobe-record) | `[]` | Readiness probes. |-| `ready_timeout_ms` / `readyTimeoutMs` | `Option<u32>` | `None` | Readiness budget (default 10 min). |-| `env` | `HashMap<String, String>` | `[:]` | Guest environment (local: container environment or cloud-init; values are not secrets). |-| `fleet_replicas` / `fleetReplicas` | `Option<u32>` | `None` | Deprecated, and Cua Cloud has ended: initial replicas of a new managed pool (> 0 = warm). |-| `fleet_ttl_seconds` / `fleetTtlSeconds` | `Option<u32>` | `None` | Deprecated: use `cloud.claim_ttl_seconds`. |-| `warm` | `Option<bool>` | `None` | Deprecated: use `cloud.warm`. |-| `max_pool_size` / `maxPoolSize` | `Option<u32>` | `None` | Deprecated: use `cloud.max_pool_size`. |-| `command` | `Option<Vec<String>>` | `None` | The sandbox's command (argv), replacing the image's entrypoint. Same meaning local (container ENTRYPOINT, or run by cloud-init in a Linux VM) and in the cloud (the template command with `processMode: Run`, on gVisor and KubeVirt). |-| `cloud` | [`Option<CloudOptions>`](#cloudoptions-record) | `None` | Advanced cloud options (warm capacity, limits, TTL, runtime, a dedicated pool). They win over the deprecated flat fields. |-| `sidecars` | [`Vec<Container>`](#container-record) | `[]` | Sidecar containers, addressed by name (see `Container`). |-| `registry_secret` / `registrySecret` | [`Option<RegistrySecret>`](/cua-sdk/reference/image#registrysecret-enum) | `None` | Credentials for a private `image` (and sidecar images on its registry). |-| `build` | [`Option<ImageBuild>`](/cua-sdk/reference/image#imagebuild-record) | `None` | Image layers built on top of `image` (cloud: a remote build; local: a build into the container engine; both cached by content). |-| `network` | `Option<String>` | `None` | Guest network: `"default"` (unset) gives outbound network, like a Docker container; `"none"` cuts it while published ports still work. Only local QEMU VMs honour `"none"`; containers, Lume and cloud sandboxes reject it. |-| `overlays` | [`Vec<Overlay>`](/cua-sdk/reference/sandbox#overlay-record) | `[]` | Binaries to inject once the sandbox is up, so tests run the build under test and not the copy the image bundles (see `Overlay`; the same as calling `Sandbox.overlay` after create). Needs cua-spacesd in the image, or a local container. |-| `keep_on_failure` / `keepOnFailure` | `bool` | `false` | Keep a named sandbox whose readiness check fails (its cloud claim, VM or container, and its record) to debug it. `false` (the default): a failed create deletes what it made and releases the claim. Ephemeral sandboxes are always deleted. |-| `gpu` | `Option<String>` | `None` | A GPU option of the runtime it runs on (`Spaces.gpu_support` lists them): `paravirtual` (a macOS VM on Lume: GPU acceleration, experimental), `virgl` (QEMU on Linux), `nvidia` (a runc container on Linux), a contrib provider's GPU type; `auto` picks the runtime's own. `None` (the default): no GPU. |--## `CloudOptions` record--Advanced options for cloud sandboxes (warm capacity, limits, TTL, a-dedicated pool). Leave unset for the defaults. Setting them with `on`-unset means the cloud; with `on = "local"` they are an error.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `warm` | `Option<bool>` | `None` | Keep one warm replica of this image ready (faster next start). |-| `max_pool_size` / `maxPoolSize` | `Option<u32>` | `None` | Most sandboxes of this image at once (default 10). |-| `claim_ttl_seconds` / `claimTtlSeconds` | `Option<u32>` | `None` | Seconds the sandbox outlives this process without a keep-alive (renewed while held; default 15 min). |-| `pool` | `Option<String>` | `None` | Dedicated capacity: claim from this existing pool. The sandbox fields given alongside (image, command, env, services, sidecars, cpus, memory) must match its template, or creation fails with `PoolSpecMismatch` and a diff. |-| `apply` | `bool` | `false` | With `pool`: update the pool's template to the given fields instead of failing on a mismatch. Cua Cloud has ended: ignored. |--## `ReadinessProbe` record--A user-declared readiness probe. With no probes a sandbox is ready as-soon as its provider reports it running; nothing assumes a guest daemon.--Name a declared service (`service = "mcp"`) or a guest port.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `port` | `u16` | `0` | Guest port (0 with `service`). |-| `http_path` / `httpPath` | `Option<String>` | `None` | HTTP path; `None` is a TCP connect probe. |-| `http_status` / `httpStatus` | `Option<u16>` | `None` | Exact HTTP status to wait for; `None` accepts any 2xx. |-| `service` | `Option<String>` | `None` | A declared service whose guest port to probe (instead of `port`). |--## `Container` record--An extra container next to a sandbox (a compose-style sidecar),-addressed by name on every runtime: the sandbox reaches it at its-`name` (on its `ports`), it reaches the sandbox at `main`, and-`services` may name its ports (`{"db": 5432}`). Local containers run it-in the sandbox's network namespace (`localhost` works too; needs-`runtime="runc"`); cloud gVisor sandboxes run it in the same pod; cloud-VM (KubeVirt) sandboxes run it in a companion pod named in the guest's-`/etc/hosts`. Local VM sandboxes refuse sidecars. With sidecars the-service names `main`, `sidecars` and `sc` are reserved.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image` | `String` | | Image reference. |-| `command` | `Option<Vec<String>>` | `None` | argv replacing the image's entrypoint. |-| `env` | `HashMap<String, String>` | `[:]` | Environment (plain values, not secrets). |-| `ports` | `Vec<u16>` | `[]` | Ports it listens on. |-| `name` | `Option<String>` | `None` | Name, unique within the sandbox, and its hostname (not `main`). Unset: from the image (`redis`). |diff --git a/docs/content/docs/cua-sdk/reference/sandbox/without-spacesd.mdx b/docs/content/docs/cua-sdk/reference/sandbox/without-spacesd.mdxdeleted file mode 100644index 8e46305f84..0000000000--- a/docs/content/docs/cua-sdk/reference/sandbox/without-spacesd.mdx+++ /dev/null@@ -1,231 +0,0 @@-----title: "Without cua-spacesd"-description: "Run commands, take screenshots and open the display of a local Lume sandbox that has no cua-spacesd."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--The macOS 15 image ships no cua-spacesd, so `sandbox.spacesd()` fails for it (macOS 26 runs cua-spacesd). A local Lume sandbox is still reachable: commands over `lume ssh`, screenshots and the display over the VM's VNC endpoint. `cua sb exec`, `cua sb screenshot` and `cua sb view` use the same calls. Other sandboxes fail with `Unsupported`.--Python programs usually use the high-level API instead: [`cua_sandbox` shell and screen](/cua-sdk/reference/python/interfaces).--## Agentless methods--Methods of [`Sandbox`](/cua-sdk/reference/sandbox#sandbox).--### `Sandbox.lacks_spacesd`--Whether this sandbox has no cua-spacesd: it declares no `env`-service, or its image says it does not carry one. `spacesd()` fails-for these; `guest_sh`, `guest_screenshot` and `guest_display` reach a-local Lume sandbox without it.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def lacks_spacesd(self) -> bool-```--</Tab>-<Tab value="TypeScript">--```ts-lacksSpacesd(): boolean-```--</Tab>-<Tab value="Swift">--```swift-func lacksSpacesd() -> Bool-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun lacksSpacesd(): Boolean-```--</Tab>-<Tab value="Rust">--```rust-pub fn lacks_spacesd(&self) -> bool-```--</Tab>-</Tabs>--**Returns** `bool`--### `Sandbox.guest_sh`--Runs `line` with `/bin/sh -c` in the guest without cua-spacesd, to-completion (default timeout 120 s). Local macOS Lume sandboxes only:-over `lume ssh`, stdout and stderr kept apart, no stdin. Others fail-with `Unsupported`.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def guest_sh(self, line: str, timeout_ms: Optional[int] = None) -> ProcessOutput-```--</Tab>-<Tab value="TypeScript">--```ts-guestSh(line: string, timeoutMs: number | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>-```--</Tab>-<Tab value="Swift">--```swift-func guestSh(line: String, timeoutMs: UInt32? = nil) async throws -> ProcessOutput-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun guestSh(line: String, timeoutMs: UInt? = null): ProcessOutput-```--</Tab>-<Tab value="Rust">--```rust-pub async fn guest_sh(&self, line: String, timeout_ms: Option<u32>) -> Result<ProcessOutput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `line` | `String` | required |-| `timeout_ms` | `Option<u32>` | `None` |--**Returns** [`ProcessOutput`](/cua-sdk/reference/spacesd/shell#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`Unsupported`](/cua-sdk/reference/errors#unsupported))--### `Sandbox.guest_screenshot`--Captures the guest framebuffer as PNG without cua-spacesd. Local-Lume sandboxes only: over the VM's VNC endpoint.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def guest_screenshot(self) -> Screenshot-```--</Tab>-<Tab value="TypeScript">--```ts-guestScreenshot(asyncOpts_?: { signal: AbortSignal }): Promise<Screenshot>-```--</Tab>-<Tab value="Swift">--```swift-func guestScreenshot() async throws -> Screenshot-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun guestScreenshot(): Screenshot-```--</Tab>-<Tab value="Rust">--```rust-pub async fn guest_screenshot(&self) -> Result<Screenshot, CuaError>-```--</Tab>-</Tabs>--**Returns** [`Screenshot`](/cua-sdk/reference/spacesd/computer#screenshot-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Sandbox.guest_display`--The guest display without cua-spacesd: the VM's VNC endpoint and a-host command that opens it (`lume attach`). Local Lume sandboxes-only.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def guest_display(self) -> GuestDisplay-```--</Tab>-<Tab value="TypeScript">--```ts-guestDisplay(asyncOpts_?: { signal: AbortSignal }): Promise<GuestDisplayLike>-```--</Tab>-<Tab value="Swift">--```swift-func guestDisplay() async throws -> GuestDisplay-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun guestDisplay(): GuestDisplay-```--</Tab>-<Tab value="Rust">--```rust-pub async fn guest_display(&self) -> Result<Arc<GuestDisplay>, CuaError>-```--</Tab>-</Tabs>--**Returns** [`GuestDisplay`](#guestdisplay) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `GuestDisplay`--The guest display of a sandbox without cua-spacesd-(`Sandbox.guest_display`). An object, not a record, so no binding's-default string form (repr, str, description, toString, Debug) can show-the VNC password: `url()` is masked, and only the explicit-`url_with_password()` returns it.--Returned by [`Sandbox.guest_display`](#sandboxguest_display).--| Accessor | Returns | Description |-| --- | --- | --- |-| `open_command()` | `Vec<String>` | A host command that opens a viewer on it (`lume attach <vm>`); empty when there is none. It handles the password itself. |-| `url()` | `String` | The display URL (`vnc://HOST:PORT`) with any password masked as `****`. Safe to print and log. |-| `url_with_password()` | `String` | SENSITIVE: the display URL with the VNC password (`vnc://:PASSWORD@HOST:PORT`), for handing to a VNC client. Never print or log it. |-| `via()` | `String` | How the display is reached (`vnc`). |diff --git a/docs/content/docs/cua-sdk/reference/services.mdx b/docs/content/docs/cua-sdk/reference/services.mdxindex e0ebf54dd3..52c79aef5d 100644--- a/docs/content/docs/cua-sdk/reference/services.mdx+++ b/docs/content/docs/cua-sdk/reference/services.mdx@@ -14,7 +14,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';Reach ports inside a sandbox: `sandbox.service(name)` for a declared service, `sandbox.forward(port)` for any port, `sandbox.public_url(...)` for a shareable URL, and `McpClient` for an MCP server. None of them needs cua-spacesd.-Python programs usually use the high-level API instead: [`cua_sandbox` services, tunnels and MCP](/cua-sdk/reference/python/services).+Python programs usually use the high-level API instead: [`cua_sandbox` services, tunnels and MCP](/cua-sdk/reference/python/sandbox#services-tunnels-and-mcp).| To reach a guest port | Use | Works || --- | --- | --- |diff --git a/docs/content/docs/cua-sdk/reference/spaces/account-app-core.mdx b/docs/content/docs/cua-sdk/reference/spaces/account-app-core.mdxdeleted file mode 100644index 9db1b4c496..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/account-app-core.mdx+++ /dev/null@@ -1,289 +0,0 @@-----title: "App core: billing, relay usage and Teams"-description: "The Billing and Relay usage rows in Settings, the out-of-credit and relay allowance notices, and the Teams section."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The apps take no payment details: the website handles credit and cards. `app_billing_status` turns `Fleet.billing_status` into the core's `AppBillingStatus`, which Settings shows as the credit left and "Manage billing" (the website billing page). A cloud Space that Fleet refuses for want of credit (`CuaError::CloudCreditExhausted`) shows `AppCreditNotice`: one line and "Add credit", which opens the same page. Local Spaces never depend on it. `app_relay_usage` reads the account's relay allowance this month from the relay (`GET /v1/usage`, as `cua usage` does); `app_relay_usage_view` derives the Settings row and, past the allowance, `AppRelayAllowanceNotice`: one line with Upgrade. Nothing stops at the limit. `app_teams` turns the account's `AppTeamsInput` into the Teams rows of Settings: the signed-in state, each team with its people and the role of each.--## `AppCreditNotice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | `OUT_OF_CREDIT`. |-| `button` | `String` | | `ADD_CREDIT`. |-| `url` | `String` | | The website billing page. |--## `AppBillingCard` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `brand` | `String` | | `visa`, `mastercard`, ... |-| `last4` | `String` | | Last four digits. |--## `AppBillingCredit` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `balance_usd_cents` / `balanceUsdCents` | `i64` | | What is left, US cents. |--## `AppBillingStatus` record--Returned by [`app_billing_status`](#app_billing_status).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `billing_enabled` / `billingEnabled` | `bool` | | Billing is on for this account (off: Settings shows no Billing row). |-| `card` | [`Option<AppBillingCard>`](#appbillingcard-record) | | The saved default card. |-| `credit` | [`Option<AppBillingCredit>`](#appbillingcredit-record) | | The account's credit, when it has any. |-| `billing_url` / `billingUrl` | `Option<String>` | | The website billing page (credit, cards, plans). |--## `AppRelayAllowanceNotice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | "You've used your free relay allowance for this month. ..." |-| `upgrade` | `String` | | `UPGRADE`. |-| `upgrade_url` / `upgradeUrl` | `Option<String>` | | What Upgrade opens; none: no Upgrade button. |-| `dismiss` | `String` | | `DISMISS`. |-| `dismiss_key` / `dismissKey` | `String` | | What a dismissal remembers: the month and the reasons. A new month, or another limit reached, shows the notice again. |-| `level` | `String` | | `warn` (80% of the relay hours) or `limit` (the allowance is used). A `warn` is a prompt: the shells hold it back while a live session or an agent run is going (`crate.upsell`). A `limit` is only the status, so it always shows. |--## `AppRelayUsage` record--Returned by [`app_relay_usage`](#app_relay_usage).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `metered` | `bool` | | The relay meters this account (false: no allowance applies). |-| `period` | `String` | | The month counted (`2026-10`). |-| `plan` | `String` | | `free`, `pro`, `team`, ... |-| `team` | [`Option<AppRelayUsageTeam>`](#apprelayusageteam-record) | | The team whose allowance is pooled. |-| `live_sessions` / `liveSessions` | `u32` | | Live sessions now. |-| `live_sessions_limit` / `liveSessionsLimit` | `Option<u32>` | | Live sessions allowed at once (none: no limit). |-| `hours_used` / `hoursUsed` | `f64` | | Relay hours used this month (the team's, when pooled). |-| `hours_limit` / `hoursLimit` | `Option<f64>` | | Relay hours allowed this month (none: no limit). |-| `my_hours_used` / `myHoursUsed` | `f64` | | This account's own relay hours this month. |-| `soft_limit_reached` / `softLimitReached` | `bool` | | Past the allowance (sessions keep working). |-| `reasons` | `Vec<String>` | | What is past it: `sessions` and/or `hours`. |-| `upgrade_url` / `upgradeUrl` | `Option<String>` | | Where to get more (https only; see `checked`). |--## `AppRelayUsageTeam` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Team id. |-| `seats` | `u32` | | Seats sharing the allowance. |--## `AppRelayUsageView` record--Returned by [`app_relay_usage_view`](#app_relay_usage_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | `ROW_LABEL`. |-| `line` | `String` | | "Live sessions 1 of 2 · Relay hours 6.5 of 20 this month", then the team pool when there is one. |-| `plan` | `String` | | "Free plan" (empty when the relay names none). |-| `notice` | [`Option<AppRelayAllowanceNotice>`](#apprelayallowancenotice-record) | | At 80% of the relay hours, or past the allowance. |-| `plan_card` / `planCard` | [`AppPlanCard`](/cua-sdk/reference/spaces/app-core#appplancard-record) | | Settings' plan card. |--## `AppTeamInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `alias` | `String` | | The org's slug. |-| `name` | `String` | | Its display name (empty: use the alias). |-| `role` | `String` | | The account's role in it. |-| `plan` | `String` | | `free`, `teams`, ... |-| `seats` | `i64` | | Paid seats. |-| `members` | [`Vec<AppTeamPersonInput>`](#appteampersoninput-record) | | |-| `invites` | `Vec<String>` | | Pending invites' emails (only owners and admins can read them). |--## `AppTeamPersonInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `email` | `String` | | |-| `role` | `String` | | `owner`, `admin` or `member`. |--## `AppTeamsInput` record--Returned by [`app_teams`](#app_teams).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `account_app_url` / `accountAppUrl` | `String` | | The account app for this environment (`https://app.cua.ai`, or `https://app.staging.cua.ai` under `CUA_ENV=staging`). |-| `state` | [`AppTeamsState`](#appteamsstate-enum) | | |-| `current_team_id` / `currentTeamId` | `Option<String>` | | The saved current team (`AppSettings::current_team_id`). |--## `AppTeamsState` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.signedOut-.unread-.loading-.failed(message: String)-.ready(teams: [AppTeamInput])-```--</Tab>-<Tab value="Rust">--```rust-AppTeamsState::SignedOut-AppTeamsState::Unread-AppTeamsState::Loading-AppTeamsState::Failed { message: String }-AppTeamsState::Ready { teams: Vec<AppTeamInput> }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SignedOut` | Not signed in. |-| `Unread` | Signed in, but this host does not read teams: only the links. |-| `Loading` | Being read. |-| `Failed` | The read failed. Fields: `message: String` |-| `Ready` | The account's teams (maybe none). Fields: `teams: Vec<AppTeamInput>` |--## `app_billing_status`--The SDK's billing status as the app core takes it (Settings' Billing-row).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appBillingStatus(status: FleetBillingStatus) -> AppBillingStatus-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_billing_status(status: FleetBillingStatus) -> AppBillingStatus-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `status` | [`FleetBillingStatus`](/cua-sdk/reference/fleet/images#fleetbillingstatus-record) | required |--**Returns** [`AppBillingStatus`](#appbillingstatus-record)--## `app_relay_usage`--The account's relay allowance this month (`GET /v1/usage` on the relay-`devices` uses, as `cua usage` reads it) with `account_token`; none-from a relay that meters nothing. Both Spaces apps read it here.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appRelayUsage(devices: Devices, accountToken: String) async throws -> AppRelayUsage?-```--</Tab>-<Tab value="Rust">--```rust-pub async fn app_relay_usage(devices: Arc<Devices>, account_token: String) -> Result<Option<AppRelayUsage>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `devices` | [`Devices`](/cua-sdk/reference/spaces/devices#devices) | required |-| `account_token` | `String` | required |--**Returns** [`Option<AppRelayUsage>`](#apprelayusage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_relay_usage_view`--Settings' "Relay usage" row and the notice past the allowance; none-when the relay meters nothing.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appRelayUsageView(usage: AppRelayUsage) -> AppRelayUsageView?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_relay_usage_view(usage: AppRelayUsage) -> Option<AppRelayUsageView>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `usage` | [`AppRelayUsage`](#apprelayusage-record) | required |--**Returns** [`Option<AppRelayUsageView>`](#apprelayusageview-record)--## `app_teams`--The account's Teams (the organizations of `GET /v1/me` on the Spaces-API for this environment, `api.cua.ai` or `api.staging.cua.ai`), each-with its members and pending invites, read with `account_token`.-Both Spaces apps read Teams here; Settings words them-(`app_settings_page`'s `teams`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTeams(accountToken: String) async throws -> AppTeamsInput-```--</Tab>-<Tab value="Rust">--```rust-pub async fn app_teams(account_token: String) -> Result<AppTeamsInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `account_token` | `String` | required |--**Returns** [`AppTeamsInput`](#appteamsinput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## All items--16 items, across this page and its subpages, grouped by page (each item's section is on its page). Methods are listed on their object.--**App core: billing, relay usage and Teams**: [`app_billing_status`](#app_billing_status), [`app_relay_usage`](#app_relay_usage), [`app_relay_usage_view`](#app_relay_usage_view), [`app_teams`](#app_teams), [`AppBillingCard`](#appbillingcard-record), [`AppBillingCredit`](#appbillingcredit-record), [`AppBillingStatus`](#appbillingstatus-record), [`AppCreditNotice`](#appcreditnotice-record), [`AppRelayAllowanceNotice`](#apprelayallowancenotice-record), [`AppRelayUsage`](#apprelayusage-record), [`AppRelayUsageTeam`](#apprelayusageteam-record), [`AppRelayUsageView`](#apprelayusageview-record), [`AppTeamInput`](#appteaminput-record), [`AppTeamPersonInput`](#appteampersoninput-record), [`AppTeamsInput`](#appteamsinput-record), [`AppTeamsState`](#appteamsstate-enum)diff --git a/docs/content/docs/cua-sdk/reference/spaces/agents-app-core.mdx b/docs/content/docs/cua-sdk/reference/spaces/agents-app-core.mdxdeleted file mode 100644index 658af60637..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/agents-app-core.mdx+++ /dev/null@@ -1,1027 +0,0 @@-----title: "App core: agents, drive, notifications"-description: "The Agents page (persistent agents, memory, routines, computer access), the Drive page and the notifications the apps post."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_agents_reduce` and `app_agents_view` drive the Agents page from the daemon's persistent-agent, drive and routine tools; `app_drive_*` the Drive page; `app_notifications_plan` says which feed entries to post as system notifications (each once, none of the backlog on first run) and `app_notifications_view` draws the list.--## `AppLineView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `text` | `String` | | |-| `trailing` | `String` | | Right-aligned secondary text. |-| `action_label` / `actionLabel` | `Option<String>` | | |-| `secondary_label` / `secondaryLabel` | `Option<String>` | | A second action (Deny next to Approve). |-| `on` | `Option<bool>` | | |--## `AppDriveEntryInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | |-| `name` | `String` | | |-| `folder` | `bool` | | |-| `size` | `u64` | | |--## `AppSystemNote` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `title` | `String` | | |-| `body` | `String` | | |--## `app_agent_rows`--A Space's agent rows from its run records (`Space.agent_list()`'s-`json`, one record each): attention first, then newest. The same mapping-the Tauri app uses.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentRows(runsJson: [String]) -> [AppSpaceAgentRun]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_rows(runs_json: Vec<String>) -> Vec<AppSpaceAgentRun>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `runs_json` | `Vec<String>` | required |--**Returns** [`Vec<AppSpaceAgentRun>`](/cua-sdk/reference/spaces/app-core/spaces#appspaceagentrun-record)--## `app_agent_status_label`--A run's status word ("Running", "Idle", ...).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentStatusLabel(status: AppAgentStatus) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_status_label(status: AppAgentStatus) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `status` | [`AppAgentStatus`](/cua-sdk/reference/spaces/app-core/spaces#appagentstatus-enum) | required |--**Returns** `String`--## `app_agent_subtitle`--The line under an agent's name.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSubtitle(run: AppSpaceAgentRun) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_subtitle(run: AppSpaceAgentRun) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `run` | [`AppSpaceAgentRun`](/cua-sdk/reference/spaces/app-core/spaces#appspaceagentrun-record) | required |--**Returns** `String`--## `AppAccessAuditInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ts_ms` / `tsMs` | `u64` | | |-| `action` | `String` | | `grant`, `revoke`, `use`, `denied`. |-| `principal` | `String` | | `agent:ada` or `user`. |-| `path` | `String` | | The machine. |-| `detail` | `String` | | |--## `AppAgentDetailView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | |-| `subtitle` | `String` | | `Home: agents/ada/ · saved 5m ago` (one line). |-| `tabs` | [`Vec<AppTabView>`](#apptabview-record) | | |-| `memory` | [`Vec<AppLineView>`](#applineview-record) | | |-| `memory_empty` / `memoryEmpty` | `String` | | |-| `file` | [`Option<AppFileView>`](#appfileview-record) | | |-| `routines` | [`Vec<AppLineView>`](#applineview-record) | | |-| `routines_empty` / `routinesEmpty` | `String` | | |-| `form` | [`AppRoutineForm`](#approutineform-record) | | |-| `schedules` | [`Vec<AppLineView>`](#applineview-record) | | |-| `can_add_routine` / `canAddRoutine` | `bool` | | |-| `add_routine_label` / `addRoutineLabel` | `String` | | |-| `access` | [`Vec<AppLineView>`](#applineview-record) | | |-| `access_empty` / `accessEmpty` | `String` | | |-| `allow_this_machine_label` / `allowThisMachineLabel` | `Option<String>` | | `Allow on this Mac` when this machine is set up and not granted. |-| `audit` | [`Vec<AppLineView>`](#applineview-record) | | |-| `error` | `Option<String>` | | |--## `AppAgentRowView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | |-| `detail` | `String` | | `Hermes in local:dev`. |-| `state` | `String` | | `Running`, `Idle`, `Paused`. |-| `action_label` / `actionLabel` | `String` | | `Pause` or `Resume`. |-| `selected` | `bool` | | |--## `AppAgentsInput` record--Returned by [`app_agents_input_from_json`](#app_agents_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `agents` | [`Vec<AppPersistentAgentInput>`](#apppersistentagentinput-record) | | |-| `home` | [`Vec<AppDriveEntryInput>`](#appdriveentryinput-record) | | The selected agent's home, `agents/<name>/`, recursively (files only). |-| `file` | [`Option<AppOpenFileInput>`](#appopenfileinput-record) | | The file the shell loaded for the open path. |-| `routines` | [`Vec<AppRoutineInput>`](#approutineinput-record) | | The selected agent's routines. |-| `grants` | [`Vec<AppComputerGrantInput>`](#appcomputergrantinput-record) | | Every computer grant. |-| `audit` | [`Vec<AppAccessAuditInput>`](#appaccessauditinput-record) | | Recent computer-access audit lines, newest first. |-| `this_machine` / `thisMachine` | `Option<String>` | | This machine's Space id when it is set up for access (`relay:<id>`). |--## `AppAgentsState` record--Returned by [`app_agents_initial`](#app_agents_initial), [`app_agents_reduce`](#app_agents_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `selected` | `Option<String>` | | |-| `tab` | [`AppAgentTab`](#appagenttab-enum) | | |-| `open_path` / `openPath` | `Option<String>` | | The memory file open in the detail. |-| `form` | [`AppRoutineForm`](#approutineform-record) | | |-| `busy` | `bool` | | |-| `error` | `Option<String>` | | |-| `request` | [`Option<AppAgentsRequest>`](#appagentsrequest-enum) | | |--## `AppAgentsView` record--Returned by [`app_agents_view`](#app_agents_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `rows` | [`Vec<AppAgentRowView>`](#appagentrowview-record) | | |-| `empty_text` / `emptyText` | `String` | | |-| `detail` | [`Option<AppAgentDetailView>`](#appagentdetailview-record) | | |-| `busy` | `bool` | | |-| `error` | `Option<String>` | | |-| `request` | [`Option<AppAgentsRequest>`](#appagentsrequest-enum) | | |-| `request_text` / `requestText` | `Option<String>` | | `AgentsRequest.text` of `request`. |--## `AppComputerGrantInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `String` | | |-| `machine` | `String` | | |-| `revoked` | `bool` | | |--## `AppDriveGrantInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `principal` | `String` | | |-| `prefix` | `String` | | |-| `mode` | `String` | | |-| `revoked` | `bool` | | |--## `AppDriveInput` record--Returned by [`app_drive_input_from_json`](#app_drive_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `requests` | [`Vec<AppDriveRequestInput>`](#appdriverequestinput-record) | | |-| `grants` | [`Vec<AppDriveGrantInput>`](#appdrivegrantinput-record) | | |-| `now_ms` / `nowMs` | `u64` | | Now (Unix ms), for "synced 5m ago". |-| `mount` | [`Option<AppDriveMountInput>`](/cua-sdk/reference/spaces/volume-app-core#appdrivemountinput-record) | | `volume_mount_status`, once read. |-| `sync` | [`Option<AppDriveSyncInput>`](/cua-sdk/reference/spaces/volume-app-core#appdrivesyncinput-record) | | `volume_sync_status`, once read. |-| `home` | `Option<String>` | | The home folder, to show the mount point as `~/...`. |--## `AppDriveRequestInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `principal` | `String` | | `agent:ada`. |-| `prefix` | `String` | | |-| `mode` | `String` | | `r` or `rw`. |-| `reason` | `String` | | |--## `AppDriveState` record--Returned by [`app_drive_initial`](#app_drive_initial), [`app_drive_reduce`](#app_drive_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `busy` | `bool` | | |-| `error` | `Option<String>` | | |-| `request` | [`Option<AppDriveRequest>`](#appdriverequest-enum) | | |--## `AppDriveView` record--Returned by [`app_drive_view`](#app_drive_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `requests_title` / `requestsTitle` | `String` | | |-| `requests` | [`Vec<AppLineView>`](#applineview-record) | | |-| `grants_title` / `grantsTitle` | `String` | | |-| `grants` | [`Vec<AppLineView>`](#applineview-record) | | |-| `grants_empty` / `grantsEmpty` | `String` | | |-| `busy` | `bool` | | |-| `error` | `Option<String>` | | |-| `request` | [`Option<AppDriveRequest>`](#appdriverequest-enum) | | |-| `request_text` / `requestText` | `Option<String>` | | `DriveRequest.text` of `request`. |-| `open_label` / `openLabel` | `Option<String>` | | "Open in Finder" (Linux: "Open folder"): mounts first when the volume is not mounted. None where it cannot mount. |-| `mount_path` / `mountPath` | `Option<String>` | | The mount point, when mounted. |-| `mount_line` / `mountLine` | `Option<String>` | | One quiet line: where it is mounted ("In Finder at ~/Cua Volume"), or that it is not. |-| `devices_title` / `devicesTitle` | `String` | | "Devices". |-| `devices` | [`Vec<AppLineView>`](#applineview-record) | | One line per device, this one first: when it last synced, what is pending. |-| `sync_note` / `syncNote` | `Option<String>` | | Why nothing syncs, or the feed's error. |-| `sync_error` / `syncError` | `bool` | | The note is an error. |-| `conflicts_title` / `conflictsTitle` | `String` | | "Conflicts". |-| `conflicts` | [`Vec<AppConflictView>`](/cua-sdk/reference/spaces/volume-app-core#appconflictview-record) | | |--## `AppFileVersionInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `version` | `String` | | |-| `modified_ms` / `modifiedMs` | `u64` | | |-| `deleted` | `bool` | | |-| `latest` | `bool` | | |--## `AppFileView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | |-| `text` | `String` | | |-| `versions` | [`Vec<AppLineView>`](#applineview-record) | | |-| `close_label` / `closeLabel` | `String` | | |--## `AppNotificationInput` record--Returned by [`app_notifications_from_json`](#app_notifications_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `at_ms` / `atMs` | `u64` | | |-| `agent` | `Option<String>` | | |-| `kind` | `String` | | `turn_ended`, `message`, `approval`, `error`. |-| `title` | `String` | | |-| `body` | `String` | | |-| `read` | `bool` | | |--## `AppNotificationsPlan` record--Returned by [`app_notifications_plan`](#app_notifications_plan).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `post` | [`Vec<AppSystemNote>`](#appsystemnote-record) | | |-| `seen_ms` / `seenMs` | `u64` | | The new `notifications_seen_ms` (unchanged when nothing is newer). |--## `AppNotificationsView` record--Returned by [`app_notifications_view`](#app_notifications_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `rows` | [`Vec<AppLineView>`](#applineview-record) | | One line each: `title: body`, the time on the right; `on` is unread. |-| `empty_text` / `emptyText` | `String` | | |-| `unread` | `u32` | | |-| `mark_all_label` / `markAllLabel` | `Option<String>` | | |--## `AppOpenFileInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | |-| `text` | `String` | | The text (empty for a binary file). |-| `binary` | `bool` | | |-| `versions` | [`Vec<AppFileVersionInput>`](#appfileversioninput-record) | | |--## `AppPersistentAgentInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | |-| `harness` | `String` | | Harness id (`claude-code`, `hermes`, ...). |-| `space` | `String` | | The Space it works in. |-| `paused` | `bool` | | |-| `space_state` / `spaceState` | `String` | | `running`, `suspended` or `released`. |-| `run_id` / `runId` | `Option<String>` | | Its current run, if any. |-| `saved_ms` / `savedMs` | `u64` | | Unix ms of the last home save (0: never). |-| `last_error` / `lastError` | `Option<String>` | | |--## `AppRoutineForm` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `prompt` | `String` | | |-| `schedule` | [`AppRoutineScheduleKind`](#approutineschedulekind-enum) | | |-| `minutes` | `u32` | | Minutes for `every`. |-| `time` | `String` | | `HH:MM` for daily and weekly. |-| `weekday` | `String` | | `mon` ... `sun` for weekly. |--## `AppRoutineInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `title` | `String` | | |-| `label` | `String` | | `Every day at 8:00 AM`. |-| `enabled` | `bool` | | |--## `AppTabView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `tab` | [`AppAgentTab`](#appagenttab-enum) | | |-| `label` | `String` | | |-| `selected` | `bool` | | |--## `AppAgentTab` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.memory-.routines-.access-```--</Tab>-<Tab value="Rust">--```rust-AppAgentTab::Memory-AppAgentTab::Routines-AppAgentTab::Access-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Memory` | |-| `Routines` | |-| `Access` | |--## `AppAgentsAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.select(name: String)-.setTab(tab: AppAgentTab)-.openFile(path: String)-.closeFile-.pause(name: String)-.resume(name: String)-.restore(version: String)-.setTitle(title: String)-.setPrompt(prompt: String)-.setSchedule(schedule: AppRoutineScheduleKind)-.setMinutes(minutes: UInt32)-.setTime(time: String)-.setWeekday(weekday: String)-.addRoutine-.toggleRoutine(id: String)-.removeRoutine(id: String)-.allowComputer(machine: String)-.revokeComputer(machine: String)-.done-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppAgentsAction::Select { name: String }-AppAgentsAction::SetTab { tab: AppAgentTab }-AppAgentsAction::OpenFile { path: String }-AppAgentsAction::CloseFile-AppAgentsAction::Pause { name: String }-AppAgentsAction::Resume { name: String }-AppAgentsAction::Restore { version: String }-AppAgentsAction::SetTitle { title: String }-AppAgentsAction::SetPrompt { prompt: String }-AppAgentsAction::SetSchedule { schedule: AppRoutineScheduleKind }-AppAgentsAction::SetMinutes { minutes: u32 }-AppAgentsAction::SetTime { time: String }-AppAgentsAction::SetWeekday { weekday: String }-AppAgentsAction::AddRoutine-AppAgentsAction::ToggleRoutine { id: String }-AppAgentsAction::RemoveRoutine { id: String }-AppAgentsAction::AllowComputer { machine: String }-AppAgentsAction::RevokeComputer { machine: String }-AppAgentsAction::Done-AppAgentsAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Select` | Fields: `name: String` |-| `SetTab` | Fields: `tab: AppAgentTab` |-| `OpenFile` | Fields: `path: String` |-| `CloseFile` | |-| `Pause` | Fields: `name: String` |-| `Resume` | Fields: `name: String` |-| `Restore` | Fields: `version: String` |-| `SetTitle` | Fields: `title: String` |-| `SetPrompt` | Fields: `prompt: String` |-| `SetSchedule` | Fields: `schedule: AppRoutineScheduleKind` |-| `SetMinutes` | Fields: `minutes: u32` |-| `SetTime` | Fields: `time: String` |-| `SetWeekday` | Fields: `weekday: String` |-| `AddRoutine` | |-| `ToggleRoutine` | Fields: `id: String` |-| `RemoveRoutine` | Fields: `id: String` |-| `AllowComputer` | Fields: `machine: String` |-| `RevokeComputer` | Fields: `machine: String` |-| `Done` | |-| `Failed` | Fields: `error: String` |--## `AppAgentsRequest` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.pause(name: String)-.resume(name: String)-.load(name: String)-.readFile(path: String)-.restore(path: String, version: String)-.addRoutine(agent: String, title: String, prompt: String, everyMinutes: UInt32?, dailyAt: String?, weeklyOn: String?)-.setRoutine(id: String, enabled: Bool)-.removeRoutine(id: String)-.allow(agent: String, machine: String)-.revoke(agent: String, machine: String)-```--</Tab>-<Tab value="Rust">--```rust-AppAgentsRequest::Pause { name: String }-AppAgentsRequest::Resume { name: String }-AppAgentsRequest::Load { name: String }-AppAgentsRequest::ReadFile { path: String }-AppAgentsRequest::Restore { path: String, version: String }-AppAgentsRequest::AddRoutine { agent: String, title: String, prompt: String, every_minutes: Option<u32>, daily_at: Option<String>, weekly_on: Option<String> }-AppAgentsRequest::SetRoutine { id: String, enabled: bool }-AppAgentsRequest::RemoveRoutine { id: String }-AppAgentsRequest::Allow { agent: String, machine: String }-AppAgentsRequest::Revoke { agent: String, machine: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Pause` | `agent_pause`. Fields: `name: String` |-| `Resume` | `agent_resume`. Fields: `name: String` |-| `Load` | Load the selected agent's home, routines and grants. Fields: `name: String` |-| `ReadFile` | `volume_read` + `volume_history` of a home file. Fields: `path: String` |-| `Restore` | `volume_restore`. Fields: `path: String`, `version: String` |-| `AddRoutine` | `routine_add` (one of the schedule fields is set). Fields: `agent: String`, `title: String`, `prompt: String`, `every_minutes: Option<u32>`, `daily_at: Option<String>`, `weekly_on: Option<String>` |-| `SetRoutine` | `routine_set_enabled`. Fields: `id: String`, `enabled: bool` |-| `RemoveRoutine` | `routine_remove`. Fields: `id: String` |-| `Allow` | `computer_access_grant` (the daemon asks for presence). Fields: `agent: String`, `machine: String` |-| `Revoke` | `computer_access_revoke`. Fields: `agent: String`, `machine: String` |--## `AppDriveAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.openVolume(mounted: String?)-.approve(id: String)-.deny(id: String)-.revoke(id: String)-.reveal(path: String)-.resolve(path: String)-.done-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppDriveAction::OpenVolume { mounted: Option<String> }-AppDriveAction::Approve { id: String }-AppDriveAction::Deny { id: String }-AppDriveAction::Revoke { id: String }-AppDriveAction::Reveal { path: String }-AppDriveAction::Resolve { path: String }-AppDriveAction::Done-AppDriveAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `OpenVolume` | The page's main button: show the mount point in the file manager, mounting first when the volume is not mounted (`mounted`: the mount point, when mounted). Fields: `mounted: Option<String>` |-| `Approve` | Fields: `id: String` |-| `Deny` | Fields: `id: String` |-| `Revoke` | Fields: `id: String` |-| `Reveal` | "Open in Finder" (the mount), or a conflict's Open. Fields: `path: String` |-| `Resolve` | A conflict's Resolve (the files stay). Fields: `path: String` |-| `Done` | |-| `Failed` | Fields: `error: String` |--## `AppDriveRequest` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.load-.mountAndReveal-.approve(id: String)-.deny(id: String)-.revoke(id: String)-.reveal(path: String)-.resolve(path: String)-```--</Tab>-<Tab value="Rust">--```rust-AppDriveRequest::Load-AppDriveRequest::MountAndReveal-AppDriveRequest::Approve { id: String }-AppDriveRequest::Deny { id: String }-AppDriveRequest::Revoke { id: String }-AppDriveRequest::Reveal { path: String }-AppDriveRequest::Resolve { path: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Load` | Read the page: `volume_requests`, `volume_grants`, `volume_mount_status`, `volume_sync_status`. |-| `MountAndReveal` | `volume_mount`, then show the mount point in the file manager. |-| `Approve` | `volume_approve` (the daemon asks for presence). Fields: `id: String` |-| `Deny` | `volume_deny`. Fields: `id: String` |-| `Revoke` | `volume_revoke`. Fields: `id: String` |-| `Reveal` | Show a path in the file manager (the shell's own call). Fields: `path: String` |-| `Resolve` | `volume_sync_resolve`. Fields: `path: String` |--## `AppRoutineScheduleKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.every-.daily-.weekly-```--</Tab>-<Tab value="Rust">--```rust-AppRoutineScheduleKind::Every-AppRoutineScheduleKind::Daily-AppRoutineScheduleKind::Weekly-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Every` | |-| `Daily` | |-| `Weekly` | |--## `app_agents_action_from_json`--An Agents page action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentsActionFromJson(json: String) throws -> AppAgentsAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agents_action_from_json(json: String) -> Result<AppAgentsAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppAgentsAction`](#appagentsaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_agents_initial`--A new Agents page.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentsInitial() -> AppAgentsState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agents_initial() -> AppAgentsState-```--</Tab>-</Tabs>--**Returns** [`AppAgentsState`](#appagentsstate-record)--## `app_agents_input_from_json`--Agents page input from JSON (tool results, fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentsInputFromJson(json: String) throws -> AppAgentsInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agents_input_from_json(json: String) -> Result<AppAgentsInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppAgentsInput`](#appagentsinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_agents_reduce`--Advances the Agents page.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentsReduce(input: AppAgentsInput, state: AppAgentsState, action: AppAgentsAction) -> AppAgentsState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agents_reduce(input: AppAgentsInput, state: AppAgentsState, action: AppAgentsAction) -> AppAgentsState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppAgentsInput`](#appagentsinput-record) | required |-| `state` | [`AppAgentsState`](#appagentsstate-record) | required |-| `action` | [`AppAgentsAction`](#appagentsaction-enum) | required |--**Returns** [`AppAgentsState`](#appagentsstate-record)--## `app_agents_view`--The Agents page as drawn at `now_ms`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentsView(input: AppAgentsInput, state: AppAgentsState, nowMs: UInt64) -> AppAgentsView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agents_view(input: AppAgentsInput, state: AppAgentsState, now_ms: u64) -> AppAgentsView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppAgentsInput`](#appagentsinput-record) | required |-| `state` | [`AppAgentsState`](#appagentsstate-record) | required |-| `now_ms` | `u64` | required |--**Returns** [`AppAgentsView`](#appagentsview-record)--## `app_drive_action_from_json`--A Drive page action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveActionFromJson(json: String) throws -> AppDriveAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_action_from_json(json: String) -> Result<AppDriveAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppDriveAction`](#appdriveaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_drive_initial`--A new Drive page (at the root, listing it).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveInitial() -> AppDriveState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_initial() -> AppDriveState-```--</Tab>-</Tabs>--**Returns** [`AppDriveState`](#appdrivestate-record)--## `app_drive_input_from_json`--Drive page input from JSON.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveInputFromJson(json: String) throws -> AppDriveInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_input_from_json(json: String) -> Result<AppDriveInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppDriveInput`](#appdriveinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_drive_reduce`--Advances the Drive page.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveReduce(state: AppDriveState, action: AppDriveAction) -> AppDriveState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_reduce(state: AppDriveState, action: AppDriveAction) -> AppDriveState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppDriveState`](#appdrivestate-record) | required |-| `action` | [`AppDriveAction`](#appdriveaction-enum) | required |--**Returns** [`AppDriveState`](#appdrivestate-record)--## `app_drive_view`--The Drive page as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveView(input: AppDriveInput, state: AppDriveState) -> AppDriveView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_view(input: AppDriveInput, state: AppDriveState) -> AppDriveView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppDriveInput`](#appdriveinput-record) | required |-| `state` | [`AppDriveState`](#appdrivestate-record) | required |--**Returns** [`AppDriveView`](#appdriveview-record)--## `app_notifications_from_json`--Feed entries from JSON (the `notifications_list` result's array).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotificationsFromJson(json: String) throws -> [AppNotificationInput]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notifications_from_json(json: String) -> Result<Vec<AppNotificationInput>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppNotificationInput>`](#appnotificationinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_notifications_plan`--Which feed entries to post now, and the marker to save-(`AppSettings.notifications_seen_ms`; 0 on the first run).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotificationsPlan(feed: [AppNotificationInput], seenMs: UInt64) -> AppNotificationsPlan-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notifications_plan(feed: Vec<AppNotificationInput>, seen_ms: u64) -> AppNotificationsPlan-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `feed` | [`Vec<AppNotificationInput>`](#appnotificationinput-record) | required |-| `seen_ms` | `u64` | required |--**Returns** [`AppNotificationsPlan`](#appnotificationsplan-record)--## `app_notifications_view`--The notifications list at `now_ms`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotificationsView(feed: [AppNotificationInput], nowMs: UInt64) -> AppNotificationsView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notifications_view(feed: Vec<AppNotificationInput>, now_ms: u64) -> AppNotificationsView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `feed` | [`Vec<AppNotificationInput>`](#appnotificationinput-record) | required |-| `now_ms` | `u64` | required |--**Returns** [`AppNotificationsView`](#appnotificationsview-record)--## All items--47 items, across this page and its subpages, grouped by page (each item's section is on its page). Methods are listed on their object.--**App core: agents, drive, notifications**: [`app_agent_rows`](#app_agent_rows), [`app_agent_status_label`](#app_agent_status_label), [`app_agent_subtitle`](#app_agent_subtitle), [`app_agents_action_from_json`](#app_agents_action_from_json), [`app_agents_initial`](#app_agents_initial), [`app_agents_input_from_json`](#app_agents_input_from_json), [`app_agents_reduce`](#app_agents_reduce), [`app_agents_view`](#app_agents_view), [`app_drive_action_from_json`](#app_drive_action_from_json), [`app_drive_initial`](#app_drive_initial), [`app_drive_input_from_json`](#app_drive_input_from_json), [`app_drive_reduce`](#app_drive_reduce), [`app_drive_view`](#app_drive_view), [`app_notifications_from_json`](#app_notifications_from_json), [`app_notifications_plan`](#app_notifications_plan), [`app_notifications_view`](#app_notifications_view), [`AppAccessAuditInput`](#appaccessauditinput-record), [`AppAgentDetailView`](#appagentdetailview-record), [`AppAgentRowView`](#appagentrowview-record), [`AppAgentsAction`](#appagentsaction-enum), [`AppAgentsInput`](#appagentsinput-record), [`AppAgentsRequest`](#appagentsrequest-enum), [`AppAgentsState`](#appagentsstate-record), [`AppAgentsView`](#appagentsview-record), [`AppAgentTab`](#appagenttab-enum), [`AppComputerGrantInput`](#appcomputergrantinput-record), [`AppDriveAction`](#appdriveaction-enum), [`AppDriveEntryInput`](#appdriveentryinput-record), [`AppDriveGrantInput`](#appdrivegrantinput-record), [`AppDriveInput`](#appdriveinput-record), [`AppDriveRequest`](#appdriverequest-enum), [`AppDriveRequestInput`](#appdriverequestinput-record), [`AppDriveState`](#appdrivestate-record), [`AppDriveView`](#appdriveview-record), [`AppFileVersionInput`](#appfileversioninput-record), [`AppFileView`](#appfileview-record), [`AppLineView`](#applineview-record), [`AppNotificationInput`](#appnotificationinput-record), [`AppNotificationsPlan`](#appnotificationsplan-record), [`AppNotificationsView`](#appnotificationsview-record), [`AppOpenFileInput`](#appopenfileinput-record), [`AppPersistentAgentInput`](#apppersistentagentinput-record), [`AppRoutineForm`](#approutineform-record), [`AppRoutineInput`](#approutineinput-record), [`AppRoutineScheduleKind`](#approutineschedulekind-enum), [`AppSystemNote`](#appsystemnote-record), [`AppTabView`](#apptabview-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/agents.mdx b/docs/content/docs/cua-sdk/reference/spaces/agents.mdxdeleted file mode 100644index c312ac0140..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/agents.mdx+++ /dev/null@@ -1,480 +0,0 @@-----title: "Agents in a Space"-description: "Start, follow, message and stop coding-agent runs inside a Space."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--An agent run is a coding-agent CLI started in the Space with a prompt, detached from the call that started it.--## Agent runs--Methods of [`Space`](/cua-sdk/reference/spaces/space#space).--### `Space.agent_start`--Starts an agent CLI (`claude-code`, `openai-codex`, ...) with a-prompt, as a detached spacesd process.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_start(self, agent: str, prompt: str, show: Optional[bool], options: Optional[SpaceAgentOptions]) -> AgentStartReport-```--</Tab>-<Tab value="TypeScript">--```ts-agentStart(agent: string, prompt: string, show: boolean | undefined, options: SpaceAgentOptions | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<AgentStartReport>-```--</Tab>-<Tab value="Swift">--```swift-func agentStart(agent: String, prompt: String, show: Bool?, options: SpaceAgentOptions?) async throws -> AgentStartReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentStart(agent: String, prompt: String, show: Boolean?, options: SpaceAgentOptions?): AgentStartReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_start(&self, agent: String, prompt: String, show: Option<bool>, options: Option<SpaceAgentOptions>) -> Result<AgentStartReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `agent` | `String` | required |-| `prompt` | `String` | required |-| `show` | `Option<bool>` | required |-| `options` | [`Option<SpaceAgentOptions>`](#spaceagentoptions-record) | required |--**Returns** [`AgentStartReport`](#agentstartreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.agent_status`--A run's status with the last `tail` lines of output.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_status(self, run_id: str, tail: Optional[int]) -> AgentRunStatus-```--</Tab>-<Tab value="TypeScript">--```ts-agentStatus(runId: string, tail: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<AgentRunStatus>-```--</Tab>-<Tab value="Swift">--```swift-func agentStatus(runId: String, tail: UInt32?) async throws -> AgentRunStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentStatus(runId: String, tail: UInt?): AgentRunStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_status(&self, run_id: String, tail: Option<u32>) -> Result<AgentRunStatus, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `run_id` | `String` | required |-| `tail` | `Option<u32>` | required |--**Returns** [`AgentRunStatus`](#agentrunstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.agent_events`--Normalized events after `cursor` (0: the start), as the-`agent_events` JSON (`events`, `cursor`, `caught_up`, `status`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_events(self, run_id: str, cursor: Optional[int], max: Optional[int]) -> str-```--</Tab>-<Tab value="TypeScript">--```ts-agentEvents(runId: string, cursor: bigint | undefined, max: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<string>-```--</Tab>-<Tab value="Swift">--```swift-func agentEvents(runId: String, cursor: UInt64?, max: UInt32?) async throws -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentEvents(runId: String, cursor: ULong?, max: UInt?): String-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_events(&self, run_id: String, cursor: Option<u64>, max: Option<u32>) -> Result<String, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `run_id` | `String` | required |-| `cursor` | `Option<u64>` | required |-| `max` | `Option<u32>` | required |--**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.agent_message`--Sends a follow-up message to a run.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_message(self, run_id: str, text: str, force: Optional[bool]) -> AgentActionReport-```--</Tab>-<Tab value="TypeScript">--```ts-agentMessage(runId: string, text: string, force: boolean | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<AgentActionReport>-```--</Tab>-<Tab value="Swift">--```swift-func agentMessage(runId: String, text: String, force: Bool?) async throws -> AgentActionReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentMessage(runId: String, text: String, force: Boolean?): AgentActionReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_message(&self, run_id: String, text: String, force: Option<bool>) -> Result<AgentActionReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `run_id` | `String` | required |-| `text` | `String` | required |-| `force` | `Option<bool>` | required |--**Returns** [`AgentActionReport`](#agentactionreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.agent_interrupt`--Cancels the run's turn in flight; the session stays open.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_interrupt(self, run_id: str) -> AgentActionReport-```--</Tab>-<Tab value="TypeScript">--```ts-agentInterrupt(runId: string, asyncOpts_?: { signal: AbortSignal }): Promise<AgentActionReport>-```--</Tab>-<Tab value="Swift">--```swift-func agentInterrupt(runId: String) async throws -> AgentActionReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentInterrupt(runId: String): AgentActionReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_interrupt(&self, run_id: String) -> Result<AgentActionReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `run_id` | `String` | required |--**Returns** [`AgentActionReport`](#agentactionreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.agent_list`--Every agent run in this Space.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_list(self) -> List[AgentRunStatus]-```--</Tab>-<Tab value="TypeScript">--```ts-agentList(asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentRunStatus>>-```--</Tab>-<Tab value="Swift">--```swift-func agentList() async throws -> [AgentRunStatus]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentList(): List<AgentRunStatus>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_list(&self) -> Result<Vec<AgentRunStatus>, CuaError>-```--</Tab>-</Tabs>--**Returns** [`Vec<AgentRunStatus>`](#agentrunstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.agent_stop`--Stops a run.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_stop(self, run_id: str) -> AgentActionReport-```--</Tab>-<Tab value="TypeScript">--```ts-agentStop(runId: string, asyncOpts_?: { signal: AbortSignal }): Promise<AgentActionReport>-```--</Tab>-<Tab value="Swift">--```swift-func agentStop(runId: String) async throws -> AgentActionReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentStop(runId: String): AgentActionReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_stop(&self, run_id: String) -> Result<AgentActionReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `run_id` | `String` | required |--**Returns** [`AgentActionReport`](#agentactionreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## Harnesses--Methods of [`Spaces`](/cua-sdk/reference/spaces#spaces).--### `Spaces.agent_capabilities`--What every agent harness is and cannot do (`agent_capabilities`),-as JSON.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def agent_capabilities(self) -> str-```--</Tab>-<Tab value="TypeScript">--```ts-agentCapabilities(asyncOpts_?: { signal: AbortSignal }): Promise<string>-```--</Tab>-<Tab value="Swift">--```swift-func agentCapabilities() async throws -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun agentCapabilities(): String-```--</Tab>-<Tab value="Rust">--```rust-pub async fn agent_capabilities(&self) -> Result<String, CuaError>-```--</Tab>-</Tabs>--**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `AgentStartReport` record--Result of `Space.agent_start`.--Returned by [`Space.agent_start`](#spaceagent_start).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `run_id` / `runId` | `String` | | Run id. |-| `agent` | `String` | | Agent. |-| `space` | `String` | | Space. |-| `process_tag` / `processTag` | `String` | | spacesd process tag of the first turn. |-| `notes` | `Vec<String>` | | Preparation steps that could not be completed. |-| `json` | `String` | | The whole report as JSON. |--## `AgentRunStatus` record--One agent run's status.--Returned by [`Space.agent_list`](#spaceagent_list), [`Space.agent_status`](#spaceagent_status).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `run_id` / `runId` | `String` | | Run id. |-| `agent` | `Option<String>` | | Agent. |-| `status` | `String` | | Status (`running`, `done`, `failed`, ...). |-| `reason` | `String` | | Why. |-| `phase` | `String` | | Finer grain: `installing`, `working`, `waiting`, `exited`, ... |-| `result_text` / `resultText` | `Option<String>` | | The last turn's final text (`agent_status` only). |-| `accepts_message` / `acceptsMessage` | `bool` | | A follow-up sent now starts the next turn (the server's rule: idle, or a crashed or failed run it restarts; not mid-turn). Read this, never derive it from `status`. |-| `output_tail` / `outputTail` | `Option<String>` | | Output tail. |-| `json` | `String` | | The whole status as JSON. |--## `AgentActionReport` record--Result of `Space.agent_message` / `Space.agent_stop`.--Returned by [`Space.agent_interrupt`](#spaceagent_interrupt), [`Space.agent_message`](#spaceagent_message), [`Space.agent_stop`](#spaceagent_stop).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `run_id` / `runId` | `String` | | Run id. |-| `ok` | `bool` | | Delivered (message) or stopped (stop). |-| `reason` | `String` | | Why. |-| `json` | `String` | | The whole report as JSON. |--## `SpaceAgentOptions` record--Options for `Space.agent_start` beyond the harness and prompt.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `env_from_host` / `envFromHost` | `Vec<String>` | `[]` | Provider key variables forwarded from the Spaces host's environment. |-| `env` | `HashMap<String, String>` | `[:]` | More environment for the agent, for example `HERMES_HOME` (stored 0600 in the run, redacted from its output; not for provider keys). |-| `repo` | `Option<String>` | `None` | |-| `branch` | `Option<String>` | `None` | |-| `cwd` | `Option<String>` | `None` | |-| `model` | `Option<String>` | `None` | |-| `base_url` / `baseUrl` | `Option<String>` | `None` | A custom model endpoint. |-| `exit_when_idle` / `exitWhenIdle` | `Option<bool>` | `None` | Stop (resumably) once the prompt is answered. |-| `home` | `Option<String>` | `None` | Run as this persistent agent: its home in the Cua Volume is restored first and saved after every turn (see `Spaces.persistent_agent_send`). |diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-checklist-palette.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-checklist-palette.mdxdeleted file mode 100644index 4c5d3a730f..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-checklist-palette.mdx+++ /dev/null@@ -1,324 +0,0 @@-----title: "Getting started and the command palette"-description: "The getting-started checklist, the command palette's ranking and the shared keyboard shortcuts."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--App core functions beside the [Spaces app core](/cua-sdk/reference/spaces/app-core) screens. The host app keeps the one `AppChecklistState`. `app_checklist_observe_from` reads what the app shows (the [Machines page](/cua-sdk/reference/spaces/machines-app-core) rows, the Spaces, the agents) as the same `Observe` action in every UI. `app_checklist_reduce` applies a checklist action (a step done, shown, closed, opened again, what the app shows now, or progress merged from another copy) and returns the new state with the usage events it means; `app_checklist_view` derives the rows, title and progress. `app_palette_rank` orders the command palette's entries for a query, and `app_keybindings` lists the default keyboard shortcuts the apps share.--## `AppChecklistRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | [`AppChecklistStep`](#appcheckliststep-enum) | | The step. |-| `title` | `String` | | "Add a machine". |-| `detail` | `String` | | One line under the title. |-| `action` | `String` | | The button that does it; hidden once done. |-| `done` | `bool` | | Done (ticked, struck through). |--## `AppChecklistSeen` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `machines` | [`Vec<AppMachinePageRow>`](/cua-sdk/reference/spaces/machines-app-core#appmachinepagerow-record) | | The Machines page's rows (`crate.machines.page_rows`). |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | | The Spaces list. |-| `agents` | `u32` | | Persistent agents listed. |-| `runs` | `u32` | | Agent runs listed in any Space. |--## `AppChecklistState` record--Returned by [`app_checklist_state_from_json`](#app_checklist_state_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `done` | [`Vec<AppChecklistStep>`](#appcheckliststep-enum) | | Steps done, each once, in checklist order. |-| `dismissed` | `bool` | | Closed with ×; Getting Started opens it again. |-| `shown` | `bool` | | It was on screen once (`checklist_shown` was recorded). |--## `AppChecklistTransition` record--Returned by [`app_checklist_reduce`](#app_checklist_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `state` | [`AppChecklistState`](#appcheckliststate-record) | | The new state (save it when it changed). |-| `signals` | [`Vec<AppTelemetrySignal>`](/cua-sdk/reference/spaces/app-core/telemetry#apptelemetrysignal-enum) | | `cua_onboarding_step` events to record (`checklist_<event>`). |--## `AppChecklistView` record--Returned by [`app_checklist_view`](#app_checklist_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `visible` | `bool` | | On screen (not closed). |-| `complete` | `bool` | | Every step done. |-| `title` | `String` | | "Get started", or "You're set up" when complete. |-| `detail` | `String` | | The line under the title. |-| `progress` | `String` | | "2 of 5". |-| `close_label` / `closeLabel` | `String` | | The close button's accessibility label. |-| `rows` | [`Vec<AppChecklistRow>`](#appchecklistrow-record) | | The steps in order. |--## `AppKeybinding` record--Returned by [`app_keybindings`](#app_keybindings).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `command` | `String` | | `commandPalette.toggle`, `nav.spaces`, ... |-| `key` | `String` | | `mod+k`, `mod+shift+l`: `mod` is ⌘ on macOS and Ctrl elsewhere. |--## `AppPaletteEntry` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `group` | `String` | | "Actions", "Go to", "Spaces". |-| `label` | `String` | | "New Space". |-| `hint` | `Option<String>` | | Secondary text ("Linux"). |-| `keywords` | `Option<String>` | | Extra words it answers to ("create add"). |--## `AppChecklistAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.done(step: AppChecklistStep)-.shown-.dismiss-.reopen-.observe(otherMachine: Bool, hasSpace: Bool, agentRan: Bool)-.merge(state: AppChecklistState)-```--</Tab>-<Tab value="Rust">--```rust-AppChecklistAction::Done { step: AppChecklistStep }-AppChecklistAction::Shown-AppChecklistAction::Dismiss-AppChecklistAction::Reopen-AppChecklistAction::Observe { other_machine: bool, has_space: bool, agent_ran: bool }-AppChecklistAction::Merge { state: AppChecklistState }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Done` | A step finished (a teleport ran, a Space was shared). Fields: `step: AppChecklistStep` |-| `Shown` | The checklist is on screen. |-| `Dismiss` | Closed with ×. |-| `Reopen` | Getting Started (the palette, the Help menu): open it again. |-| `Observe` | What the app shows now: each `true` ticks its step off. Fields: `other_machine: bool`, `has_space: bool`, `agent_ran: bool` |-| `Merge` | Progress kept elsewhere before (the web UI's own storage, another copy of the file): its steps are ticked, and it stays closed or shown if it was. Its events were recorded where it was ticked, so none are recorded again. Fields: `state: AppChecklistState` |--## `AppChecklistStep` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.addMachine-.createSpace-.teleport-.share-.runAgent-```--</Tab>-<Tab value="Rust">--```rust-AppChecklistStep::AddMachine-AppChecklistStep::CreateSpace-AppChecklistStep::Teleport-AppChecklistStep::Share-AppChecklistStep::RunAgent-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `AddMachine` | Connect another computer you own. |-| `CreateSpace` | Create a Space. |-| `Teleport` | Teleport an app into a Space. |-| `Share` | Share a Space with someone. |-| `RunAgent` | Run an agent. |--## `app_checklist_observe_from`--What the app shows as the checklist's `Observe` (every UI the same).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appChecklistObserveFrom(seen: AppChecklistSeen) -> AppChecklistAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_checklist_observe_from(seen: AppChecklistSeen) -> AppChecklistAction-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `seen` | [`AppChecklistSeen`](#appchecklistseen-record) | required |--**Returns** [`AppChecklistAction`](#appchecklistaction-enum)--## `app_checklist_reduce`--The getting-started checklist after `action`, and its usage events.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appChecklistReduce(state: AppChecklistState, action: AppChecklistAction) -> AppChecklistTransition-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_checklist_reduce(state: AppChecklistState, action: AppChecklistAction) -> AppChecklistTransition-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppChecklistState`](#appcheckliststate-record) | required |-| `action` | [`AppChecklistAction`](#appchecklistaction-enum) | required |--**Returns** [`AppChecklistTransition`](#appchecklisttransition-record)--## `app_checklist_state_from_json`--Checklist state from JSON, steps as words (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appChecklistStateFromJson(json: String) throws -> AppChecklistState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_checklist_state_from_json(json: String) -> Result<AppChecklistState, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppChecklistState`](#appcheckliststate-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_checklist_view`--The getting-started checklist as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appChecklistView(state: AppChecklistState) -> AppChecklistView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_checklist_view(state: AppChecklistState) -> AppChecklistView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppChecklistState`](#appcheckliststate-record) | required |--**Returns** [`AppChecklistView`](#appchecklistview-record)--## `app_keybindings`--The default keyboard shortcuts (the shared UI's `keybindings.json`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appKeybindings() -> [AppKeybinding]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_keybindings() -> Vec<AppKeybinding>-```--</Tab>-</Tabs>--**Returns** [`Vec<AppKeybinding>`](#appkeybinding-record)--## `app_palette_rank`--The command palette's matches for `query`, best first, as indices into-`entries`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPaletteRank(entries: [AppPaletteEntry], query: String) -> [UInt32]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_palette_rank(entries: Vec<AppPaletteEntry>, query: String) -> Vec<u32>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `entries` | [`Vec<AppPaletteEntry>`](#apppaletteentry-record) | required |-| `query` | `String` | required |--**Returns** `Vec<u32>`diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/about.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/about.mdxdeleted file mode 100644index eab8ac64e6..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/about.mdx+++ /dev/null@@ -1,586 +0,0 @@-----title: "About, updates and launch"-description: "The About window and its update channel, what the apps do once they launch (the bundled cua install), and the daemon and refresh reports they read."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_about_view` builds the About window from the shell's `AppAboutInput`; `app_about_after_launch` and `app_about_restart_daemon` say what to do after an update or when the daemon is from another build. `AppCliInstaller` puts the bundled `cua` on PATH on first launch.--## `AppDaemonCheck` record--Returned by [`app_daemon_check_from_json`](#app_daemon_check_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `daemon_exe` / `daemonExe` | `Option<String>` | | The running daemon's executable (`None`: no daemon, or unknown). |-| `bundle` | `String` | | This app's bundle (`/Applications/Cua Spaces.app`). |--## `app_daemon_check_from_json`--A daemon check from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDaemonCheckFromJson(json: String) throws -> AppDaemonCheck-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_daemon_check_from_json(json: String) -> Result<AppDaemonCheck, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppDaemonCheck`](#appdaemoncheck-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `AppRefreshReport` record--Returned by [`app_refresh_report_from_json`](#app_refresh_report_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `agents_error` / `agentsError` | `Option<String>` | | `cua agents update` failed (its words). |-| `daemon_error` / `daemonError` | `Option<String>` | | Restarting the daemon failed (its words). |--## `app_refresh_report_from_json`--A refresh report from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appRefreshReportFromJson(json: String) throws -> AppRefreshReport-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_refresh_report_from_json(json: String) -> Result<AppRefreshReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppRefreshReport`](#apprefreshreport-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `AppUpdateChannel` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.stable-.beta-```--</Tab>-<Tab value="Rust">--```rust-AppUpdateChannel::Stable-AppUpdateChannel::Beta-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Stable` | Releases (the default). |-| `Beta` | Releases and prereleases (`X.Y.Z-suffix`). |--## `AppCliInstaller`--Puts the app's bundled `cua` on PATH after the first run's Command-line page (`CliPlanned`, `CliDone`). The same installer the Tauri app runs;-`plan` reads what installing would do without writing.--| Method | Description |-| --- | --- |-| [`for_executable`](#appcliinstallerfor_executable) | This machine: the `cua` next to `executable` (the app's own executable), `$HOME`, `$PATH` and `$SHELL`. |-| [`with_paths`](#appcliinstallerwith_paths) | Explicit paths (tests): the bundled CLI, the bin directory, the PATH value to check and the shell profile a PATH change edits. |-| [`install`](#appcliinstallerinstall) | Installs the CLI (after the user consented to the plan). |-| [`plan`](#appcliinstallerplan) | What installing would do (nothing is written). |--### `AppCliInstaller.for_executable`--This machine: the `cua` next to `executable` (the app's own-executable), `$HOME`, `$PATH` and `$SHELL`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-static func forExecutable(executable: String) -> AppCliInstaller-```--</Tab>-<Tab value="Rust">--```rust-pub fn for_executable(executable: String) -> Arc<AppCliInstaller>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `executable` | `String` | required |--**Returns** [`AppCliInstaller`](#appcliinstaller)--### `AppCliInstaller.with_paths`--Explicit paths (tests): the bundled CLI, the bin directory, the PATH-value to check and the shell profile a PATH change edits.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-static func withPaths(bundled: String?, binDir: String, pathEnv: String, profile: String) -> AppCliInstaller-```--</Tab>-<Tab value="Rust">--```rust-pub fn with_paths(bundled: Option<String>, bin_dir: String, path_env: String, profile: String) -> Arc<AppCliInstaller>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `bundled` | `Option<String>` | required |-| `bin_dir` | `String` | required |-| `path_env` | `String` | required |-| `profile` | `String` | required |--**Returns** [`AppCliInstaller`](#appcliinstaller)--### `AppCliInstaller.install`--Installs the CLI (after the user consented to the plan).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func install(request: AppCliInstallRequest) async throws -> AppCliInstallPlan-```--</Tab>-<Tab value="Rust">--```rust-pub async fn install(&self, request: AppCliInstallRequest) -> Result<AppCliInstallPlan, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `request` | [`AppCliInstallRequest`](#appcliinstallrequest-record) | required |--**Returns** [`AppCliInstallPlan`](#appcliinstallplan-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `AppCliInstaller.plan`--What installing would do (nothing is written).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func plan() async -> AppCliInstallPlan-```--</Tab>-<Tab value="Rust">--```rust-pub async fn plan(&self) -> AppCliInstallPlan-```--</Tab>-</Tabs>--**Returns** [`AppCliInstallPlan`](#appcliinstallplan-record) · **Async**--## `AppAboutInput` record--Returned by [`app_about_input_from_json`](#app_about_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `platform` | `String` | | `macos`, `linux` or `windows`. |-| `version` | `String` | | The full version (`0.2.0`, `0.2.0-staging.6`). |-| `build` | `String` | | The build (the macOS app's `CFBundleVersion`, `0.2.0.123`; may be empty). |-| `os` | `String` | | This machine for an issue report (`macOS 26.0 (arm64)`). |-| `updater` | `bool` | | The app updates itself (its updater is running). |-| `auto_check` / `autoCheck` | `bool` | | The updater checks on its own. |-| `auto_install` / `autoInstall` | `bool` | | The updater downloads and installs on its own. |-| `channel` | [`AppUpdateChannel`](#appupdatechannel-enum) | | The chosen channel. |-| `last_check` / `lastCheck` | `Option<String>` | | The last check, as the shell formats a date; `None`: never. |-| `checking` | `bool` | | A check is running. |--## `AppAboutLink` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | [`AppAboutLinkId`](#appaboutlinkid-enum) | | Which. |-| `label` | `String` | | "Privacy Policy". |-| `url` | `Option<String>` | | What it opens; `None`: the notices the app bundles. |--## `AppAboutUpdates` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `auto_check_label` / `autoCheckLabel` | `String` | | "Check for and download updates automatically". |-| `auto_check` / `autoCheck` | `bool` | | Checked. |-| `auto_install_label` / `autoInstallLabel` | `String` | | "Install a downloaded update when Cua Spaces quits". |-| `auto_install` / `autoInstall` | `bool` | | Checked. |-| `auto_install_enabled` / `autoInstallEnabled` | `bool` | | It can be used (only with automatic checks). |-| `channel_label` / `channelLabel` | `String` | | "Update to:". |-| `channels` | [`Vec<AppSettingsOption>`](/cua-sdk/reference/spaces/app-core/window#appsettingsoption-record) | | Stable, Beta. |-| `channel_help` / `channelHelp` | `String` | | The channel picker's tooltip. |-| `check_label` / `checkLabel` | `String` | | "Check Now" (or "Checking…"). |-| `check_enabled` / `checkEnabled` | `bool` | | Check Now can be used. |-| `last_check` / `lastCheck` | `String` | | "Last check: …". |--## `AppAboutView` record--Returned by [`app_about_view`](#app_about_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Cua Spaces for macOS". |-| `version_line` / `versionLine` | `String` | | "Version 0.2.0 (0.2.0.123)". |-| `links` | [`Vec<AppAboutLink>`](#appaboutlink-record) | | Acknowledgements, Privacy Policy, Terms of Service, Report an Issue. |-| `copyright` | `String` | | "© 2026 Cua AI, Inc. All rights reserved." |-| `updates` | [`Option<AppAboutUpdates>`](#appaboutupdates-record) | | The update controls, when the app updates itself. |--## `AppCliInstallPlan` record--Returned by [`AppCliInstaller.install`](#appcliinstallerinstall), [`AppCliInstaller.plan`](#appcliinstallerplan).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `source` | `Option<String>` | | The bundled CLI, when this build carries one. |-| `target` | `String` | | Exact file the CLI is written to. |-| `bin_dir` / `binDir` | `String` | | Directory of `target`. |-| `method` | [`Option<AppInstallMethod>`](#appinstallmethod-enum) | | `symlink` or `copy`. |-| `installed` | `bool` | | Something already exists at `target`. |-| `up_to_date` / `upToDate` | `bool` | | `target` resolves to this app's bundled CLI (nothing to do). |-| `installed_version` / `installedVersion` | `Option<String>` | | `cua --version` of what is at `target`. |-| `bundled_version` / `bundledVersion` | `Option<String>` | | `cua --version` of the bundled CLI. |-| `shadowed_by` / `shadowedBy` | `Option<String>` | | Another `cua` found earlier on PATH (it would shadow `target`). |-| `on_path` / `onPath` | `bool` | | `bin_dir` is already on PATH. |-| `path_profile` / `pathProfile` | `Option<String>` | | Shell profile (or "user PATH" on Windows) the PATH change would edit. |-| `path_line` / `pathLine` | `Option<String>` | | The line that would be added to `path_profile`. |-| `found` | `Option<String>` | | A working `cua` CLI already on this machine: `target`, else the first in the usual install folders or on PATH (a Finder-launched app's PATH lacks `~/.local/bin`, so the folders are searched too). |--## `AppCliInstallRequest` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `modify_path` / `modifyPath` | `bool` | | Also add the bin dir to PATH (edits `path_profile`). |--## `AppLaunchInput` record--Returned by [`app_launch_input_from_json`](#app_launch_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `last_seen` / `lastSeen` | `Option<String>` | | `AppSettings.last_seen_version` (`None`: never recorded). |-| `version` | `String` | | This version (`0.2.0-staging.6`). |-| `build` | `String` | | This build (`0.2.0.123`; may be empty). |-| `onboarded` | `bool` | | The first run finished (a record-less launch after it is an update from a build that kept no record; before it, a fresh install). |--## `AppLaunchPlan` record--Returned by [`app_about_after_launch`](#app_about_after_launch).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `refresh` | `bool` | | This launch follows an update: refresh the agents' skills and MCP entries (`cua agents update`) and restart the app's own daemon. |-| `save` | `Option<String>` | | Save as `AppSettings.last_seen_version` (`None`: unchanged). |--## `AppAboutLinkId` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.acknowledgements-.privacy-.terms-.issue-```--</Tab>-<Tab value="Rust">--```rust-AppAboutLinkId::Acknowledgements-AppAboutLinkId::Privacy-AppAboutLinkId::Terms-AppAboutLinkId::Issue-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Acknowledgements` | The third-party notices the app bundles. |-| `Privacy` | The privacy policy. |-| `Terms` | The terms of service. |-| `Issue` | A new issue. |--## `AppInstallMethod` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.symlink-.copy-```--</Tab>-<Tab value="Rust">--```rust-AppInstallMethod::Symlink-AppInstallMethod::Copy-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Symlink` | A symlink into the app bundle: app updates update the CLI too. |-| `Copy` | A copy of the bundled binary. |--## `app_about_after_launch`--What this launch does (refresh after an update; the version to record).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAboutAfterLaunch(input: AppLaunchInput) -> AppLaunchPlan-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_about_after_launch(input: AppLaunchInput) -> AppLaunchPlan-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppLaunchInput`](#applaunchinput-record) | required |--**Returns** [`AppLaunchPlan`](#applaunchplan-record)--## `app_about_allowed_channels`--The Sparkle channels an updater on `channel` may install from.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAboutAllowedChannels(channel: AppUpdateChannel) -> [String]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_about_allowed_channels(channel: AppUpdateChannel) -> Vec<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `channel` | [`AppUpdateChannel`](#appupdatechannel-enum) | required |--**Returns** `Vec<String>`--## `app_about_input_from_json`--The About input from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAboutInputFromJson(json: String) throws -> AppAboutInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_about_input_from_json(json: String) -> Result<AppAboutInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppAboutInput`](#appaboutinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_about_refresh_notice`--The one notice after a failed refresh (`None` when it worked).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAboutRefreshNotice(report: AppRefreshReport) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_about_refresh_notice(report: AppRefreshReport) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `report` | [`AppRefreshReport`](#apprefreshreport-record) | required |--**Returns** `Option<String>`--## `app_about_restart_daemon`--Whether the running daemon is this app's own (restart it after an update).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAboutRestartDaemon(check: AppDaemonCheck) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_about_restart_daemon(check: AppDaemonCheck) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `check` | [`AppDaemonCheck`](#appdaemoncheck-record) | required |--**Returns** `bool`--## `app_about_view`--Settings, About: name, version, links, copyright and the update controls.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAboutView(input: AppAboutInput) -> AppAboutView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_about_view(input: AppAboutInput) -> AppAboutView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppAboutInput`](#appaboutinput-record) | required |--**Returns** [`AppAboutView`](#appaboutview-record)--## `app_launch_input_from_json`--A launch from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appLaunchInputFromJson(json: String) throws -> AppLaunchInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_launch_input_from_json(json: String) -> Result<AppLaunchInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppLaunchInput`](#applaunchinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/agent-keys.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/agent-keys.mdxdeleted file mode 100644index d6cdcb1495..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/agent-keys.mdx+++ /dev/null@@ -1,493 +0,0 @@-----title: "Settings, Agents"-description: "Settings > Agents: the coding agents' rows, the provider keys saved in the keychain, and the add or replace sheet."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The `app_agent_setup*` and `app_agent_settings_*` functions turn `AgentSetup` results into the coding agents' rows. `app_agent_keys_view` derives the key rows from `app_agent_keys_input_from_json` (the daemon's `agent_keys.list` answer: each saved key's provider, the variable a run gets it as, its last four characters and when it was added). `app_agent_key_form` drives the add or replace sheet, with `app_agent_key_name_problem` for an Other key's variable name; `app_agent_key_remove_confirm` is the confirmation before a key is removed.--## `AppAgentKeyConfirm` record--Returned by [`app_agent_key_remove_confirm`](#app_agent_key_remove_confirm).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `message` | `String` | | |-| `confirm_label` / `confirmLabel` | `String` | | |-| `cancel_label` / `cancelLabel` | `String` | | |--## `AppAgentKeyFormInput` record--Returned by [`app_agent_key_form_input_from_json`](#app_agent_key_form_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | `anthropic`, `openai` or `other`. |-| `env` | `Option<String>` | | The row it opened from (replacing an Other key), when any. |-| `name` | `String` | | The variable typed for a new Other key. |-| `has_value` / `hasValue` | `bool` | | Something was typed in the key field (the page never sends the key). |--## `AppAgentKeyFormView` record--Returned by [`app_agent_key_form`](#app_agent_key_form).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `lede` | `String` | | |-| `name_label` / `nameLabel` | `Option<String>` | | The variable field, for a new Other key. |-| `name_placeholder` / `namePlaceholder` | `Option<String>` | | |-| `name_error` / `nameError` | `Option<String>` | | Why the typed variable can't be used. |-| `value_label` / `valueLabel` | `String` | | |-| `value_placeholder` / `valuePlaceholder` | `String` | | |-| `value_help` / `valueHelp` | `String` | | Under the key field. |-| `save_label` / `saveLabel` | `String` | | |-| `cancel_label` / `cancelLabel` | `String` | | |-| `can_save` / `canSave` | `bool` | | |-| `provider` | `String` | | What `agent_keys.set` gets besides the key. |-| `env` | `Option<String>` | | |--## `AppAgentKeyInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | `anthropic`, `openai` or `other`. |-| `env` | `String` | | The variable a run gets it as. |-| `last4` | `String` | | Its last four characters (empty for a short key). |-| `added_ms` / `addedMs` | `u64` | | When it was added (Unix ms). |--## `AppAgentKeyRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `env` | `String` | | The variable (the row's id). |-| `provider` | `String` | | `anthropic`, `openai` or `other`. |-| `title` | `String` | | "Anthropic", "OpenAI", or the variable. |-| `detail` | `String` | | Who gets it. |-| `set` | `bool` | | A key is saved. |-| `status` | `String` | | "Not set", "•••• 0000", or "Saved" for a short key. |-| `added_ms` / `addedMs` | `Option<u64>` | | When it was added (the page writes "Added <date>"). |-| `action_label` / `actionLabel` | `String` | | "Add key" or "Replace". |-| `remove_label` / `removeLabel` | `Option<String>` | | "Remove", when a key is saved. |--## `AppAgentKeysInput` record--Returned by [`app_agent_keys_input_from_json`](#app_agent_keys_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `keys` | [`Vec<AppAgentKeyInput>`](#appagentkeyinput-record) | | The keys saved, once read. |-| `unavailable` | `Option<String>` | | Why this machine can't keep keys (the daemon's words), when it can't. |-| `error` | `Option<String>` | | The keys could not be read (no daemon, a refused Keychain). |--## `AppAgentKeysView` record--Returned by [`app_agent_keys_view`](#app_agent_keys_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | |-| `intro` | `String` | | Where the keys live and who gets them. |-| `rows` | [`Vec<AppAgentKeyRow>`](#appagentkeyrow-record) | | |-| `add_other_label` / `addOtherLabel` | `String` | | The button for an Other key. |-| `other_help` / `otherHelp` | `String` | | What an Other key is. |-| `notice` | `Option<String>` | | Why keys can't be saved or read, in place of the buttons. |-| `can_edit` / `canEdit` | `bool` | | The buttons work. |-| `added_label` / `addedLabel` | `String` | | "Added" (before the date the page formats). |--## `AppAgentSettingsRow` record--Returned by [`app_agent_settings_rows`](#app_agent_settings_rows).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `String` | | Registry id. |-| `name` | `String` | | Display name. |-| `installed` | `bool` | | Installed. |-| `configured` | `bool` | | cua skills and the cua MCP server are both in place (where supported). |-| `detail` | `String` | | One line for the row. |-| `skills_installed` / `skillsInstalled` | `u32` | | Bundled skills present. |-| `skills_total` / `skillsTotal` | `u32` | | Bundled skills. |-| `mcp_config` / `mcpConfig` | `Option<String>` | | MCP config file. |-| `skills_dir` / `skillsDir` | `Option<String>` | | Skills directory. |--## `AppAgentSetupOutcomeInput` record--Returned by [`app_agent_setup_outcome`](#app_agent_setup_outcome), [`app_agent_setup_outcomes_from_json`](#app_agent_setup_outcomes_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `agents` | `Vec<String>` | | Agents it served. |-| `target` | `String` | | `skill` or `mcp`. |-| `item` | `String` | | Skill or server name. |-| `change` | `String` | | `created`, `updated`, `unchanged`, `removed`, `skipped`, `failed`. |-| `detail` | `String` | | Explanation. |--## `AppAgentSetupStatus` record--Returned by [`app_agent_setup_status`](#app_agent_setup_status), [`app_agent_setup_statuses_from_json`](#app_agent_setup_statuses_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Registry id (`claude-code`, `codex`, ...). |-| `name` | `String` | | Display name. |-| `installed` | `bool` | | Looks installed. |-| `skills_dir` / `skillsDir` | `Option<String>` | | User skills directory, when it supports skills. |-| `mcp_config` / `mcpConfig` | `Option<String>` | | MCP config file, when it supports MCP. |-| `cua_configured` / `cuaConfigured` | `bool` | | The cua MCP server is configured. |-| `skills_installed` / `skillsInstalled` | `Vec<String>` | | Bundled skills present. |-| `skills_outdated` / `skillsOutdated` | `Vec<String>` | | Installed skills that differ from the bundled copy. |-| `error` | `Option<String>` | | Problem reading its config. |--## `AppAgentSetupSummary` record--Returned by [`app_agent_setup_summary`](#app_agent_setup_summary).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | "cua MCP server configured, 3 skills installed". |-| `failed` | `Vec<String>` | | "name: why" per failed target. |-| `line` | `String` | | "Claude Code: done" / "Claude Code: failed". |--## `app_agent_key_form`--The add or replace sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentKeyForm(input: AppAgentKeysInput, form: AppAgentKeyFormInput) -> AppAgentKeyFormView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_key_form(input: AppAgentKeysInput, form: AppAgentKeyFormInput) -> AppAgentKeyFormView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppAgentKeysInput`](#appagentkeysinput-record) | required |-| `form` | [`AppAgentKeyFormInput`](#appagentkeyforminput-record) | required |--**Returns** [`AppAgentKeyFormView`](#appagentkeyformview-record)--## `app_agent_key_form_input_from_json`--A sheet input from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentKeyFormInputFromJson(json: String) throws -> AppAgentKeyFormInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_key_form_input_from_json(json: String) -> Result<AppAgentKeyFormInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppAgentKeyFormInput`](#appagentkeyforminput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_agent_key_name_problem`--Why `name` can't hold an Other key (`None`: it can).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentKeyNameProblem(name: String) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_key_name_problem(name: String) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `name` | `String` | required |--**Returns** `Option<String>`--## `app_agent_key_remove_confirm`--The question before removing the key `env` (`None`: none is saved).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentKeyRemoveConfirm(input: AppAgentKeysInput, env: String) -> AppAgentKeyConfirm?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_key_remove_confirm(input: AppAgentKeysInput, env: String) -> Option<AppAgentKeyConfirm>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppAgentKeysInput`](#appagentkeysinput-record) | required |-| `env` | `String` | required |--**Returns** [`Option<AppAgentKeyConfirm>`](#appagentkeyconfirm-record)--## `app_agent_keys_input_from_json`--The section's input from JSON (`agent_keys.list`'s answer, camelCase).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentKeysInputFromJson(json: String) throws -> AppAgentKeysInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_keys_input_from_json(json: String) -> Result<AppAgentKeysInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppAgentKeysInput`](#appagentkeysinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_agent_keys_view`--Settings, Agents: the rows for the keys the daemon reported.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentKeysView(input: AppAgentKeysInput) -> AppAgentKeysView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_keys_view(input: AppAgentKeysInput) -> AppAgentKeysView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppAgentKeysInput`](#appagentkeysinput-record) | required |--**Returns** [`AppAgentKeysView`](#appagentkeysview-record)--## `app_agent_settings_rows`--Settings rows for the coding agents (`total`: bundled skills).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSettingsRows(statuses: [AppAgentSetupStatus], total: UInt32) -> [AppAgentSettingsRow]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_settings_rows(statuses: Vec<AppAgentSetupStatus>, total: u32) -> Vec<AppAgentSettingsRow>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `statuses` | [`Vec<AppAgentSetupStatus>`](#appagentsetupstatus-record) | required |-| `total` | `u32` | required |--**Returns** [`Vec<AppAgentSettingsRow>`](#appagentsettingsrow-record)--## `app_agent_setup_outcome`--The SDK's setup outcome as the app core reads it.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSetupOutcome(outcome: AgentSetupOutcome) -> AppAgentSetupOutcomeInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_setup_outcome(outcome: AgentSetupOutcome) -> AppAgentSetupOutcomeInput-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `outcome` | [`AgentSetupOutcome`](/cua-sdk/reference/agent-setup#agentsetupoutcome-record) | required |--**Returns** [`AppAgentSetupOutcomeInput`](#appagentsetupoutcomeinput-record)--## `app_agent_setup_outcomes_from_json`--Agent setup outcomes from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSetupOutcomesFromJson(json: String) throws -> [AppAgentSetupOutcomeInput]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_setup_outcomes_from_json(json: String) -> Result<Vec<AppAgentSetupOutcomeInput>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppAgentSetupOutcomeInput>`](#appagentsetupoutcomeinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_agent_setup_status`--The SDK's agent detection as the app core reads it.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSetupStatus(info: AgentInfo) -> AppAgentSetupStatus-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_setup_status(info: AgentInfo) -> AppAgentSetupStatus-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `info` | [`AgentInfo`](/cua-sdk/reference/agent-setup#agentinfo-record) | required |--**Returns** [`AppAgentSetupStatus`](#appagentsetupstatus-record)--## `app_agent_setup_statuses_from_json`--Coding agents' setup states from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSetupStatusesFromJson(json: String) throws -> [AppAgentSetupStatus]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_setup_statuses_from_json(json: String) -> Result<Vec<AppAgentSetupStatus>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppAgentSetupStatus>`](#appagentsetupstatus-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_agent_setup_summary`--What an agent setup did for one agent.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentSetupSummary(outcomes: [AppAgentSetupOutcomeInput], agent: String, name: String) -> AppAgentSetupSummary-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_setup_summary(outcomes: Vec<AppAgentSetupOutcomeInput>, agent: String, name: String) -> AppAgentSetupSummary-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `outcomes` | [`Vec<AppAgentSetupOutcomeInput>`](#appagentsetupoutcomeinput-record) | required |-| `agent` | `String` | required |-| `name` | `String` | required |--**Returns** [`AppAgentSetupSummary`](#appagentsetupsummary-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/cloud.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/cloud.mdxdeleted file mode 100644index 4f0c0f9bde..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/cloud.mdx+++ /dev/null@@ -1,501 +0,0 @@-----title: "Your cloud"-description: "The \"Connect a cloud\" sheet and the New Space wizard's \"Your cloud\": providers with their found mark, Test that creates nothing, Connect, and what a connected cloud runs at what cost."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_cloud_connect_reduce` applies an action and `app_cloud_connect_view` derives the sheet; its `request` is the `cloud_test` or `cloud_connect` call to run. `app_connected_clouds_from_status_json` turns the SDK's `cloud_status` into the wizard's `clouds`.--## `AppConnectedCloud` record--Returned by [`app_connected_cloud_from_json`](#app_connected_cloud_from_json), [`app_connected_clouds_from_status_json`](#app_connected_clouds_from_status_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | The SDK's `on` word: `aws`, `gcp`, `modal`. |-| `title` | `String` | | `AWS`, `Google Cloud`, `Modal`. |-| `label` | `String` | | "AWS \u{b7} us-west-2". |-| `is_default` / `isDefault` | `bool` | | It is the default location (`default.on`). |-| `ttl_hours` / `ttlHours` | `u32` | | Hours after which a Space there deletes itself (0: never). |-| `offers` | [`Vec<AppCloudOffer>`](#appcloudoffer-record) | | What it runs. |--## `AppCloudOffer` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image` | `String` | | The image family: `linux`, `linux-slim`, `linux-vm`, `windows`, `omarchy`, `macos`. |-| `kind` | `String` | | `container` or `vm`. |-| `supported` | `bool` | | Whether it can run there. |-| `reason` | `String` | | Why not (one line), or a note. |-| `machine_type` / `machineType` | `String` | | The machine type the cloud picks (`t4g.medium`). |-| `usd_per_hour` / `usdPerHour` | `f64` | | Estimated US dollars per hour while it runs. |--## `app_connected_clouds_from_status_json`--The wizard's connected clouds from the SDK's `cloud_status` JSON.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appConnectedCloudsFromStatusJson(json: String) throws -> [AppConnectedCloud]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_connected_clouds_from_status_json(json: String) -> Result<Vec<AppConnectedCloud>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppConnectedCloud>`](#appconnectedcloud-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_connected_cloud_from_json`--A connected cloud from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appConnectedCloudFromJson(json: String) throws -> AppConnectedCloud-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_connected_cloud_from_json(json: String) -> Result<AppConnectedCloud, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppConnectedCloud`](#appconnectedcloud-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_is_cloud_word`--Whether a `default.on` value names one of the user's clouds.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appIsCloudWord(on: String) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_is_cloud_word(on: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `on` | `String` | required |--**Returns** `bool`--## `AppCloudCheckInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | `credentials`, `permissions`, `quota`, ... |-| `ok` | `bool` | | Passed. |-| `detail` | `String` | | What was found, or what to fix. |--## `AppCloudCheckRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ok` | `bool` | | Passed. |-| `text` | `String` | | "credentials: account 418638388952". |--## `AppCloudConnectInput` record--Returned by [`app_cloud_connect_input_from_json`](#app_cloud_connect_input_from_json), [`app_cloud_connect_input_from_status_json`](#app_cloud_connect_input_from_status_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `providers` | [`Vec<AppCloudProviderInput>`](#appcloudproviderinput-record) | | The providers this build supports. |--## `AppCloudConnectState` record--Returned by [`app_cloud_connect_initial`](#app_cloud_connect_initial), [`app_cloud_connect_reduce`](#app_cloud_connect_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `selected` | `Option<String>` | | The chosen provider (`aws`); `None`: the first with credentials. |-| `value` | `String` | | The region, project or environment as typed (empty: the default). |-| `profile` | `String` | | The profile as typed (empty: the default). |-| `make_default` / `makeDefault` | `bool` | | Also make it the default location. |-| `phase` | [`AppCloudConnectPhase`](#appcloudconnectphase-enum) | | Where it is. |--## `AppCloudConnectView` record--Returned by [`app_cloud_connect_view`](#app_cloud_connect_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Connect a cloud". |-| `rows` | [`Vec<AppCloudProviderRow>`](#appcloudproviderrow-record) | | The providers. |-| `field` | [`Option<AppCloudField>`](#appcloudfield-record) | | The region, project or environment field. |-| `profile_field` / `profileField` | [`Option<AppCloudField>`](#appcloudfield-record) | | The profile field (AWS, Modal). |-| `checks` | [`Vec<AppCloudCheckRow>`](#appcloudcheckrow-record) | | The checks the last test ran. |-| `result` | `Option<String>` | | One line under the checks ("Ready. Nothing was created."). |-| `touches` | `Vec<String>` | | "What Cua will touch": what the selected provider creates, that only Cua's own tagged resources are ever touched, how cost and auto-stop work, and the command to remove everything. Empty when no real provider is chosen (including "No cloud"). |-| `make_default_label` / `makeDefaultLabel` | `String` | | "Make default". |-| `make_default` / `makeDefault` | `bool` | | Its value. |-| `test_label` / `testLabel` | `String` | | "Test" / "Testing\u{2026}". |-| `can_test` / `canTest` | `bool` | | Test can be pressed. |-| `test_help` / `testHelp` | `String` | | Test's tooltip. |-| `connect_label` / `connectLabel` | `String` | | "Connect" / "Connecting\u{2026}". |-| `can_connect` / `canConnect` | `bool` | | Connect can be pressed. |-| `cancel_label` / `cancelLabel` | `String` | | "Cancel". |-| `error` | `Option<String>` | | The last error. |-| `done` | `bool` | | Connected: close the sheet and refresh. |-| `request` | [`Option<AppCloudConnectRequest>`](#appcloudconnectrequest-enum) | | The call to run now (while testing or connecting). |--## `AppCloudField` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `region`, `project`, `environment`, `profile`. |-| `label` | `String` | | "Region". |-| `placeholder` | `String` | | The default the provider uses when it is empty. |-| `value` | `String` | | As typed. |--## `AppCloudProviderInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | `aws`, `gcp`, `modal`. |-| `title` | `String` | | `AWS`, `Google Cloud`, `Modal`. |-| `connected` | `bool` | | Connected already. |-| `found` | `bool` | | This machine has its CLI sign-in (or config). |-| `source` | `String` | | Where ("~/.aws profile default"), never a secret. |-| `profile` | `String` | | AWS or Modal profile (the connected or detected one). |-| `region` | `String` | | Region. |-| `project` | `String` | | GCP project. |-| `environment` | `String` | | Modal environment. |-| `label` | `String` | | "AWS \u{b7} us-west-2". |--## `AppCloudProviderRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `aws`. |-| `title` | `String` | | `AWS`. |-| `detail` | `String` | | The one line after the title ("Connected, AWS \u{b7} us-west-2", "~/.aws profile default", "No sign-in found"). |-| `found` | `bool` | | This machine has its sign-in (the found mark). |-| `selected` | `bool` | | Chosen. |--## `AppCloudTargetArgs` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | `aws`, `gcp`, `modal`. |-| `profile` | `Option<String>` | | AWS or Modal profile. |-| `region` | `Option<String>` | | AWS region. |-| `project` | `Option<String>` | | GCP project. |-| `environment` | `Option<String>` | | Modal environment. |--## `AppCloudConnectAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.select(name: String)-.setValue(text: String)-.setProfile(text: String)-.setMakeDefault(on: Bool)-.test-.tested(ok: Bool, account: String, checks: [AppCloudCheckInput])-.connect-.connected(label: String)-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppCloudConnectAction::Select { name: String }-AppCloudConnectAction::SetValue { text: String }-AppCloudConnectAction::SetProfile { text: String }-AppCloudConnectAction::SetMakeDefault { on: bool }-AppCloudConnectAction::Test-AppCloudConnectAction::Tested { ok: bool, account: String, checks: Vec<AppCloudCheckInput> }-AppCloudConnectAction::Connect-AppCloudConnectAction::Connected { label: String }-AppCloudConnectAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Select` | A provider row. Fields: `name: String` |-| `SetValue` | The region, project or environment field. Fields: `text: String` |-| `SetProfile` | The profile field. Fields: `text: String` |-| `SetMakeDefault` | "Make default". Fields: `on: bool` |-| `Test` | Test pressed (the shell runs the view's request). |-| `Tested` | The test finished. Fields: `ok: bool`, `account: String`, `checks: Vec<AppCloudCheckInput>` |-| `Connect` | Connect pressed (the shell runs the view's request). |-| `Connected` | Connected. Fields: `label: String` |-| `Failed` | A call failed. Fields: `error: String` |--## `AppCloudConnectPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.idle-.testing-.tested(ok: Bool, account: String, checks: [AppCloudCheckInput])-.connecting-.connected(label: String)-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppCloudConnectPhase::Idle-AppCloudConnectPhase::Testing-AppCloudConnectPhase::Tested { ok: bool, account: String, checks: Vec<AppCloudCheckInput> }-AppCloudConnectPhase::Connecting-AppCloudConnectPhase::Connected { label: String }-AppCloudConnectPhase::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Idle` | Nothing running. |-| `Testing` | `cloud_test` is running. |-| `Tested` | A test finished. Fields: `ok: bool`, `account: String`, `checks: Vec<AppCloudCheckInput>` |-| `Connecting` | `cloud_connect` is running. |-| `Connected` | Connected (the shell closes the sheet and refreshes). Fields: `label: String` |-| `Failed` | A call failed. Fields: `error: String` |--## `AppCloudConnectRequest` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.test(target: AppCloudTargetArgs)-.connect(target: AppCloudTargetArgs, makeDefault: Bool)-```--</Tab>-<Tab value="Rust">--```rust-AppCloudConnectRequest::Test { target: AppCloudTargetArgs }-AppCloudConnectRequest::Connect { target: AppCloudTargetArgs, make_default: bool }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Test` | `cloud_test`. Fields: `target: AppCloudTargetArgs` |-| `Connect` | `cloud_connect`. Fields: `target: AppCloudTargetArgs`, `make_default: bool` |--## `app_cloud_connect_action_from_json`--A "Connect a cloud" action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCloudConnectActionFromJson(json: String) throws -> AppCloudConnectAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_cloud_connect_action_from_json(json: String) -> Result<AppCloudConnectAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppCloudConnectAction`](#appcloudconnectaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_cloud_connect_initial`--A new "Connect a cloud" sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCloudConnectInitial() -> AppCloudConnectState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_cloud_connect_initial() -> AppCloudConnectState-```--</Tab>-</Tabs>--**Returns** [`AppCloudConnectState`](#appcloudconnectstate-record)--## `app_cloud_connect_input_from_json`--"Connect a cloud" input from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCloudConnectInputFromJson(json: String) throws -> AppCloudConnectInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_cloud_connect_input_from_json(json: String) -> Result<AppCloudConnectInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppCloudConnectInput`](#appcloudconnectinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_cloud_connect_input_from_status_json`--The sheet's input from the SDK's `cloud_status` JSON.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCloudConnectInputFromStatusJson(json: String) throws -> AppCloudConnectInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_cloud_connect_input_from_status_json(json: String) -> Result<AppCloudConnectInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppCloudConnectInput`](#appcloudconnectinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_cloud_connect_reduce`--Advances the "Connect a cloud" sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCloudConnectReduce(input: AppCloudConnectInput, state: AppCloudConnectState, action: AppCloudConnectAction) -> AppCloudConnectState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_cloud_connect_reduce(input: AppCloudConnectInput, state: AppCloudConnectState, action: AppCloudConnectAction) -> AppCloudConnectState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppCloudConnectInput`](#appcloudconnectinput-record) | required |-| `state` | [`AppCloudConnectState`](#appcloudconnectstate-record) | required |-| `action` | [`AppCloudConnectAction`](#appcloudconnectaction-enum) | required |--**Returns** [`AppCloudConnectState`](#appcloudconnectstate-record)--## `app_cloud_connect_view`--The "Connect a cloud" sheet as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCloudConnectView(input: AppCloudConnectInput, state: AppCloudConnectState) -> AppCloudConnectView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_cloud_connect_view(input: AppCloudConnectInput, state: AppCloudConnectState) -> AppCloudConnectView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppCloudConnectInput`](#appcloudconnectinput-record) | required |-| `state` | [`AppCloudConnectState`](#appcloudconnectstate-record) | required |--**Returns** [`AppCloudConnectView`](#appcloudconnectview-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/creates.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/creates.mdxdeleted file mode 100644index ce116970fd..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/creates.mdx+++ /dev/null@@ -1,272 +0,0 @@-----title: "Creates and deletes"-description: "Spaces being created or deleted: the rows they show at once, their progress and how they hand over to the registry."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_creates_reduce` applies a create or delete action (a start, the SDK's create progress, a timer tick, the result) and `app_creates_compose` adds the pending rows to the registry's Spaces. Progress moves by the SDK's fractions, else by the time each phase usually takes for the image, from the `now` the shell passes.--## `AppCreatesState` record--Returned by [`app_creates_reduce`](#app_creates_reduce), [`app_creates_settle`](#app_creates_settle).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `pending` | [`Vec<AppPendingCreate>`](#apppendingcreate-record) | | Oldest first. |-| `deleting` | [`Vec<AppPendingDelete>`](#apppendingdelete-record) | | Spaces being deleted, oldest first. |-| `powering` | [`Vec<AppPendingPower>`](/cua-sdk/reference/spaces/app-core/power#apppendingpower-record) | | Spaces being turned off or on (or whose last try failed). |--## `AppCreateAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.start(id: String, name: String, os: AppSpaceOs, provider: AppSpaceProvider, now: Int64, image: String?, kind: AppSpaceKind?, hostArch: String?, gpu: Bool, host: String?, hostName: String?)-.progress(id: String, phase: String, fraction: Double?, now: Int64?, bytesDone: UInt64?, bytesTotal: UInt64?, bytesPerSecond: Double?)-.cancelStart(id: String)-.cancelDone(id: String)-.cancelFail(id: String, error: String)-.tick(now: Int64)-.finish(id: String, spaceId: String)-.fail(id: String, error: String, errorVariant: String)-.dismiss(id: String)-.deleteStart(id: String, now: Int64)-.deleteFail(id: String)-.deleteDone(id: String)-.powerStart(id: String, on: Bool, now: Int64)-.powerDone(id: String)-.powerFail(id: String, error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppCreateAction::Start { id: String, name: String, os: AppSpaceOs, provider: AppSpaceProvider, now: i64, image: Option<String>, kind: Option<AppSpaceKind>, host_arch: Option<String>, gpu: bool, host: Option<String>, host_name: Option<String> }-AppCreateAction::Progress { id: String, phase: String, fraction: Option<f64>, now: Option<i64>, bytes_done: Option<u64>, bytes_total: Option<u64>, bytes_per_second: Option<f64> }-AppCreateAction::CancelStart { id: String }-AppCreateAction::CancelDone { id: String }-AppCreateAction::CancelFail { id: String, error: String }-AppCreateAction::Tick { now: i64 }-AppCreateAction::Finish { id: String, space_id: String }-AppCreateAction::Fail { id: String, error: String, error_variant: String }-AppCreateAction::Dismiss { id: String }-AppCreateAction::DeleteStart { id: String, now: i64 }-AppCreateAction::DeleteFail { id: String }-AppCreateAction::DeleteDone { id: String }-AppCreateAction::PowerStart { id: String, on: bool, now: i64 }-AppCreateAction::PowerDone { id: String }-AppCreateAction::PowerFail { id: String, error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Start` | A create started: its row shows now. Fields: `id: String`, `name: String`, `os: AppSpaceOs`, `provider: AppSpaceProvider`, `now: i64`, `image: Option<String>`, `kind: Option<AppSpaceKind>`, `host_arch: Option<String>`, `gpu: bool`, `host: Option<String>`, `host_name: Option<String>` |-| `Progress` | The SDK reported progress. Fields: `id: String`, `phase: String`, `fraction: Option<f64>`, `now: Option<i64>`, `bytes_done: Option<u64>`, `bytes_total: Option<u64>`, `bytes_per_second: Option<f64>` |-| `CancelStart` | Cancel was pressed: the shell asks the SDK to cancel the create (`cancel_create` with the pending id, passed as the create's `create_id`); the row shows Cancelling until the create ends. Fields: `id: String` |-| `CancelDone` | The cancel finished (or the create ended cancelled): the row goes. Fields: `id: String` |-| `CancelFail` | The cancel itself failed: the row shows why. Fields: `id: String`, `error: String` |-| `Tick` | Time passed (a shell's timer, a few times a second while a create is pending): progress within a phase that reports no fraction advances with the time the phase usually takes. Fields: `now: i64` |-| `Finish` | The create returned the Space. Fields: `id: String`, `space_id: String` |-| `Fail` | The create failed. Fields: `id: String`, `error: String`, `error_variant: String` |-| `Dismiss` | Remove a failed row. Fields: `id: String` |-| `DeleteStart` | The user confirmed Delete: the row shows Deleting now. A second start for a Space already deleting does nothing. Fields: `id: String`, `now: i64` |-| `DeleteFail` | The delete failed: the row is back as the registry lists it. Fields: `id: String` |-| `DeleteDone` | The delete returned: the row goes now, and stays gone while the registry still lists the Space. Fields: `id: String` |-| `PowerStart` | The power button was pressed: the row says Suspending, Resuming, Turning off or Turning on now and the button waits. A second press while one runs does nothing. Fields: `id: String`, `on: bool`, `now: i64` |-| `PowerDone` | The SDK's stop or start returned: the row keeps saying so until the registry shows the Space on (or off). Fields: `id: String` |-| `PowerFail` | It failed: the row shows why, inline, and the button works again. Fields: `id: String`, `error: String` |--## `AppPendingCreate` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `pending:<token>`. |-| `name` | `String` | | Display name. |-| `os` | [`AppSpaceOs`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | Operating system. |-| `provider` | [`AppSpaceProvider`](/cua-sdk/reference/spaces/app-core/spaces#appspaceprovider-enum) | | Where it runs. |-| `started_at` / `startedAt` | `i64` | | Epoch ms it started. |-| `phase` | `String` | | The SDK's last phase word (`preparing`, `pulling`, ...). |-| `fraction` | `Option<f64>` | | The phase's fraction, when the SDK knows it. |-| `pulled` | `bool` | | The image was pulled (the pull takes most of the bar). |-| `permille` | `u32` | | Overall progress in thousandths; never goes backwards. |-| `error` | `Option<String>` | | Why it failed. |-| `credit_url` / `creditUrl` | `Option<String>` | | It failed for want of Cua Cloud credit: the billing page. |-| `space_id` / `spaceId` | `Option<String>` | | The registered Space's id once it finished; the row goes when the registry lists it. |-| `image` | `Option<String>` | | The image asked for. |-| `kind` | [`Option<AppSpaceKind>`](/cua-sdk/reference/spaces/app-core/spaces#appspacekind-enum) | | Container or VM. |-| `arch` | `Option<String>` | | The platform that will run (`arm64`, `amd64`). |-| `emulated` | `bool` | | It runs emulated: a local Space whose platform is not the host's. |-| `phase_at` / `phaseAt` | `Option<i64>` | | Epoch ms the current phase began (the time-based progress within a phase that reports no fraction), or last moved (a new fraction): a phase that stays put longer than `stall_limit_secs` fails the row with `stall_error`. |-| `bytes_done` / `bytesDone` | `Option<u64>` | | Bytes of the download so far, when the SDK counts them. |-| `bytes_total` / `bytesTotal` | `Option<u64>` | | Bytes the download has in all. |-| `bytes_per_second` / `bytesPerSecond` | `Option<f64>` | | The download's smoothed rate, bytes per second. |-| `cancelling` | `bool` | | Cancel was pressed: the SDK is stopping the create and removing what it made; the row goes when that ends. |-| `gpu` | `bool` | | GPU acceleration was asked for. |-| `host` | `Option<String>` | | A create on one of your machines: that machine's relay id (the `host:<machine>` of the create's `on`). The machine lists the Space it is creating as a record of its own, which `compose` folds into this row. |-| `host_name` / `hostName` | `Option<String>` | | That machine's name, for the row and for a failure that names it. |--## `AppPendingDelete` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The Space's id. |-| `started_at` / `startedAt` | `i64` | | Epoch ms the delete started. |-| `done` | `bool` | | The delete returned: the row stays hidden until the registry stops listing the Space. |--## `app_creates_compose`--The registry's Spaces plus a row per Space being created.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCreatesCompose(spaces: [AppSpace], state: AppCreatesState) -> [AppSpace]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_creates_compose(spaces: Vec<AppSpace>, state: AppCreatesState) -> Vec<AppSpace>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |-| `state` | [`AppCreatesState`](#appcreatesstate-record) | required |--**Returns** [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record)--## `app_creates_is_deleting`--Whether the Space `id` is being deleted: a Delete for it does nothing.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCreatesIsDeleting(state: AppCreatesState, id: String) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_creates_is_deleting(state: AppCreatesState, id: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppCreatesState`](#appcreatesstate-record) | required |-| `id` | `String` | required |--**Returns** `bool`--## `app_creates_is_pending`--Whether `id` is a Space still being created (or whose create failed).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCreatesIsPending(id: String) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_creates_is_pending(id: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |--**Returns** `bool`--## `app_creates_reduce`--Advances the Spaces being created (see `spaces::creating`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCreatesReduce(state: AppCreatesState, action: AppCreateAction) -> AppCreatesState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_creates_reduce(state: AppCreatesState, action: AppCreateAction) -> AppCreatesState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppCreatesState`](#appcreatesstate-record) | required |-| `action` | [`AppCreateAction`](#appcreateaction-enum) | required |--**Returns** [`AppCreatesState`](#appcreatesstate-record)--## `app_creates_settle`--Drops finished creates the registry lists and finished deletes it no-longer lists (after each registry refresh).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCreatesSettle(state: AppCreatesState, spaces: [AppSpace]) -> AppCreatesState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_creates_settle(state: AppCreatesState, spaces: Vec<AppSpace>) -> AppCreatesState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppCreatesState`](#appcreatesstate-record) | required |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |--**Returns** [`AppCreatesState`](#appcreatesstate-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/devices.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/devices.mdxdeleted file mode 100644index 2d3f5c8257..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/devices.mdx+++ /dev/null@@ -1,912 +0,0 @@-----title: "Devices"-description: "Settings > Devices: this device's enrollment, the account's devices, Recent Access, and the enroll and approval sheets."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_devices_view` derives the Devices page from `app_devices_input` (a `Devices.snapshot`): this device's enrollment, the account's devices with their buttons, approval prompts that ask for presence, and Recent Access in words. `app_enroll_reduce` / `app_enroll_view` drive the enroll sheet (sign in again, or a one-time code approved elsewhere); `app_approve_reduce` / `app_approve_view` drive the approval sheet, whose `request` goes to `Devices.approve` after Touch ID or the login password; `app_confirm_presence` asks for that confirmation with the system's own prompt (Touch ID or the login password on macOS, Windows Hello, polkit on Linux). `app_machine_access_notice` says why a device that is signed in but not enrolled cannot open the account's machines, for their greyed-out Connect.--## `AppAuditInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ts` | `u64` | | Unix seconds. |-| `kind` | `String` | | Kind. |-| `device` | `Option<String>` | | Acting device. |-| `machine` | `Option<String>` | | Machine id. |-| `subject` | `Option<String>` | | Other party. |-| `detail` | `Option<String>` | | Detail. |--## `AppActivityRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ts` | `u64` | | Unix seconds. |-| `text` | `String` | | The line. |-| `notable` | `bool` | | Access by another account or an unenrolled device. |--## `AppBannerTone` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.info-.warning-.critical-```--</Tab>-<Tab value="Rust">--```rust-AppBannerTone::Info-AppBannerTone::Warning-AppBannerTone::Critical-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Info` | Informational. |-| `Warning` | Needs the user soon. |-| `Critical` | Blocks relay access now. |--## `AppThisDevice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`AppEnrollmentKind`](#appenrollmentkind-enum) | | State. |-| `title` | `String` | | "Enrolled until", "Grace ends", "Needs enrollment", ... |-| `at` | `Option<u64>` | | The date after the title (Unix seconds); the shell formats it. |-| `name` | `Option<String>` | | The device's name, once registered. |-| `action_label` / `actionLabel` | `Option<String>` | | "Enroll…" when this device needs it. |--## `AppEnrollmentKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.enrolled-.grace-.needsEnrollment-.waiting-.due-.revoked-```--</Tab>-<Tab value="Rust">--```rust-AppEnrollmentKind::Enrolled-AppEnrollmentKind::Grace-AppEnrollmentKind::NeedsEnrollment-AppEnrollmentKind::Waiting-AppEnrollmentKind::Due-AppEnrollmentKind::Revoked-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Enrolled` | Enrolled: the relay lets it reach the account's machines. |-| `Grace` | Not enrolled, still let through until the grace period ends. |-| `NeedsEnrollment` | Not enrolled, and the relay refuses it. |-| `Waiting` | Registered, waiting for approval from an enrolled device. |-| `Due` | Enrollment ran out: one approval re-verifies it. |-| `Revoked` | Revoked. |--## `AppApprovalPrompt` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `device_id` / `deviceId` | `String` | | Device id to approve. |-| `text` | `String` | | The question. |-| `requires_presence` / `requiresPresence` | `bool` | | Ask for Touch ID / the login password before approving. |-| `name` | `String` | | The device's name. |-| `expired` | `bool` | | Re-verification of a device whose enrollment ran out (no code). |-| `notify_title` / `notifyTitle` | `String` | | The system notification's title. |-| `notify_body` / `notifyBody` | `String` | | The system notification's body. |--## `AppMachineInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Machine id. |-| `name` | `String` | | Display name. |-| `confirmed` | `bool` | | Registered with an enrolled device's proof, or confirmed since (S5). `true` from a relay that predates the check. |--## `AppUnconfirmedMachine` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Machine id (the native side's `confirm_machine` call takes this). |-| `title` | `String` | | Display name, or the id when it has none yet. |-| `confirm` | [`AppDeviceConfirm`](#appdeviceconfirm-record) | | Asked before confirming (both shells show it as a native alert). |--## `app_machine_access_notice`--Why this device cannot open the account's machines for its enrollment-`kind` (`None` while it can). `pending_code` is the code it shows while-it waits for approval.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMachineAccessNotice(kind: AppEnrollmentKind, pendingCode: String?) -> AppMachineAccessNotice?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_machine_access_notice(kind: AppEnrollmentKind, pending_code: Option<String>) -> Option<AppMachineAccessNotice>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `kind` | [`AppEnrollmentKind`](#appenrollmentkind-enum) | required |-| `pending_code` | `Option<String>` | required |--**Returns** [`Option<AppMachineAccessNotice>`](#appmachineaccessnotice-record)--## `AppMachineAccessNotice` record--Returned by [`app_machine_access_notice`](#app_machine_access_notice).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`AppEnrollmentKind`](#appenrollmentkind-enum) | | This device's enrollment. |-| `status` | `String` | | The machine's Status: "Not enrolled", "Waiting for approval", ... |-| `text` | `String` | | The line above the disabled Connect. |-| `action_label` / `actionLabel` | `String` | | The action's label; it opens the enroll sheet. |--## `AppApproveRequest` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `code` | `Option<String>` | | The code (a new device). |-| `device_id` / `deviceId` | `Option<String>` | | The device id (re-verification). |--## `AppApproveSheetState` record--Returned by [`app_approve_open`](#app_approve_open), [`app_approve_reduce`](#app_approve_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `device_id` / `deviceId` | `String` | | The device to approve. |-| `name` | `String` | | Its name. |-| `expired` | `bool` | | Re-verification (no code) rather than a new device. |-| `code` | `String` | | The code as typed. |-| `busy` | `bool` | | The approval runs (presence, then the relay). |-| `error` | `Option<String>` | | The last failure. |-| `code_expired` / `codeExpired` | `bool` | | The last code the relay saw expired: offers approving the waiting device of this name by id instead (see `code_expired_fallback`). Typing a new code clears it. |--## `AppApproveSheetView` record--Returned by [`app_approve_view`](#app_approve_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | Title. |-| `message` | `String` | | What approving does. |-| `needs_code` / `needsCode` | `bool` | | A code field shows. |-| `code_label` / `codeLabel` | `String` | | The code field's label. |-| `code_placeholder` / `codePlaceholder` | `String` | | Its placeholder. |-| `code` | `String` | | The code, normalized (`K7QX-M2RP`). |-| `can_approve` / `canApprove` | `bool` | | Approve is enabled. |-| `approve_label` / `approveLabel` | `String` | | Approve. |-| `deny_label` / `denyLabel` | `String` | | Deny (a new device; revokes it) or Not Now (re-verification). |-| `deny_revokes` / `denyRevokes` | `bool` | | Deny revokes the device (one click, no confirmation). |-| `presence_reason` / `presenceReason` | `String` | | The reason the presence prompt shows. |-| `busy` | `bool` | | Working. |-| `error` | `Option<String>` | | A failure. |-| `request` | [`Option<AppApproveRequest>`](#appapproverequest-record) | | What to send once presence is confirmed (`None` until ready). |--## `AppDeviceBanner` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `tone` | [`AppBannerTone`](#appbannertone-enum) | | Tone. |-| `text` | `String` | | Text. |-| `action` | [`Option<AppDeviceAction>`](#appdeviceaction-enum) | | Button, if any. |-| `action_label` / `actionLabel` | `Option<String>` | | The button's label. |--## `AppDeviceConfirm` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | The question. |-| `message` | `String` | | What happens. |-| `confirm_label` / `confirmLabel` | `String` | | The confirming button. |-| `cancel_label` / `cancelLabel` | `String` | | The other button. |--## `AppDeviceInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `dev_…`. |-| `name` | `String` | | Display name. |-| `state` | `String` | | `pending`, `enrolled`, `expired` or `revoked`. |-| `enrolled_until` / `enrolledUntil` | `Option<u64>` | | Re-verification due at (Unix seconds). |-| `last_seen` / `lastSeen` | `Option<u64>` | | Last session (Unix seconds). |-| `current` | `bool` | | This device. |-| `platform` | `Option<String>` | | Operating system the device reported (`macos`, `windows`, `linux`). |--## `AppDeviceRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Device id. |-| `title` | `String` | | Name (`(this device)` suffix for the current one). |-| `subtitle` | `String` | | State in words. |-| `actions` | [`Vec<AppDeviceAction>`](#appdeviceaction-enum) | | Buttons. |-| `name` | `String` | | The name as stored (Rename starts from it). |-| `platform` | `String` | | Operating system in words (`macOS`), empty when unknown. |-| `detail` | `String` | | Platform and state on one line. |-| `last_seen` / `lastSeen` | `Option<u64>` | | Last session (Unix seconds); the shell says it relative to now. |-| `current` | `bool` | | This device. |-| `revoke_confirm` / `revokeConfirm` | [`Option<AppDeviceConfirm>`](#appdeviceconfirm-record) | | Asked before Revoke. |--## `AppDevicesInput` record--Returned by [`app_devices_input`](#app_devices_input), [`app_devices_input_from_json`](#app_devices_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `devices` | [`Vec<AppDeviceInput>`](#appdeviceinput-record) | | The account's devices. |-| `audit` | [`Vec<AppAuditInput>`](#appauditinput-record) | | The account's audit events, newest last. |-| `local_device_id` / `localDeviceId` | `Option<String>` | | This device's id when it has a key (it may not be registered yet). |-| `pending_code` / `pendingCode` | `Option<String>` | | The one-time code this device shows while it waits for approval. |-| `enforce_after` / `enforceAfter` | `Option<u64>` | | When the relay stops letting unenrolled devices through. |-| `machine_names` / `machineNames` | `HashMap<String, String>` | | Machine ids to display names. |-| `machines` | [`Vec<AppMachineInput>`](#appmachineinput-record) | | The account's relay machines, for the "New machine" confirm badge (S5). Empty on a relay that predates it, or when this device cannot list them, same as `machine_names`. |--## `AppDevicesLabels` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | Page title. |-| `this_device` / `thisDevice` | `String` | | This device's section. |-| `devices` | `String` | | The account's devices. |-| `recent` | `String` | | The access log's section. |-| `recent_empty` / `recentEmpty` | `String` | | When the access log is empty. |-| `last_seen` / `lastSeen` | `String` | | "Last seen" before a relative time. |-| `approve` | `String` | | Approve button (the row's, and the sheet's for a new device). |-| `deny` | `String` | | The row's Deny: revokes a still-pending device in one click, or (a device due for re-verification) only dismisses it, like the sheet's Deny and Not Now. |-| `rename` | `String` | | Rename button. |-| `revoke` | `String` | | Revoke button. |-| `rename_title` / `renameTitle` | `String` | | The rename prompt's title. |-| `rename_confirm` / `renameConfirm` | `String` | | The rename prompt's confirming button. |-| `cancel` | `String` | | Cancel. |-| `signed_out` / `signedOut` | `String` | | Shown instead of the page while signed out. |-| `new_machines` / `newMachines` | `String` | | The unconfirmed-machines section's heading. |-| `confirm_machine` / `confirmMachine` | `String` | | Confirm button on a new machine. |--## `AppDevicesView` record--Returned by [`app_devices_view`](#app_devices_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `banner` | [`Option<AppDeviceBanner>`](#appdevicebanner-record) | | Banner, if something needs the user. |-| `enrolled` | `bool` | | This device is enrolled (relay machines are reachable). |-| `rows` | [`Vec<AppDeviceRow>`](#appdevicerow-record) | | Device rows, this device first. |-| `approvals` | [`Vec<AppApprovalPrompt>`](#appapprovalprompt-record) | | Devices this device can approve. |-| `activity` | [`Vec<AppActivityRow>`](#appactivityrow-record) | | Access log, newest first. |-| `this_device` / `thisDevice` | [`AppThisDevice`](#appthisdevice-record) | | This device's enrollment. |-| `recent` | [`Vec<AppActivityRow>`](#appactivityrow-record) | | "Recent access": which device (or account) opened which machine, newest first, at most `RECENT_ACCESS_LIMIT`. |-| `unconfirmed_machines` / `unconfirmedMachines` | [`Vec<AppUnconfirmedMachine>`](#appunconfirmedmachine-record) | | Machines registered without an enrolled device's proof, still waiting to be confirmed (S5); empty most of the time. |-| `labels` | [`AppDevicesLabels`](#appdeviceslabels-record) | | Words. |--## `AppEnrollOption` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `method` | [`AppEnrollMethod`](#appenrollmethod-enum) | | Method. |-| `title` | `String` | | Title. |-| `detail` | `String` | | One line under it. |--## `AppEnrollState` record--Returned by [`app_enroll_initial`](#app_enroll_initial), [`app_enroll_reduce`](#app_enroll_reduce), [`app_enroll_state_from_json`](#app_enroll_state_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | [`AppEnrollPhase`](#appenrollphase-enum) | | Phase. |-| `method` | [`Option<AppEnrollMethod>`](#appenrollmethod-enum) | | The chosen method. |-| `code` | `Option<String>` | | The one-time code, while waiting. |-| `error` | `Option<String>` | | The last failure. |--## `AppEnrollView` record--Returned by [`app_enroll_view`](#app_enroll_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | Title. |-| `lede` | `String` | | One line under the title. |-| `options` | [`Vec<AppEnrollOption>`](#appenrolloption-record) | | The methods (while choosing). |-| `code` | `Option<String>` | | The one-time code (while waiting). |-| `code_help` / `codeHelp` | `Option<String>` | | How to use the code. |-| `status` | `Option<String>` | | What is happening now. |-| `error` | `Option<String>` | | A failure. |-| `busy` | `bool` | | Working (a spinner). |-| `done` | `bool` | | Enrolled. |-| `back_label` / `backLabel` | `Option<String>` | | Back (after a failure). |-| `close_label` / `closeLabel` | `String` | | Cancel, or Done once enrolled. |--## `AppApproveSheetAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.setCode(code: String)-.submit-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppApproveSheetAction::SetCode { code: String }-AppApproveSheetAction::Submit-AppApproveSheetAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SetCode` | The code field changed. Fields: `code: String` |-| `Submit` | Approve was pressed (the shell asks for presence, then the relay). |-| `Failed` | Presence or the relay refused. Fields: `error: String` |--## `AppDeviceAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.enroll-.approve-.rename-.revoke-```--</Tab>-<Tab value="Rust">--```rust-AppDeviceAction::Enroll-AppDeviceAction::Approve-AppDeviceAction::Rename-AppDeviceAction::Revoke-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Enroll` | Enroll this device (the enroll sheet). |-| `Approve` | Approve another device (after presence). |-| `Rename` | Rename a device. |-| `Revoke` | Revoke a device (after its confirmation). |--## `AppEnrollAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.choose(method: AppEnrollMethod)-.signedIn-.registered(enrolled: Bool, code: String?)-.approved-.failed(error: String)-.back-```--</Tab>-<Tab value="Rust">--```rust-AppEnrollAction::Choose { method: AppEnrollMethod }-AppEnrollAction::SignedIn-AppEnrollAction::Registered { enrolled: bool, code: Option<String> }-AppEnrollAction::Approved-AppEnrollAction::Failed { error: String }-AppEnrollAction::Back-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Choose` | A method was chosen. Fields: `method: AppEnrollMethod` |-| `SignedIn` | The interactive sign-in finished. |-| `Registered` | The relay registered this device. Fields: `enrolled: bool`, `code: Option<String>` |-| `Approved` | An enrolled device approved this one. |-| `Failed` | A step failed. Fields: `error: String` |-| `Back` | Back to the choice. |--## `AppEnrollMethod` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.signIn-.approve-```--</Tab>-<Tab value="Rust">--```rust-AppEnrollMethod::SignIn-AppEnrollMethod::Approve-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SignIn` | A fresh interactive sign-in (enrolls this device at once). |-| `Approve` | A one-time code approved from an enrolled device. |--## `AppEnrollPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.choose-.signingIn-.registering-.waiting-.enrolled-.failed-```--</Tab>-<Tab value="Rust">--```rust-AppEnrollPhase::Choose-AppEnrollPhase::SigningIn-AppEnrollPhase::Registering-AppEnrollPhase::Waiting-AppEnrollPhase::Enrolled-AppEnrollPhase::Failed-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Choose` | Choosing a method. |-| `SigningIn` | The shell runs an interactive sign-in. |-| `Registering` | The shell registers this device with the relay. |-| `Waiting` | The code shows; the shell polls until an enrolled device approves. |-| `Enrolled` | Enrolled. |-| `Failed` | Something failed; Back returns to the choice. |--## `app_approve_open`--Opens the approval sheet for a prompt.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appApproveOpen(prompt: AppApprovalPrompt) -> AppApproveSheetState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_approve_open(prompt: AppApprovalPrompt) -> AppApproveSheetState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `prompt` | [`AppApprovalPrompt`](#appapprovalprompt-record) | required |--**Returns** [`AppApproveSheetState`](#appapprovesheetstate-record)--## `app_approve_reduce`--Advances the approval sheet. `devices` is the account's current devices-(for approving the waiting device of a code's name by id once the code-expires).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appApproveReduce(state: AppApproveSheetState, action: AppApproveSheetAction, devices: [AppDeviceInput]) -> AppApproveSheetState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_approve_reduce(state: AppApproveSheetState, action: AppApproveSheetAction, devices: Vec<AppDeviceInput>) -> AppApproveSheetState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppApproveSheetState`](#appapprovesheetstate-record) | required |-| `action` | [`AppApproveSheetAction`](#appapprovesheetaction-enum) | required |-| `devices` | [`Vec<AppDeviceInput>`](#appdeviceinput-record) | required |--**Returns** [`AppApproveSheetState`](#appapprovesheetstate-record)--## `app_approve_sheet_action_from_json`--An approval sheet action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appApproveSheetActionFromJson(json: String) throws -> AppApproveSheetAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_approve_sheet_action_from_json(json: String) -> Result<AppApproveSheetAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppApproveSheetAction`](#appapprovesheetaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_approve_view`--The approval sheet as drawn. `devices` is the account's current devices-(see `app_approve_reduce`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appApproveView(state: AppApproveSheetState, devices: [AppDeviceInput]) -> AppApproveSheetView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_approve_view(state: AppApproveSheetState, devices: Vec<AppDeviceInput>) -> AppApproveSheetView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppApproveSheetState`](#appapprovesheetstate-record) | required |-| `devices` | [`Vec<AppDeviceInput>`](#appdeviceinput-record) | required |--**Returns** [`AppApproveSheetView`](#appapprovesheetview-record)--## `app_confirm_presence`--Asks the person at this computer to confirm `reason` ("approve-“Work laptop” for your Cua account"). Returns when they did; fails with-`PermissionDenied` when it was cancelled or not confirmed, or when this-Mac has neither Touch ID nor a login password, and with `Unsupported`-where the system has no usable prompt (Windows Hello not set up, no-polkit agent or action), in words that say what is missing.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appConfirmPresence(reason: String) async throws-```--</Tab>-<Tab value="Rust">--```rust-pub async fn app_confirm_presence(reason: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `reason` | `String` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`PermissionDenied`](/cua-sdk/reference/errors#permissiondenied), [`Unsupported`](/cua-sdk/reference/errors#unsupported))--## `app_devices_clean_name`--A device name as typed for Rename (`None` when empty).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDevicesCleanName(name: String) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_devices_clean_name(name: String) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `name` | `String` | required |--**Returns** `Option<String>`--## `app_devices_input`--The SDK's devices snapshot as the Devices page reads it-(`pending_code`: the code this device shows while it waits).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDevicesInput(snapshot: DevicesSnapshot, pendingCode: String?) -> AppDevicesInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_devices_input(snapshot: DevicesSnapshot, pending_code: Option<String>) -> AppDevicesInput-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `snapshot` | [`DevicesSnapshot`](/cua-sdk/reference/spaces/devices#devicessnapshot-record) | required |-| `pending_code` | `Option<String>` | required |--**Returns** [`AppDevicesInput`](#appdevicesinput-record)--## `app_devices_input_from_json`--Devices page input from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDevicesInputFromJson(json: String) throws -> AppDevicesInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_devices_input_from_json(json: String) -> Result<AppDevicesInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppDevicesInput`](#appdevicesinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_devices_view`--The Devices page at `now` (Unix seconds).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDevicesView(input: AppDevicesInput, now: UInt64) -> AppDevicesView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_devices_view(input: AppDevicesInput, now: u64) -> AppDevicesView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppDevicesInput`](#appdevicesinput-record) | required |-| `now` | `u64` | required |--**Returns** [`AppDevicesView`](#appdevicesview-record)--## `app_enroll_action_from_json`--An enroll sheet action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appEnrollActionFromJson(json: String) throws -> AppEnrollAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_enroll_action_from_json(json: String) -> Result<AppEnrollAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppEnrollAction`](#appenrollaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_enroll_initial`--The enroll sheet's first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appEnrollInitial() -> AppEnrollState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_enroll_initial() -> AppEnrollState-```--</Tab>-</Tabs>--**Returns** [`AppEnrollState`](#appenrollstate-record)--## `app_enroll_reduce`--Advances the enroll sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appEnrollReduce(state: AppEnrollState, action: AppEnrollAction) -> AppEnrollState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_enroll_reduce(state: AppEnrollState, action: AppEnrollAction) -> AppEnrollState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppEnrollState`](#appenrollstate-record) | required |-| `action` | [`AppEnrollAction`](#appenrollaction-enum) | required |--**Returns** [`AppEnrollState`](#appenrollstate-record)--## `app_enroll_state_from_json`--The enroll sheet's state from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appEnrollStateFromJson(json: String) throws -> AppEnrollState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_enroll_state_from_json(json: String) -> Result<AppEnrollState, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppEnrollState`](#appenrollstate-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_enroll_view`--The enroll sheet as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appEnrollView(state: AppEnrollState) -> AppEnrollView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_enroll_view(state: AppEnrollState) -> AppEnrollView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppEnrollState`](#appenrollstate-record) | required |--**Returns** [`AppEnrollView`](#appenrollview-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdxdeleted file mode 100644index b14a1c7505..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdx+++ /dev/null@@ -1,298 +0,0 @@-----title: "Window drag trigger"-description: "When dragging a window opens Teleport to Cua: move versus resize, the notch line and the dwell."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_drag_classify` tells a move from a resize by the window's frame. `app_drag_trigger_initial` and `app_drag_trigger_apply` run the trigger: the cursor passes a line 5 pt above the notch's bottom edge, or rests 0.3 s in the Teleport to Cua box. `app_drag_displays` and `app_drag_portal_displays` give the notch geometry of each display.--## `AppStillAnchor` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `x` | `f64` | | X. |-| `y` | `f64` | | Y. |-| `since_ms` / `sinceMs` | `u64` | | When (ms, the shell's monotonic clock). |--## `AppTriggerPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.hidden-.prompt-.expanded-```--</Tab>-<Tab value="Rust">--```rust-AppTriggerPhase::Hidden-AppTriggerPhase::Prompt-AppTriggerPhase::Expanded-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Hidden` | Nothing (no drag, a resize, or not known yet). |-| `Prompt` | The "Teleport to Cua" box. |-| `Expanded` | The Space tiles as drop targets. |--## `AppDragDisplay` record--Returned by [`app_drag_displays`](#app_drag_displays), [`app_drag_portal_displays`](#app_drag_portal_displays).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `frame` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The display. |-| `notch` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The notch (or, without one, the menu-bar-high stand-in). |-| `prompt` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The "Teleport to Cua" box: the dwell area. |-| `expanded` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The expanded panel: the drag stays expanded inside it. |--## `AppDragTriggerState` record--Returned by [`app_drag_trigger_initial`](#app_drag_trigger_initial).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `active` | `bool` | | A drag is in flight. |-| `kind` | [`AppDragKind`](#appdragkind-enum) | | Move or resize. |-| `phase` | [`AppTriggerPhase`](#apptriggerphase-enum) | | What shows. |-| `window_id` / `windowId` | `Option<u32>` | | The dragged window. |-| `app_name` / `appName` | `Option<String>` | | Its app's name. |-| `start_frame` / `startFrame` | [`Option<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The window's frame at mouse down. |-| `display` | `Option<u32>` | | The display (index into the shell's list) the panel expanded on. |-| `still` | [`Option<AppStillAnchor>`](#appstillanchor-record) | | Where the cursor rests, while it rests in the box. |--## `AppDragTriggerTransition` record--Returned by [`app_drag_trigger_apply`](#app_drag_trigger_apply).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `state` | [`AppDragTriggerState`](#appdragtriggerstate-record) | | New state. |-| `overlay` | [`Vec<AppDragOverlayEvent>`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlayevent-enum) | | Feed these to the drag overlay, in order. A `drop` carries no Space: the shell puts in the tile under the cursor, if any. |-| `tick_at_ms` / `tickAtMs` | `Option<u64>` | | Send a `tick` at this time (replacing any earlier request); none cancels it. |--## `AppDragKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.pending-.move-.resize-```--</Tab>-<Tab value="Rust">--```rust-AppDragKind::Pending-AppDragKind::Move-AppDragKind::Resize-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Pending` | Not known yet (no frames, or they have not changed enough). |-| `Move` | The window follows the cursor at its size. |-| `Resize` | An edge or a corner: the size changes. |--## `AppDragTriggerEvent` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.start(windowId: UInt32?, appName: String?, x: Double, y: Double, tMs: UInt64, startFrame: AppLogicalRect?, frame: AppLogicalRect?)-.cursor(x: Double, y: Double, tMs: UInt64)-.frame(frame: AppLogicalRect)-.tick(tMs: UInt64)-.end(x: Double, y: Double, tMs: UInt64)-.cancel-```--</Tab>-<Tab value="Rust">--```rust-AppDragTriggerEvent::Start { window_id: Option<u32>, app_name: Option<String>, x: f64, y: f64, t_ms: u64, start_frame: Option<AppLogicalRect>, frame: Option<AppLogicalRect> }-AppDragTriggerEvent::Cursor { x: f64, y: f64, t_ms: u64 }-AppDragTriggerEvent::Frame { frame: AppLogicalRect }-AppDragTriggerEvent::Tick { t_ms: u64 }-AppDragTriggerEvent::End { x: f64, y: f64, t_ms: u64 }-AppDragTriggerEvent::Cancel-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Start` | A window drag started (the SDK's `start`). Fields: `window_id: Option<u32>`, `app_name: Option<String>`, `x: f64`, `y: f64`, `t_ms: u64`, `start_frame: Option<AppLogicalRect>`, `frame: Option<AppLogicalRect>` |-| `Cursor` | The cursor moved. Fields: `x: f64`, `y: f64`, `t_ms: u64` |-| `Frame` | The dragged window's frame. Fields: `frame: AppLogicalRect` |-| `Tick` | The timer `DragTriggerTransition.tick_at_ms` asked for fired. Fields: `t_ms: u64` |-| `End` | Released. Fields: `x: f64`, `y: f64`, `t_ms: u64` |-| `Cancel` | Abort (the notch was hidden, the monitor stopped). |--## `app_drag_classify`--A window's frame at mouse down against a later one: move, resize, or-not known yet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDragClassify(start: AppLogicalRect, now: AppLogicalRect) -> AppDragKind-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drag_classify(start: AppLogicalRect, now: AppLogicalRect) -> AppDragKind-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `start` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | required |-| `now` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | required |--**Returns** [`AppDragKind`](#appdragkind-enum)--## `app_drag_displays`--The trigger geometry for screens (the primary first), in global-top-left points.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDragDisplays(screens: [AppScreenFacts]) -> [AppDragDisplay]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drag_displays(screens: Vec<AppScreenFacts>) -> Vec<AppDragDisplay>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `screens` | [`Vec<AppScreenFacts>`](/cua-sdk/reference/spaces/app-core/notch#appscreenfacts-record) | required |--**Returns** [`Vec<AppDragDisplay>`](#appdragdisplay-record)--## `app_drag_portal_displays`--The same for a portal whose expanded panel is its top-centred switcher-window (the Tauri app; the parity flows check it here too).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDragPortalDisplays(screens: [AppScreenFacts]) -> [AppDragDisplay]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drag_portal_displays(screens: Vec<AppScreenFacts>) -> Vec<AppDragDisplay>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `screens` | [`Vec<AppScreenFacts>`](/cua-sdk/reference/spaces/app-core/notch#appscreenfacts-record) | required |--**Returns** [`Vec<AppDragDisplay>`](#appdragdisplay-record)--## `app_drag_trigger_apply`--Advances the window-drag trigger over the notch displays: move or-resize, the trigger line, the dwell, expand and collapse.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDragTriggerApply(state: AppDragTriggerState, event: AppDragTriggerEvent, displays: [AppDragDisplay]) -> AppDragTriggerTransition-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drag_trigger_apply(state: AppDragTriggerState, event: AppDragTriggerEvent, displays: Vec<AppDragDisplay>) -> AppDragTriggerTransition-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppDragTriggerState`](#appdragtriggerstate-record) | required |-| `event` | [`AppDragTriggerEvent`](#appdragtriggerevent-enum) | required |-| `displays` | [`Vec<AppDragDisplay>`](#appdragdisplay-record) | required |--**Returns** [`AppDragTriggerTransition`](#appdragtriggertransition-record)--## `app_drag_trigger_initial`--The window-drag trigger's idle state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDragTriggerInitial() -> AppDragTriggerState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drag_trigger_initial() -> AppDragTriggerState-```--</Tab>-</Tabs>--**Returns** [`AppDragTriggerState`](#appdragtriggerstate-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/experiments.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/experiments.mdxdeleted file mode 100644index e9167e973e..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/experiments.mdx+++ /dev/null@@ -1,289 +0,0 @@-----title: "Experiments"-description: "Settings > Experiments: the switches that hide Cua Volume, your own cloud and sharing until they are turned on."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_experiments_page` derives the Experiments tab from the saved `AppExperiments`; `app_settings_choose_experiment` applies a switch and saves the New UI choice ("Use classic UI"). `app_settings_resolve_new_ui` applies the New UI default for the update channel and version. Off only hides a feature: a mounted Volume, a connected cloud and existing shares stay as they are.--## `app_experiments_from_json`--The switches from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appExperimentsFromJson(json: String) throws -> AppExperiments-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_experiments_from_json(json: String) -> Result<AppExperiments, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppExperiments`](#appexperiments-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_settings_with_storage`--The Settings page with Settings, Storage after General while the Cua-Volume experiment is on (left out while it is off).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsWithStorage(page: AppSettingsPage, storage: AppSettingsSection, experiments: AppExperiments) -> AppSettingsPage-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_with_storage(page: AppSettingsPage, storage: AppSettingsSection, experiments: AppExperiments) -> AppSettingsPage-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `page` | [`AppSettingsPage`](/cua-sdk/reference/spaces/app-core/window#appsettingspage-record) | required |-| `storage` | [`AppSettingsSection`](/cua-sdk/reference/spaces/app-core/window#appsettingssection-record) | required |-| `experiments` | [`AppExperiments`](#appexperiments-record) | required |--**Returns** [`AppSettingsPage`](/cua-sdk/reference/spaces/app-core/window#appsettingspage-record)--## `app_settings_resolve_new_ui`--The settings with the New UI as a launch of `version` shows it: the-user's choice, else the default for the update channel and version-(again after the channel changes).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsResolveNewUi(settings: AppSettings, version: String) -> AppSettings-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_resolve_new_ui(settings: AppSettings, version: String) -> AppSettings-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `settings` | [`AppSettings`](/cua-sdk/reference/spaces/app-core/onboarding-settings#appsettings-record) | required |-| `version` | `String` | required |--**Returns** [`AppSettings`](/cua-sdk/reference/spaces/app-core/onboarding-settings#appsettings-record)--## `app_settings_first_launch_channel`--The update channel of an install's first launch, from the file's-`channel`: Beta for a prerelease, else unchanged.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsFirstLaunchChannel(channel: AppUpdateChannel, version: String) -> AppUpdateChannel-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_first_launch_channel(channel: AppUpdateChannel, version: String) -> AppUpdateChannel-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `channel` | [`AppUpdateChannel`](/cua-sdk/reference/spaces/app-core/about#appupdatechannel-enum) | required |-| `version` | `String` | required |--**Returns** [`AppUpdateChannel`](/cua-sdk/reference/spaces/app-core/about#appupdatechannel-enum)--## `app_settings_choose_experiment`--The settings after a Settings, Experiments row's choice (the switches,-and the New UI's "Use classic UI" saved as the user's choice).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsChooseExperiment(settings: AppSettings, row: String, option: String) -> AppSettings-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_choose_experiment(settings: AppSettings, row: String, option: String) -> AppSettings-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `settings` | [`AppSettings`](/cua-sdk/reference/spaces/app-core/onboarding-settings#appsettings-record) | required |-| `row` | `String` | required |-| `option` | `String` | required |--**Returns** [`AppSettings`](/cua-sdk/reference/spaces/app-core/onboarding-settings#appsettings-record)--## `app_telemetry_experiments_changed`--The events of a change in Settings, Experiments (call with the switches-before and after it).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryExperimentsChanged(before: AppExperiments, after: AppExperiments) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_experiments_changed(before: AppExperiments, after: AppExperiments) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `before` | [`AppExperiments`](#appexperiments-record) | required |-| `after` | [`AppExperiments`](#appexperiments-record) | required |--**Returns** [`Vec<AppTelemetrySignal>`](/cua-sdk/reference/spaces/app-core/telemetry#apptelemetrysignal-enum)--## `app_telemetry_experiments_on`--Which experiments are on (at launch).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryExperimentsOn(experiments: AppExperiments) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_experiments_on(experiments: AppExperiments) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `experiments` | [`AppExperiments`](#appexperiments-record) | required |--**Returns** [`Vec<AppTelemetrySignal>`](/cua-sdk/reference/spaces/app-core/telemetry#apptelemetrysignal-enum)--## `AppExperiments` record--Returned by [`app_experiments_choose`](#app_experiments_choose), [`app_experiments_from_json`](#app_experiments_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `cua_volume` / `cuaVolume` | `bool` | | Cua Volume in the first run and Settings, Storage. |-| `your_cloud` / `yourCloud` | `bool` | | Your own clouds in the New Space wizard. |-| `sharing` | `bool` | | Sharing a Space with other accounts. On unless turned off: a missing key reads as on (the plans on cua.ai/pricing list sharing). |-| `web_ui` / `webUi` | `bool` | | The New UI (the shared web UI) is the main window: the user's choice or, without one, `new_ui_default` (`crate.settings.resolve_new_ui`). |--## `app_experiments_choose`--The switches after a row's choice (`on` or `off`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appExperimentsChoose(experiments: AppExperiments, row: String, option: String) -> AppExperiments-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_experiments_choose(experiments: AppExperiments, row: String, option: String) -> AppExperiments-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `experiments` | [`AppExperiments`](#appexperiments-record) | required |-| `row` | `String` | required |-| `option` | `String` | required |--**Returns** [`AppExperiments`](#appexperiments-record)--## `app_experiments_page`--Settings, Experiments: one switch and one line per experiment.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appExperimentsPage(experiments: AppExperiments) -> AppSettingsPage-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_experiments_page(experiments: AppExperiments) -> AppSettingsPage-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `experiments` | [`AppExperiments`](#appexperiments-record) | required |--**Returns** [`AppSettingsPage`](/cua-sdk/reference/spaces/app-core/window#appsettingspage-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/images.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/images.mdxdeleted file mode 100644index 099dab3de9..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/images.mdx+++ /dev/null@@ -1,130 +0,0 @@-----title: "Image catalog"-description: "The images the New Space wizard offers: groups, sizes, the image field and its suggestions."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The catalog behind the New Space image field: each `AppSandboxImage` with its group, distro, tier and download sizes, and the suggestions the field shows as you type.--## `AppSandboxImage` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image_ref` / `imageRef` | `String` | | OCI ref. |-| `group` | `String` | | Group id. |-| `os` | [`AppSpaceOs`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | OS. |-| `name` | `String` | | Display name. |-| `variant` | [`AppSpaceKind`](/cua-sdk/reference/spaces/app-core/spaces#appspacekind-enum) | | Container or VM. |-| `summary` | `String` | | One line. |-| `spacesd` | `bool` | | Runs cua-spacesd (streams). |-| `local` | [`Option<AppLocalEngine>`](/cua-sdk/reference/spaces/app-core/new-space#applocalengine-enum) | | Local engine. |-| `cloud` | [`Option<AppCloudEngine>`](/cua-sdk/reference/spaces/app-core/new-space#appcloudengine-enum) | | Cloud engine. |-| `tier` | [`Option<AppImageTier>`](#appimagetier-enum) | | `slim`, `full` or `xcode` (canonical images only). |-| `published` | `bool` | | Offered in pickers. |-| `distro` | [`Option<AppImageDistro>`](#appimagedistro-record) | | The guest's distribution. |-| `arch` | `Vec<String>` | | Platforms it is built for (`amd64`, `arm64`); empty when unknown. |-| `sizes` | [`Option<AppImageSizes>`](#appimagesizes-record) | | How big it is per platform, when measured. |-| `gpu` | `bool` | | `false`: its guest cannot use GPU acceleration. |--## `AppImageGroup` record--Returned by [`app_wizard_image_suggestions`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_image_suggestions).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Group id. |-| `label` | `String` | | Title. |-| `images` | [`Vec<AppSandboxImage>`](#appsandboximage-record) | | Published images. |--## `AppImageSizes` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `digest` | `String` | | The digest they were measured at. |-| `platforms` | [`Vec<AppPlatformSize>`](#appplatformsize-record) | | One row per platform. |--## `AppPlatformSize` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `arch` | `String` | | `amd64` or `arm64`. |-| `manifest` | `String` | | The platform manifest's digest. |-| `download` | `u64` | | What a pull downloads. |-| `unpacked` | `u64` | | What the pulled image takes on the host. |-| `disk` | `u64` | | The disk the Space sees (a VM's virtual disk; a container's root filesystem). |--## `AppImageFieldView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | The text. |-| `open` | `bool` | | Show the suggestions (open and something matches). |-| `groups` | [`Vec<AppSuggestionGroup>`](#appsuggestiongroup-record) | | The suggestions, filtered while typing. |-| `error` | `Option<String>` | | One line when the ref cannot be used. |-| `custom` | `bool` | | The text is not a preset. |--## `AppImageSuggestion` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image_ref` / `imageRef` | `String` | | Image ref (what picking it fills in). |-| `label` | `String` | | The image's name, shown after the ref. |-| `highlighted` | `bool` | | The keyboard highlight. |-| `selected` | `bool` | | The field holds this preset. |--## `AppSuggestionGroup` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Group id. |-| `label` | `String` | | Title. |-| `rows` | [`Vec<AppImageSuggestion>`](#appimagesuggestion-record) | | Matching presets. |--## `AppImageDistro` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `ubuntu`, `omarchy`, `macos`, `windows`. |-| `name` | `String` | | Pretty name ("Ubuntu 24.04", "Omarchy"). |--## `AppImageTier` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.slim-.full-.xcode-```--</Tab>-<Tab value="Rust">--```rust-AppImageTier::Slim-AppImageTier::Full-AppImageTier::Xcode-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Slim` | The minimum that passes `cua-spacesd doctor --strict` (what CI runs). |-| `Full` | The default: slim plus dev tooling. |-| `Xcode` | macOS: full plus one pinned Xcode. |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.mdxdeleted file mode 100644index 12b3fc3262..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx+++ /dev/null@@ -1,199 +0,0 @@-----title: "Spaces app core"-description: "The view models the Cua Spaces apps share: Space list, New Space wizard, teleport review, notch and Keyvault."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The Cua Spaces apps render the same state from this core, so their behaviour cannot diverge. Each screen is a state record, a pure `*_reduce` function that applies an action or event, and a `*_view` that derives what to draw. The subpages cover one screen each; the shared formatters are on [Window, menu bar and Settings](/cua-sdk/reference/spaces/app-core/window).--## `cua_spaces_register`--Registers the Cua Spaces extensions (teleport, the Cua Volume, persistent-agents, the Keyvault) for every runtime the SDK builds in this process.-Idempotent; the SwiftUI app calls it once at launch, before its first-`Cua`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func cuaSpacesRegister()-```--</Tab>-<Tab value="Rust">--```rust-pub fn cua_spaces_register()-```--</Tab>-</Tabs>--## `AppPlanCard` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `plan` | `String` | | `free`, `pro` or `teams`. |-| `label` | `String` | | "Free plan". |-| `detail` | `String` | | What the plan includes, in one sentence. |-| `primary` | [`Option<AppPlanLink>`](#appplanlink-record) | | The main button ("Get Pro"); none when there is nothing to buy. |-| `secondary` | [`Option<AppPlanLink>`](#appplanlink-record) | | The other one ("Start a team"). |--## `AppPlanLink` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | "Get Pro". |-| `url` | `String` | | https, on the account app. |--## `AppResourceEdit` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `field` | [`AppResourceField`](#appresourcefield-enum) | | Which slider. |-| `text` | `String` | | The text as typed. |--## `AppResourceEditView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `field` | [`AppResourceField`](#appresourcefield-enum) | | Which slider. |-| `text` | `String` | | The text as typed. |-| `error` | `Option<String>` | | Why it cannot be used, in one line (the slider's limits). |--## `AppVaultPassword` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The item's id. |-| `site` | `String` | | Its site (`github.com`); empty when not known. |-| `username` | `String` | | Its username; empty when not known or hidden. |--## `AppResourceField` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.cpus-.memory-.disk-```--</Tab>-<Tab value="Rust">--```rust-AppResourceField::Cpus-AppResourceField::Memory-AppResourceField::Disk-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Cpus` | CPU cores. |-| `Memory` | Memory, GB. |-| `Disk` | Disk, GB. |--## `app_account_app_url`--The account app for this environment (`CUA_ACCOUNT_APP_URL`, else-`https://app.cua.ai`, or `https://app.staging.cua.ai` under-`CUA_ENV=staging`): billing, plans and team administration, which the-apps open in the browser.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAccountAppUrl() -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_account_app_url() -> String-```--</Tab>-</Tabs>--**Returns** `String`--## All items--630 items, across this page and its subpages, grouped by page (each item's section is on its page). Methods are listed on their object.--**[About, updates and launch](/cua-sdk/reference/spaces/app-core/about)**: `app_about_after_launch`, `app_about_allowed_channels`, `app_about_input_from_json`, `app_about_refresh_notice`, `app_about_restart_daemon`, `app_about_view`, `app_daemon_check_from_json`, `app_launch_input_from_json`, `app_refresh_report_from_json`, `AppAboutInput`, `AppAboutLink`, `AppAboutLinkId`, `AppAboutUpdates`, `AppAboutView`, `AppCliInstaller`, `AppCliInstallPlan`, `AppCliInstallRequest`, `AppDaemonCheck`, `AppInstallMethod`, `AppLaunchInput`, `AppLaunchPlan`, `AppRefreshReport`, `AppUpdateChannel`--**Spaces app core**: [`app_account_app_url`](#app_account_app_url), [`AppPlanCard`](#appplancard-record), [`AppPlanLink`](#appplanlink-record), [`AppResourceEdit`](#appresourceedit-record), [`AppResourceEditView`](#appresourceeditview-record), [`AppResourceField`](#appresourcefield-enum), [`AppVaultPassword`](#appvaultpassword-record), [`cua_spaces_register`](#cua_spaces_register)--**[Settings, Agents](/cua-sdk/reference/spaces/app-core/agent-keys)**: `app_agent_key_form`, `app_agent_key_form_input_from_json`, `app_agent_key_name_problem`, `app_agent_key_remove_confirm`, `app_agent_keys_input_from_json`, `app_agent_keys_view`, `app_agent_settings_rows`, `app_agent_setup_outcome`, `app_agent_setup_outcomes_from_json`, `app_agent_setup_status`, `app_agent_setup_statuses_from_json`, `app_agent_setup_summary`, `AppAgentKeyConfirm`, `AppAgentKeyFormInput`, `AppAgentKeyFormView`, `AppAgentKeyInput`, `AppAgentKeyRow`, `AppAgentKeysInput`, `AppAgentKeysView`, `AppAgentSettingsRow`, `AppAgentSetupOutcomeInput`, `AppAgentSetupStatus`, `AppAgentSetupSummary`--**[Spaces](/cua-sdk/reference/spaces/app-core/spaces)**: `app_agent_name`, `app_ambient_dots`, `app_group_windows_by_app`, `app_hosted_rows`, `app_roster_initial`, `app_roster_reduce`, `app_rows_to_spaces`, `app_sidebar`, `app_space_accepts_drop`, `app_space_detail`, `app_space_detail_for`, `app_space_detail_with`, `app_space_rows_from_json`, `app_spaces_from_json`, `app_status_line`, `app_this_machine_space`, `app_without_this_relay_machine`, `AppAgentStatus`, `AppAmbientDots`, `AppFactWarning`, `AppHostSummaryInput`, `AppNewSpaceOn`, `AppNotice`, `AppNoticeKind`, `AppOpenApp`, `AppOpenWindow`, `AppRemoteWindow`, `AppRemoteWindowGroup`, `AppRosterAction`, `AppRosterState`, `AppSidebarRow`, `AppSidebarSection`, `AppSidebarView`, `AppSpace`, `AppSpaceAgentRun`, `AppSpaceDetail`, `AppSpaceKind`, `AppSpaceOs`, `AppSpaceProgress`, `AppSpaceProvider`, `AppSpaceRow`, `AppSpaceSdkRef`, `AppSpaceStatus`, `AppThumbnailScene`, `AppWindowMode`--**[Devices](/cua-sdk/reference/spaces/app-core/devices)**: `app_approve_open`, `app_approve_reduce`, `app_approve_sheet_action_from_json`, `app_approve_view`, `app_confirm_presence`, `app_devices_clean_name`, `app_devices_input`, `app_devices_input_from_json`, `app_devices_view`, `app_enroll_action_from_json`, `app_enroll_initial`, `app_enroll_reduce`, `app_enroll_state_from_json`, `app_enroll_view`, `app_machine_access_notice`, `AppActivityRow`, `AppApprovalPrompt`, `AppApproveRequest`, `AppApproveSheetAction`, `AppApproveSheetState`, `AppApproveSheetView`, `AppAuditInput`, `AppBannerTone`, `AppDeviceAction`, `AppDeviceBanner`, `AppDeviceConfirm`, `AppDeviceInput`, `AppDeviceRow`, `AppDevicesInput`, `AppDevicesLabels`, `AppDevicesView`, `AppEnrollAction`, `AppEnrollmentKind`, `AppEnrollMethod`, `AppEnrollOption`, `AppEnrollPhase`, `AppEnrollState`, `AppEnrollView`, `AppMachineAccessNotice`, `AppMachineInput`, `AppThisDevice`, `AppUnconfirmedMachine`--**[Teleport picker](/cua-sdk/reference/spaces/app-core/teleport)**: `app_catalog_entries_from_json`, `app_catalog_entry`, `app_picker_can_plan`, `app_picker_consent`, `app_picker_event_from_json`, `app_picker_initial`, `app_picker_plan_sensitive`, `app_picker_primary`, `app_picker_progress`, `app_picker_reduce`, `app_picker_review`, `app_picker_sections`, `app_picker_sensitive_options`, `app_picker_status`, `AppCatalogEntry`, `AppEntrySection`, `AppPickerAction`, `AppPickerEvent`, `AppPickerPrimary`, `AppPickerState`, `AppPickerStep`, `AppPickerTab`--**[Window, menu bar and Settings](/cua-sdk/reference/spaces/app-core/window)**: `app_chrome_input_from_json`, `app_delete_failed_text`, `app_display_name`, `app_display_path`, `app_drop_sending_text`, `app_drop_sent_text`, `app_format_bytes`, `app_login_item_launch_plan`, `app_main_chrome`, `app_menu`, `app_menu_bar`, `app_menu_bar_with_keyvault`, `app_menu_input_from_json`, `app_openable_count`, `app_sent_file`, `app_sent_files_from_json`, `app_settings_input_from_json`, `app_settings_page`, `app_space_detail_copy`, `AppChromeInput`, `AppDeleteConfirm`, `AppDetailAction`, `AppDetailActionId`, `AppDetailCopy`, `AppFact`, `AppFactCopy`, `AppLoginItemInput`, `AppLoginItemPlan`, `AppLoginItemStatus`, `AppMainChrome`, `AppMenuInput`, `AppMenuItem`, `AppMenuItemId`, `AppSentFileInfo`, `AppSettingsInput`, `AppSettingsOption`, `AppSettingsPage`, `AppSettingsRow`, `AppSettingsRowKind`, `AppSettingsSection`, `AppSignInPhase`, `AppTelemetryInput`--**[Your cloud](/cua-sdk/reference/spaces/app-core/cloud)**: `app_cloud_connect_action_from_json`, `app_cloud_connect_initial`, `app_cloud_connect_input_from_json`, `app_cloud_connect_input_from_status_json`, `app_cloud_connect_reduce`, `app_cloud_connect_view`, `app_connected_cloud_from_json`, `app_connected_clouds_from_status_json`, `app_is_cloud_word`, `AppCloudCheckInput`, `AppCloudCheckRow`, `AppCloudConnectAction`, `AppCloudConnectInput`, `AppCloudConnectPhase`, `AppCloudConnectRequest`, `AppCloudConnectState`, `AppCloudConnectView`, `AppCloudField`, `AppCloudOffer`, `AppCloudProviderInput`, `AppCloudProviderRow`, `AppCloudTargetArgs`, `AppConnectedCloud`--**[Creates and deletes](/cua-sdk/reference/spaces/app-core/creates)**: `app_creates_compose`, `app_creates_is_deleting`, `app_creates_is_pending`, `app_creates_reduce`, `app_creates_settle`, `AppCreateAction`, `AppCreatesState`, `AppPendingCreate`, `AppPendingDelete`--**[Power button](/cua-sdk/reference/spaces/app-core/power)**: `app_creates_is_powering`, `app_power_button`, `AppPendingPower`, `AppPowerButton`, `AppPowerControl`, `AppSpacePower`--**[Stream section and facts](/cua-sdk/reference/spaces/app-core/stream)**: `app_desktop_cover`, `app_space_detail_live`, `app_stream_desktop_row_id`, `app_stream_pip_click`, `app_stream_pip_reduce`, `app_stream_section`, `app_thumbnail_policy`, `app_usage_refresh_ms`, `AppDesktopCover`, `AppDesktopCoverInput`, `AppDesktopCoverKind`, `AppPipCommand`, `AppPipEvent`, `AppSpaceUsage`, `AppStreamDisplay`, `AppStreamPhase`, `AppStreamRow`, `AppStreamRowAction`, `AppStreamRowActionId`, `AppStreamRowIcon`, `AppStreamRowKind`, `AppStreamSection`, `AppStreamSectionInput`, `AppThumbnailPolicy`--**[Window drag trigger](/cua-sdk/reference/spaces/app-core/drag-trigger)**: `app_drag_classify`, `app_drag_displays`, `app_drag_portal_displays`, `app_drag_trigger_apply`, `app_drag_trigger_initial`, `AppDragDisplay`, `AppDragKind`, `AppDragTriggerEvent`, `AppDragTriggerState`, `AppDragTriggerTransition`, `AppStillAnchor`, `AppTriggerPhase`--**[Onboarding previews](/cua-sdk/reference/spaces/app-core/onboarding-previews)**: `app_driver_preview`, `app_driver_preview_frame`, `app_driver_preview_still`, `app_presentation_preview`, `app_presentation_preview_frame`, `app_presentation_preview_still`, `AppDriverFrame`, `AppDriverPreview`, `AppMenuPreview`, `AppMenuPreviewRow`, `AppPresentationPreview`, `AppPreviewFrame`, `AppPreviewPoint`, `AppPreviewSegment`, `AppPreviewWindow`--**[Experiments](/cua-sdk/reference/spaces/app-core/experiments)**: `app_experiments_choose`, `app_experiments_from_json`, `app_experiments_page`, `app_settings_choose_experiment`, `app_settings_first_launch_channel`, `app_settings_resolve_new_ui`, `app_settings_with_storage`, `app_telemetry_experiments_changed`, `app_telemetry_experiments_on`, `AppExperiments`--**[Onboarding and settings](/cua-sdk/reference/spaces/app-core/onboarding-settings)**: `app_format_hotkey`, `app_onboarding_action_from_json`, `app_onboarding_copy`, `app_onboarding_initial`, `app_onboarding_installed_at_text`, `app_onboarding_reduce`, `app_onboarding_replaces_text`, `app_onboarding_sign_in_code_text`, `app_onboarding_signed_in_text`, `app_onboarding_view`, `app_settings_load`, `app_settings_save`, `AppKeyCombo`, `AppModeChoice`, `AppOnboardingAction`, `AppOnboardingCheckbox`, `AppOnboardingCopy`, `AppOnboardingMode`, `AppOnboardingState`, `AppOnboardingStep`, `AppOnboardingTodo`, `AppOnboardingTodoId`, `AppOnboardingView`, `AppPresentationCard`, `AppSettings`, `AppSwitcherTheme`, `AppUsageToggle`--**[This machine](/cua-sdk/reference/spaces/app-core/this-machine)**: `app_host_account_key`, `app_host_account_step`, `app_host_arch`, `app_host_form_action_from_json`, `app_host_form_initial`, `app_host_form_reduce`, `app_host_form_view`, `app_host_looks_like_listen`, `app_host_panel`, `app_host_parse_allow_list`, `app_host_permission_rows`, `app_host_setting_change`, `app_host_setup`, `app_host_state`, `app_host_state_from_json`, `app_host_summary_input`, `app_host_validate_setup`, `app_with_this_machine`, `AppHostAccess`, `AppHostAccessRow`, `AppHostAccount`, `AppHostAccountStep`, `AppHostAction`, `AppHostActionId`, `AppHostClient`, `AppHostConfirm`, `AppHostFormAction`, `AppHostFormChoice`, `AppHostFormField`, `AppHostFormState`, `AppHostFormView`, `AppHostLimit`, `AppHostPanelView`, `AppHostPermissionInput`, `AppHostProvidedSpace`, `AppHostSettingChange`, `AppHostSetupChoice`, `AppHostSetupRequest`, `AppHostSpacesAudit`, `AppHostState`, `AppHostToggle`, `AppPermissionRow`--**[Notch](/cua-sdk/reference/spaces/app-core/notch)**: `app_notch_estimated_progress`, `app_notch_initial`, `app_notch_layout`, `app_notch_motion`, `app_notch_radii`, `app_notch_reduce`, `app_notch_tile_at`, `app_notch_view`, `app_os_icon_svg`, `app_os_icon_system_symbol`, `app_presence_name`, `app_presence_principal_id`, `AppLogicalRect`, `AppNotchAccess`, `AppNotchActivity`, `AppNotchActivityKind`, `AppNotchButton`, `AppNotchButtonId`, `AppNotchEffect`, `AppNotchEvent`, `AppNotchHeader`, `AppNotchLayout`, `AppNotchMotion`, `AppNotchPermission`, `AppNotchPhase`, `AppNotchPreview`, `AppNotchRadii`, `AppNotchState`, `AppNotchTab`, `AppNotchTile`, `AppNotchTransfer`, `AppNotchTransition`, `AppNotchView`, `AppScreenFacts`--**[Teleport picker grid](/cua-sdk/reference/spaces/app-core/teleport-grid)**: `app_picker_app_grid`, `app_picker_grid_primary`, `app_picker_grid_step`, `app_picker_grid_tabs`, `app_picker_remote_grid`, `app_picker_window_grid`, `AppPickerGrid`, `AppPickerGridPrimary`, `AppPickerGridTab`, `AppPickerGridTabItem`, `AppPickerTile`, `AppPickerTileIcon`, `AppPickerTileSection`, `AppPickerTileThumbnail`--**[Teleport review](/cua-sdk/reference/spaces/app-core/teleport-review)**: `app_review_remember`, `app_review_remember_key`, `app_review_remembered`, `AppConsentItem`, `AppConsentKind`, `AppInstallCuaPrompt`, `AppPlanStepView`, `AppRememberedChoice`, `AppReviewChoice`, `AppReviewDomain`, `AppReviewPassword`, `AppReviewToggle`, `AppReviewView`, `AppSendSource`, `AppVaultSource`--**[Keyvault](/cua-sdk/reference/spaces/app-core/keyvault)**: `app_sensitive_group_sdk`, `AppSensitiveGroup`, `AppSensitiveOption`, `KeyvaultClient`, `KeyvaultOverview`, `kv_credential_form`, `kv_duration`, `kv_labels`, `kv_overview_from_json`, `kv_passphrase_check`, `kv_prune_dismissed`, `kv_recovery_key_text`, `kv_sharing_label`, `kv_signed_in_spaces`, `kv_space_access_key`, `kv_visible_sharing_label`, `KvAccessRequest`, `KvAuditEntry`, `KvCaller`, `KvCommand`, `KvCredentialForm`, `KvDelivery`, `KvDomainCount`, `KvFavicon`, `KvFormMode`, `KvGrant`, `KvInventory`, `KvItem`, `KvItemPolicy`, `KvLabels`, `KvMethod`, `KvOutcome`, `KvPassphraseCheck`, `KvPending`, `KvRule`, `KvRuleCaller`, `KvSelector`, `KvSigning`, `KvStatus`, `KvStrength`, `KvVerification`--**[Share sheet](/cua-sdk/reference/spaces/app-core/share)**: `app_share_action_from_json`, `app_share_initial`, `app_share_input_from_json`, `app_share_reduce`, `app_share_state_from_json`, `app_share_view`, `AppRoleOption`, `AppShareEntryInput`, `AppShareInput`, `AppShareRequest`, `AppShareRowView`, `AppShareSheetAction`, `AppShareSheetState`, `AppShareSheetView`--**[Run on](/cua-sdk/reference/spaces/app-core/run-on)**: `app_space_host`, `app_wizard_placement_options`, `AppPlacementOption`, `AppSpaceHost`--**[Usage telemetry](/cua-sdk/reference/spaces/app-core/telemetry)**: `app_telemetry_creates`, `app_telemetry_enroll`, `app_telemetry_feature`, `app_telemetry_launched`, `app_telemetry_onboarding`, `app_telemetry_onboarding_finished`, `app_telemetry_record`, `app_telemetry_share`, `app_telemetry_sign_in_failed`, `app_telemetry_start`, `app_telemetry_storage`, `app_telemetry_welcome_left`, `AppTelemetrySignal`--**[Teleport plan and run](/cua-sdk/reference/spaces/app-core/teleport-run)**: `app_teleport_plan`, `app_teleport_plan_from_json`, `app_teleport_run_event`, `app_teleport_run_status`, `AppTeleportCapability`, `AppTeleportConsent`, `AppTeleportMove`, `AppTeleportPlan`, `AppTeleportRunEvent`, `AppTeleportRunPhase`, `AppTeleportRunReport`--**[Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer)**: `app_transfer_reduce`, `app_transfer_title`, `AppDragOverlayEffect`, `AppDragOverlayEvent`, `AppDragOverlayPhase`, `AppDragOverlayState`, `AppDragOverlayTransition`, `AppTransferOverlayState`, `AppTransferPhase`, `AppTransferSignal`, `AppTransferStatus`--**[New Space wizard](/cua-sdk/reference/spaces/app-core/new-space)**: `app_wizard_action_from_json`, `app_wizard_create_args`, `app_wizard_create_failed_text`, `app_wizard_creating_text`, `app_wizard_env_from_json`, `app_wizard_image_suggestions`, `app_wizard_initial`, `app_wizard_reduce`, `app_wizard_validate_image_ref`, `app_wizard_view`, `AppAddressForm`, `AppAddressSubmit`, `AppAddressView`, `AppCloudEngine`, `AppCloudPricing`, `AppCreatePlan`, `AppCreateSpaceArgs`, `AppGpuChoice`, `AppGpuRow`, `AppKindOption`, `AppLocalEngine`, `AppLocalStorage`, `AppLocation`, `AppMenuOption`, `AppRuntime`, `AppRuntimeSwitch`, `AppStepDot`, `AppStepState`, `AppStepView`, `AppStorageVolume`, `AppTile`, `AppWizardAction`, `AppWizardEnv`, `AppWizardFact`, `AppWizardField`, `AppWizardLabels`, `AppWizardMode`, `AppWizardState`, `AppWizardView`--**[Image catalog](/cua-sdk/reference/spaces/app-core/images)**: `AppImageDistro`, `AppImageFieldView`, `AppImageGroup`, `AppImageSizes`, `AppImageSuggestion`, `AppImageTier`, `AppPlatformSize`, `AppSandboxImage`, `AppSuggestionGroup`--**[Keyvault screens](/cua-sdk/reference/spaces/app-core/keyvault-screens)**: `kv_approval_approve_command`, `kv_approval_deny_command`, `kv_approval_open`, `kv_approval_reduce`, `kv_approval_view`, `kv_delete_command`, `kv_delete_confirm`, `kv_list`, `kv_live_copy_spaces`, `kv_lock_command`, `kv_page`, `kv_sidebar`, `kv_unlock_command`, `kv_unlock_prompt`, `kv_unlock_prompt_always`, `kv_vault_prune`, `kv_vault_reduce`, `kv_vault_source`, `kv_vault_view`, `KvAccessKind`, `KvAccessRow`, `KvApprovalAction`, `KvApprovalRow`, `KvApprovalState`, `KvApprovalView`, `KvAppRow`, `KvCategory`, `KvCategoryRow`, `KvDecision`, `KvDecisionTone`, `KvDeleteConfirm`, `KvKind`, `KvListView`, `KvLock`, `KvPage`, `KvPendingRow`, `KvRecentRow`, `KvSelection`, `KvSidebar`, `KvSigningBadge`, `KvTone`, `KvTri`, `KvUnlockPrompt`, `KvVaultAction`, `KvVaultApp`, `KvVaultFiles`, `KvVaultRow`, `KvVaultSelection`, `KvVaultSite`, `KvVaultSource`, `KvVaultState`, `KvVaultView`diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdxdeleted file mode 100644index 1f102ffa7c..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdx+++ /dev/null@@ -1,1157 +0,0 @@-----title: "Keyvault screens"-description: "The Keyvault page, sidebar, the vault list (apps, sites and items with their locks), the unlock prompt and the approval prompt."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The `kv_*` functions derive each Keyvault screen from a `KeyvaultOverview`. `kv_vault_view` groups the vault by source app and site, with a lock on each row; `kv_vault_reduce` applies search, selection and open groups; `kv_unlock_prompt` is the "Allow unattended access?" prompt. `kv_approval_open`, `kv_approval_reduce` and `kv_approval_view` drive the approval prompt; the `*_command` functions return the `KvCommand` to send.--## `KvAccessRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`KvAccessKind`](#kvaccesskind-enum) | | Kind. |-| `key` | `String` | | Stable key. |-| `text` | `String` | | Main text. |-| `detail` | `String` | | Muted detail. |-| `action_label` / `actionLabel` | `String` | | "Revoke", "Remove", "Wipe". |-| `command` | [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum) | | What the button sends. |-| `imports` | `Vec<String>` | | A Space's copies: their import ids, which Dismiss hides from the notch (empty for grants and rules). |--## `KvAccessKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.grant-.rule-.delivery-```--</Tab>-<Tab value="Rust">--```rust-KvAccessKind::Grant-KvAccessKind::Rule-KvAccessKind::Delivery-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Grant` | A grant. |-| `Rule` | An unattended rule. |-| `Delivery` | Copies in a Space. |--## `KvRecentRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `decision` | [`KvDecision`](#kvdecision-record) | | The decision. |-| `age` | `String` | | "now", "5 min ago". |--## `KvDecision` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `entry` | [`KvAuditEntry`](/cua-sdk/reference/spaces/app-core/keyvault#kvauditentry-record) | | The entry. |-| `verb` | `String` | | "Approved". |-| `tone` | [`KvDecisionTone`](#kvdecisiontone-enum) | | Tone. |-| `what` | `String` | | Item and target, or the actor. |--## `KvDecisionTone` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.ok-.deny-.info-```--</Tab>-<Tab value="Rust">--```rust-KvDecisionTone::Ok-KvDecisionTone::Deny-KvDecisionTone::Info-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Ok` | Allowed or delivered. |-| `Deny` | Denied, refused, failed. |-| `Info` | Everything else. |--## `KvTri` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.on-.off-.mixed-```--</Tab>-<Tab value="Rust">--```rust-KvTri::On-KvTri::Off-KvTri::Mixed-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `On` | All on. |-| `Off` | All off. |-| `Mixed` | Some. |--## `KvSelection` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.category(category: KvCategory)-.app(key: String)-```--</Tab>-<Tab value="Rust">--```rust-KvSelection::Category { category: KvCategory }-KvSelection::App { key: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Category` | A category. Fields: `category: KvCategory` |-| `App` | One app's items. Fields: `key: String` |--## `KvSigningBadge` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | "signed, team X". |-| `tone` | [`KvTone`](#kvtone-enum) | | Tone. |--## `KvTone` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.ok-.warn-.danger-```--</Tab>-<Tab value="Rust">--```rust-KvTone::Ok-KvTone::Warn-KvTone::Danger-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Ok` | Verified. |-| `Warn` | Caution. |-| `Danger` | Untrusted. |--## `KvAppRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | The provider id (`chrome`): the key, and what the icon is looked up by. |-| `title` | `String` | | "Google Chrome". |-| `items` | `u32` | | Items. |-| `waiting` | `bool` | | Something waits for this app. |--## `KvApprovalRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | Row key: `<app>\|<site>`, `<app>\|files`, or `import:<n>`. |-| `title` | `String` | | The site, or the app for files and imports. |-| `account` | `String` | | "3 cookies, 1 password", or "Not saved yet". |-| `provider_id` / `providerId` | `String` | | The app's provider id (its icon), when known. |-| `items` | `u32` | | Items the row stands for. |-| `item_ids` / `itemIds` | `Vec<String>` | | The items' ids. |-| `selected` | `bool` | | Ticked. |-| `is_import` / `isImport` | `bool` | | A new item the approval imports. |--## `KvApprovalState` record--Returned by [`kv_approval_open`](#kv_approval_open), [`kv_approval_reduce`](#kv_approval_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `request_id` / `requestId` | `String` | | The request. |-| `selected` | `Vec<String>` | | Ticked row keys (`<app>\|<site>`, or `import:<n>` for new items). |--## `KvApprovalView` record--Returned by [`kv_approval_view`](#kv_approval_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `request_id` / `requestId` | `String` | | The request. |-| `title` | `String` | | "Allow com.example.koalabot?" |-| `caller` | `String` | | Verified caller (short). |-| `badge` | [`KvSigningBadge`](#kvsigningbadge-record) | | Signing badge. |-| `targets` | `String` | | Where to ("dev-1"). |-| `wants` | `String` | | For how long. |-| `summary` | `String` | | One-line summary. |-| `claims` | `Vec<String>` | | Unverified claims. |-| `rows` | [`Vec<KvApprovalRow>`](#kvapprovalrow-record) | | Rows. |-| `can_approve` / `canApprove` | `bool` | | Approve is enabled. |-| `blocked_reason` / `blockedReason` | `Option<String>` | | Why not, in one line (none when it can, or nothing is ticked yet). |-| `approve_label` / `approveLabel` | `String` | | "Approve 2 items". |-| `gone` | `bool` | | The request is gone (answered elsewhere). |--## `KvCategoryRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `category` | [`KvCategory`](#kvcategory-enum) | | Category. |-| `title` | `String` | | Title. |-| `symbol` | `String` | | SF Symbol. |-| `count` | `Option<u32>` | | Count (none for Recent). |-| `badge` | `Option<u32>` | | The sidebar badge: Waiting's count while something waits. |--## `KvDeleteConfirm` record--Returned by [`kv_delete_confirm`](#kv_delete_confirm).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Delete 3 items?" |-| `message` | `String` | | What deleting does. |-| `confirm` | `String` | | "Delete". |-| `cancel` | `String` | | "Cancel". |--## `KvListView` record--Returned by [`kv_list`](#kv_list).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | Title. |-| `vault` | `bool` | | The vault list shows (All Items, or one app). |-| `pending` | [`Vec<KvPendingRow>`](#kvpendingrow-record) | | Waiting. |-| `access` | [`Vec<KvAccessRow>`](#kvaccessrow-record) | | Access. |-| `recent` | [`Vec<KvRecentRow>`](#kvrecentrow-record) | | Recent. |-| `empty_text` / `emptyText` | `Option<String>` | | "Nothing is waiting." and friends. |--## `KvPage` record--Returned by [`kv_page`](#kv_page).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ready` | `bool` | | Items can be shown. |-| `unavailable_title` / `unavailableTitle` | `Option<String>` | | The unavailable heading. |-| `message` | `Option<String>` | | The broker's sentence. |-| `can_setup` / `canSetup` | `bool` | | "Set up Keyvault" shows. |-| `can_unlock` / `canUnlock` | `bool` | | "Unlock" shows. |-| `kill_switch_visible` / `killSwitchVisible` | `bool` | | The Disable switch shows (this app is first party, a vault exists). |-| `kill_switch_enabled` / `killSwitchEnabled` | `bool` | | The switch can be flipped (unlocked). |-| `disabled` | `bool` | | The kill switch is on. |-| `disabled_banner` / `disabledBanner` | `Option<String>` | | "Keyvault is off. Nothing can be teleported." |-| `partial_errors` / `partialErrors` | `Vec<String>` | | Sections that failed to load. |-| `log_status` / `logStatus` | `Option<String>` | | "Log verified" / "Log tampered at #n". |-| `log_tampered` / `logTampered` | `bool` | | The log check failed. |-| `protection` | [`Vec<AppFact>`](/cua-sdk/reference/spaces/app-core/window#appfact-record) | | Protection facts. |-| `revoke_all` / `revokeAll` | `bool` | | "Revoke all" shows (more than one live grant). |-| `has_items` / `hasItems` | `bool` | | Items exist. |-| `search_visible` / `searchVisible` | `bool` | | Search shows (any item exists). |-| `skip_unlock_prompt` / `skipUnlockPrompt` | `bool` | | "Never ask again" on the unlock prompt is on (Settings turns it off). |-| `reset_notice` / `resetNotice` | `Option<String>` | | An earlier preview's vault was set aside: one line to show. |-| `pending_count` / `pendingCount` | `u32` | | Pending requests (the sidebar badge). |-| `kill_switch_help` / `killSwitchHelp` | `String` | | The switch's tooltip (it reads "on" while the Keyvault works). |-| `labels` | [`KvLabels`](/cua-sdk/reference/spaces/app-core/keyvault#kvlabels-record) | | The page's fixed words. |-| `form` | [`Option<KvCredentialForm>`](/cua-sdk/reference/spaces/app-core/keyvault#kvcredentialform-record) | | The setup or unlock form, when one applies. |--## `KvPendingRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Request id. |-| `caller` | `String` | | Short caller. |-| `badge` | [`KvSigningBadge`](#kvsigningbadge-record) | | Signing badge. |-| `summary` | `String` | | What and where. |-| `wants` | `String` | | For how long. |-| `claims` | `Vec<String>` | | Unverified claims (tooltip). |--## `KvSidebar` record--Returned by [`kv_sidebar`](#kv_sidebar).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `categories` | [`Vec<KvCategoryRow>`](#kvcategoryrow-record) | | All Items, Waiting, Access, Recent. |-| `apps` | [`Vec<KvAppRow>`](#kvapprow-record) | | One row per app, by name. |--## `KvUnlockPrompt` record--Returned by [`kv_unlock_prompt`](#kv_unlock_prompt), [`kv_unlock_prompt_always`](#kv_unlock_prompt_always).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Allow unattended access?" |-| `message` | `String` | | What it allows. |-| `subject` | `String` | | "3 items" (a batch), or the one item's name. |-| `deny` | `String` | | "Deny". |-| `allow` | `String` | | "Allow". |-| `never_ask` / `neverAsk` | `String` | | "Never ask again". |--## `KvVaultApp` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | Group key: the provider id (`chrome`). |-| `provider_id` / `providerId` | `String` | | The provider id, for the app's icon. |-| `name` | `String` | | "Google Chrome". |-| `count` | `u32` | | Items. |-| `summary` | `String` | | "212 items, 14 unlocked". |-| `updated` | `String` | | Grey time of the newest save. |-| `selected` | [`KvTri`](#kvtri-enum) | | Selection of its items. |-| `lock` | [`KvLock`](#kvlock-enum) | | Lock of its items. |-| `unlock_ids` / `unlockIds` | `Vec<String>` | | Items a click on the lock unlocks (locked, not identity providers). |-| `lock_ids` / `lockIds` | `Vec<String>` | | Items a click on the lock locks (unlocked). |-| `open` | `bool` | | Open. |-| `sites` | [`Vec<KvVaultSite>`](#kvvaultsite-record) | | Sites with their items, by name. |-| `files` | [`Option<KvVaultFiles>`](#kvvaultfiles-record) | | Files, when it has any. |--## `KvVaultFiles` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | Group key. |-| `count` | `u32` | | Files. |-| `selected` | [`KvTri`](#kvtri-enum) | | Selection of its items. |-| `lock` | [`KvLock`](#kvlock-enum) | | Lock of its items. |-| `unlock_ids` / `unlockIds` | `Vec<String>` | | Items a click on the lock unlocks (locked, not identity providers). |-| `lock_ids` / `lockIds` | `Vec<String>` | | Items a click on the lock locks (unlocked). |-| `open` | `bool` | | Open. |-| `rows` | [`Vec<KvVaultRow>`](#kvvaultrow-record) | | Its rows (empty while closed, unless searching). |--## `KvVaultRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Item id. |-| `kind` | [`KvKind`](#kvkind-enum) | | Type. |-| `kind_label` / `kindLabel` | `String` | | "Cookie". |-| `symbol` | `String` | | The type's SF Symbol. |-| `title` | `String` | | The key: a cookie name, storage key, username or file name. |-| `subtitle` | `String` | | Grey line: the domain, or the file's folder. |-| `updated` | `String` | | Grey time: "2 min ago". |-| `locked` | `bool` | | Locked (needs approval for every use). |-| `lock_symbol` / `lockSymbol` | `String` | | The lock icon: `lock.fill` or `lock.open`. |-| `lock_help` / `lockHelp` | `String` | | The lock's tooltip and accessibility label. |-| `identity_provider` / `identityProvider` | `bool` | | Identity provider: always asks, cannot be unlocked. |-| `selected` | `bool` | | Selected. |--## `KvVaultSelection` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `count` | `u32` | | Selected items. |-| `ids` | `Vec<String>` | | Their ids, in list order. |-| `title` | `String` | | "3 selected". |-| `can_unlock` / `canUnlock` | `bool` | | Some selected item is locked and may be unlocked. |-| `can_lock` / `canLock` | `bool` | | Some selected item is unlocked. |-| `always_ask` / `alwaysAsk` | `u32` | | Selected items that always ask (identity providers). |-| `unlock_ids` / `unlockIds` | `Vec<String>` | | The ids to send when unlocking (locked, not identity providers). |-| `lock_ids` / `lockIds` | `Vec<String>` | | The ids to send when locking (unlocked). |--## `KvVaultSite` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | Group key. |-| `site` | `String` | | "github.com". |-| `count` | `u32` | | Items (all of them, even while closed). |-| `counts` | `String` | | "12 cookies, 2 storage values". |-| `updated` | `String` | | Grey time of the newest save. |-| `selected` | [`KvTri`](#kvtri-enum) | | Selection of its items. |-| `lock` | [`KvLock`](#kvlock-enum) | | Lock of its items. |-| `unlock_ids` / `unlockIds` | `Vec<String>` | | Items a click on the lock unlocks (locked, not identity providers). |-| `lock_ids` / `lockIds` | `Vec<String>` | | Items a click on the lock locks (unlocked). |-| `open` | `bool` | | Open. |-| `rows` | [`Vec<KvVaultRow>`](#kvvaultrow-record) | | Its rows (empty while closed, unless searching). |--## `KvVaultSource` record--Returned by [`kv_vault_source`](#kv_vault_source).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `count` | `u32` | | Items that can be sent. |-| `newest_ms` / `newestMs` | `i64` | | When the newest was saved, Unix ms (0: none). |-| `ids` | `Vec<String>` | | Their ids, in list order. |-| `password_ids` / `passwordIds` | `Vec<String>` | | The app's saved passwords (ids), never part of `ids`: they are sent only when ticked in the review. |-| `passwords` | [`Vec<AppVaultPassword>`](/cua-sdk/reference/spaces/app-core#appvaultpassword-record) | | The same passwords with their site and username (never a value), for the review to list and pick from. |-| `password_picks` / `passwordPicks` | `bool` | | The daemon enforces a choice of passwords by site (`password_domains` in its status): the review may offer one. |--## `KvVaultState` record--Returned by [`kv_vault_prune`](#kv_vault_prune), [`kv_vault_reduce`](#kv_vault_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `query` | `String` | | The search text. |-| `selected` | `Vec<String>` | | Selected item ids. |-| `expanded` | `Vec<String>` | | Open groups (their keys); the rest are closed. |-| `app` | `Option<String>` | | Narrowed to one app (its provider id), as the sidebar picks it. |--## `KvVaultView` record--Returned by [`kv_vault_view`](#kv_vault_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `apps` | [`Vec<KvVaultApp>`](#kvvaultapp-record) | | Apps, by name. |-| `shown` | `u32` | | Items shown (after search). |-| `total` | `u32` | | Items in the vault. |-| `empty_text` / `emptyText` | `Option<String>` | | "No items yet." and friends. |-| `names_hidden` / `namesHidden` | `bool` | | Domains and keys are hidden until the user confirms with Touch ID. |-| `hidden_note` / `hiddenNote` | `Option<String>` | | What to say about it. |-| `show_names_label` / `showNamesLabel` | `String` | | The button that opens the names. |-| `search_prompt` / `searchPrompt` | `String` | | The search field's prompt. |-| `selection` | [`KvVaultSelection`](#kvvaultselection-record) | | The selection. |-| `can_select_all` / `canSelectAll` | `bool` | | Select all is offered. |--## `KvApprovalAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.toggle(key: String)-.selectAll-.clear-```--</Tab>-<Tab value="Rust">--```rust-KvApprovalAction::Toggle { key: String }-KvApprovalAction::SelectAll-KvApprovalAction::Clear-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Toggle` | Tick or untick a row. Fields: `key: String` |-| `SelectAll` | Tick every row. |-| `Clear` | Untick every row. |--## `KvCategory` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.all-.waiting-.access-.recent-```--</Tab>-<Tab value="Rust">--```rust-KvCategory::All-KvCategory::Waiting-KvCategory::Access-KvCategory::Recent-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `All` | Every item, grouped by app. |-| `Waiting` | Requests waiting for approval. |-| `Access` | Live grants, rules and copies. |-| `Recent` | Recent decisions. |--## `KvKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.cookie-.localStorage-.password-.file-```--</Tab>-<Tab value="Rust">--```rust-KvKind::Cookie-KvKind::LocalStorage-KvKind::Password-KvKind::File-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Cookie` | A cookie. |-| `LocalStorage` | A localStorage value. |-| `Password` | A saved password. |-| `File` | A file. |--## `KvLock` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.locked-.unlocked-.mixed-```--</Tab>-<Tab value="Rust">--```rust-KvLock::Locked-KvLock::Unlocked-KvLock::Mixed-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Locked` | Every item needs approval for each use. |-| `Unlocked` | Every item allows unattended access. |-| `Mixed` | Some of each. |--## `KvVaultAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.query(text: String)-.toggle(id: String)-.toggleGroup(key: String)-.selectAll-.clear-.toggleOpen(key: String)-```--</Tab>-<Tab value="Rust">--```rust-KvVaultAction::Query { text: String }-KvVaultAction::Toggle { id: String }-KvVaultAction::ToggleGroup { key: String }-KvVaultAction::SelectAll-KvVaultAction::Clear-KvVaultAction::ToggleOpen { key: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Query` | The search text changed. Fields: `text: String` |-| `Toggle` | Select or deselect one item. Fields: `id: String` |-| `ToggleGroup` | Select or deselect every shown item of an app, a site or the files of an app (all of them when any is unselected, none when all are). Fields: `key: String` |-| `SelectAll` | Select every shown item. |-| `Clear` | Deselect everything. |-| `ToggleOpen` | Open or close a group. Fields: `key: String` |--## `kv_approval_approve_command`--What Approve sends (none while it cannot).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvApprovalApproveCommand(overview: KeyvaultOverview, state: KvApprovalState) -> KvCommand?-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_approval_approve_command(overview: KeyvaultOverview, state: KvApprovalState) -> Option<KvCommand>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `state` | [`KvApprovalState`](#kvapprovalstate-record) | required |--**Returns** [`Option<KvCommand>`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum)--## `kv_approval_deny_command`--What Deny sends.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvApprovalDenyCommand(state: KvApprovalState) -> KvCommand-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_approval_deny_command(state: KvApprovalState) -> KvCommand-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`KvApprovalState`](#kvapprovalstate-record) | required |--**Returns** [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum)--## `kv_approval_open`--Opens the approval sheet with nothing selected.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvApprovalOpen(requestId: String) -> KvApprovalState-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_approval_open(request_id: String) -> KvApprovalState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `request_id` | `String` | required |--**Returns** [`KvApprovalState`](#kvapprovalstate-record)--## `kv_approval_reduce`--Advances the approval sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvApprovalReduce(overview: KeyvaultOverview, state: KvApprovalState, action: KvApprovalAction) -> KvApprovalState-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_approval_reduce(overview: KeyvaultOverview, state: KvApprovalState, action: KvApprovalAction) -> KvApprovalState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `state` | [`KvApprovalState`](#kvapprovalstate-record) | required |-| `action` | [`KvApprovalAction`](#kvapprovalaction-enum) | required |--**Returns** [`KvApprovalState`](#kvapprovalstate-record)--## `kv_approval_view`--The approval sheet as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvApprovalView(overview: KeyvaultOverview, state: KvApprovalState) -> KvApprovalView-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_approval_view(overview: KeyvaultOverview, state: KvApprovalState) -> KvApprovalView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `state` | [`KvApprovalState`](#kvapprovalstate-record) | required |--**Returns** [`KvApprovalView`](#kvapprovalview-record)--## `kv_delete_command`--The command that deletes items and wipes their copies in Spaces.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvDeleteCommand(ids: [String]) -> KvCommand-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_delete_command(ids: Vec<String>) -> KvCommand-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `ids` | `Vec<String>` | required |--**Returns** [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum)--## `kv_delete_confirm`--The delete confirmation.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvDeleteConfirm(count: UInt32, liveCopies: UInt32) -> KvDeleteConfirm-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_delete_confirm(count: u32, live_copies: u32) -> KvDeleteConfirm-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `count` | `u32` | required |-| `live_copies` | `u32` | required |--**Returns** [`KvDeleteConfirm`](#kvdeleteconfirm-record)--## `kv_list`--The pane for a sidebar selection (the vault list is `kv_vault_view`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvList(overview: KeyvaultOverview, selection: KvSelection, nowMs: Int64) -> KvListView-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_list(overview: KeyvaultOverview, selection: KvSelection, now_ms: i64) -> KvListView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `selection` | [`KvSelection`](#kvselection-enum) | required |-| `now_ms` | `i64` | required |--**Returns** [`KvListView`](#kvlistview-record)--## `kv_live_copy_spaces`--How many Spaces hold a live copy of any of `ids`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvLiveCopySpaces(overview: KeyvaultOverview, ids: [String], nowMs: Int64) -> UInt32-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_live_copy_spaces(overview: KeyvaultOverview, ids: Vec<String>, now_ms: i64) -> u32-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `ids` | `Vec<String>` | required |-| `now_ms` | `i64` | required |--**Returns** `u32`--## `kv_lock_command`--The command that locks items.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvLockCommand(ids: [String]) -> KvCommand-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_lock_command(ids: Vec<String>) -> KvCommand-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `ids` | `Vec<String>` | required |--**Returns** [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum)--## `kv_page`--The page chrome.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvPage(overview: KeyvaultOverview, nowMs: Int64) -> KvPage-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_page(overview: KeyvaultOverview, now_ms: i64) -> KvPage-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |--**Returns** [`KvPage`](#kvpage-record)--## `kv_sidebar`--The sidebar: All Items, Waiting, Access, Recent, and one row per app.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvSidebar(overview: KeyvaultOverview, nowMs: Int64) -> KvSidebar-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_sidebar(overview: KeyvaultOverview, now_ms: i64) -> KvSidebar-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |--**Returns** [`KvSidebar`](#kvsidebar-record)--## `kv_unlock_command`--The command that unlocks items (the daemon asks for Touch ID once).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvUnlockCommand(ids: [String]) -> KvCommand-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_unlock_command(ids: Vec<String>) -> KvCommand-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `ids` | `Vec<String>` | required |--**Returns** [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum)--## `kv_unlock_prompt`--The unlock prompt for `count` items (`name`: the one item's name). None-when the user chose "Never ask again".--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvUnlockPrompt(overview: KeyvaultOverview, count: UInt32, name: String?) -> KvUnlockPrompt?-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_unlock_prompt(overview: KeyvaultOverview, count: u32, name: Option<String>) -> Option<KvUnlockPrompt>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `count` | `u32` | required |-| `name` | `Option<String>` | required |--**Returns** [`Option<KvUnlockPrompt>`](#kvunlockprompt-record)--## `kv_unlock_prompt_always`--The unlock prompt whatever the setting says.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvUnlockPromptAlways(count: UInt32, name: String?) -> KvUnlockPrompt-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_unlock_prompt_always(count: u32, name: Option<String>) -> KvUnlockPrompt-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `count` | `u32` | required |-| `name` | `Option<String>` | required |--**Returns** [`KvUnlockPrompt`](#kvunlockprompt-record)--## `kv_vault_prune`--The selection without what the vault no longer holds.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvVaultPrune(overview: KeyvaultOverview, state: KvVaultState) -> KvVaultState-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_vault_prune(overview: KeyvaultOverview, state: KvVaultState) -> KvVaultState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `state` | [`KvVaultState`](#kvvaultstate-record) | required |--**Returns** [`KvVaultState`](#kvvaultstate-record)--## `kv_vault_reduce`--The vault list's next state (search, selection, open groups).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvVaultReduce(overview: KeyvaultOverview, state: KvVaultState, action: KvVaultAction) -> KvVaultState-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_vault_reduce(overview: KeyvaultOverview, state: KvVaultState, action: KvVaultAction) -> KvVaultState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `state` | [`KvVaultState`](#kvvaultstate-record) | required |-| `action` | [`KvVaultAction`](#kvvaultaction-enum) | required |--**Returns** [`KvVaultState`](#kvvaultstate-record)--## `kv_vault_source`--What the Keyvault holds for `provider_id` that a teleport can send.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvVaultSource(overview: KeyvaultOverview, providerId: String) -> KvVaultSource-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_vault_source(overview: KeyvaultOverview, provider_id: String) -> KvVaultSource-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `provider_id` | `String` | required |--**Returns** [`KvVaultSource`](#kvvaultsource-record)--## `kv_vault_view`--The vault list: apps, sites and items with their locks, the selection and-the batch bar.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvVaultView(overview: KeyvaultOverview, state: KvVaultState, nowMs: Int64) -> KvVaultView-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_vault_view(overview: KeyvaultOverview, state: KvVaultState, now_ms: i64) -> KvVaultView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record) | required |-| `state` | [`KvVaultState`](#kvvaultstate-record) | required |-| `now_ms` | `i64` | required |--**Returns** [`KvVaultView`](#kvvaultview-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdxdeleted file mode 100644index c016083d9f..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdx+++ /dev/null@@ -1,1140 +0,0 @@-----title: "Keyvault"-description: "The Keyvault broker client and its overview: items, pending requests, grants, rules and audit."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`KeyvaultClient` talks to the Keyvault broker and returns a `KeyvaultOverview`. The screens derived from it are on [Keyvault screens](/cua-sdk/reference/spaces/app-core/keyvault-screens).--## `AppSensitiveOption` record--Returned by [`app_picker_sensitive_options`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_sensitive_options).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `group` | [`AppSensitiveGroup`](#appsensitivegroup-enum) | | The group. |-| `label` | `String` | | Label. |-| `detail` | `String` | | The line under the label. |-| `checked` | `bool` | | Checked. |--## `AppSensitiveGroup` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.signIns-.passwords-.history-```--</Tab>-<Tab value="Rust">--```rust-AppSensitiveGroup::SignIns-AppSensitiveGroup::Passwords-AppSensitiveGroup::History-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SignIns` | The session cookies: what keeps the app signed in. |-| `Passwords` | Saved passwords. |-| `History` | Browsing history. |--## `app_sensitive_group_sdk`--The SDK's plan-option group for a picker group.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSensitiveGroupSdk(group: AppSensitiveGroup) -> TeleportSensitiveGroup-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_sensitive_group_sdk(group: AppSensitiveGroup) -> TeleportSensitiveGroup-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `group` | [`AppSensitiveGroup`](#appsensitivegroup-enum) | required |--**Returns** [`TeleportSensitiveGroup`](/cua-sdk/reference/spaces/teleport-apps#teleportsensitivegroup-enum)--## `KeyvaultClient`--The Keyvault broker client: the verified connection to the broker-`cua daemon` hosts on `$CUA_HOME/keyvault.sock`. The broker checks this-process's code signature; approvals, re-enabling and unattended-on make-the daemon ask for Touch ID. No call returns a secret value.--| Method | Description |-| --- | --- |-| [`new`](#keyvaultclientnew) | The broker in `cua_home` (`None`: `$CUA_HOME`, else `~/.cua`). |-| [`execute`](#keyvaultclientexecute) | Runs one page action (a broker request). |-| [`favicons`](#keyvaultclientfavicons) | Site icons the vault holds (not secret; empty while names are hidden). |-| [`inventory`](#keyvaultclientinventory) | What `app` holds, per domain with counts (the daemon asks for Touch ID when the browse window is closed). |-| [`lock`](#keyvaultclientlock) | Locks the vault. |-| [`overview`](#keyvaultclientoverview) | Everything the page shows. |-| [`setup_with_passphrase`](#keyvaultclientsetup_with_passphrase) | Creates the vault with a passphrase (and a recovery key, returned once). |-| [`unlock_with_passphrase`](#keyvaultclientunlock_with_passphrase) | Unlocks with the passphrase (sent only to the broker; zeroized here). |--### `KeyvaultClient.new`--The broker in `cua_home` (`None`: `$CUA_HOME`, else `~/.cua`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-init(cuaHome: String?)-```--</Tab>-<Tab value="Rust">--```rust-pub fn new(cua_home: Option<String>) -> Arc<KeyvaultClient>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `cua_home` | `Option<String>` | required |--**Returns** [`KeyvaultClient`](#keyvaultclient)--### `KeyvaultClient.execute`--Runs one page action (a broker request).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func execute(command: KvCommand) async throws -> KvOutcome-```--</Tab>-<Tab value="Rust">--```rust-pub async fn execute(&self, command: KvCommand) -> Result<KvOutcome, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `command` | [`KvCommand`](#kvcommand-enum) | required |--**Returns** [`KvOutcome`](#kvoutcome-enum) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `KeyvaultClient.favicons`--Site icons the vault holds (not secret; empty while names are hidden).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func favicons() async -> [KvFavicon]-```--</Tab>-<Tab value="Rust">--```rust-pub async fn favicons(&self) -> Vec<KvFavicon>-```--</Tab>-</Tabs>--**Returns** [`Vec<KvFavicon>`](#kvfavicon-record) · **Async**--### `KeyvaultClient.inventory`--What `app` holds, per domain with counts (the daemon asks for Touch ID-when the browse window is closed). Never a value.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func inventory(app: String, profile: String?) async throws -> KvInventory-```--</Tab>-<Tab value="Rust">--```rust-pub async fn inventory(&self, app: String, profile: Option<String>) -> Result<KvInventory, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app` | `String` | required |-| `profile` | `Option<String>` | required |--**Returns** [`KvInventory`](#kvinventory-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `KeyvaultClient.lock`--Locks the vault.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func lock() async throws-```--</Tab>-<Tab value="Rust">--```rust-pub async fn lock(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `KeyvaultClient.overview`--Everything the page shows. Never fails: an unavailable Keyvault is a-state (`availability`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func overview() async -> KeyvaultOverview-```--</Tab>-<Tab value="Rust">--```rust-pub async fn overview(&self) -> KeyvaultOverview-```--</Tab>-</Tabs>--**Returns** [`KeyvaultOverview`](#keyvaultoverview-record) · **Async**--### `KeyvaultClient.setup_with_passphrase`--Creates the vault with a passphrase (and a recovery key, returned-once). The passphrase goes only to the broker over the verified-Keyvault socket; it is never logged or kept, and zeroized here.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func setupWithPassphrase(passphrase: String) async throws -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub async fn setup_with_passphrase(&self, passphrase: String) -> Result<Option<String>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `passphrase` | `String` | required |--**Returns** `Option<String>` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `KeyvaultClient.unlock_with_passphrase`--Unlocks with the passphrase (sent only to the broker; zeroized here).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func unlockWithPassphrase(passphrase: String) async throws-```--</Tab>-<Tab value="Rust">--```rust-pub async fn unlock_with_passphrase(&self, passphrase: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `passphrase` | `String` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `KeyvaultOverview` record--Returned by [`KeyvaultClient.overview`](#keyvaultclientoverview), [`kv_overview_from_json`](#kv_overview_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `availability` | `String` | | `ready`, or why not: `not_running`, `impostor`, `connect`, `no_vault`, `locked`, `not_first_party`, `unsupported`, `error`. |-| `message` | `Option<String>` | | A sentence when not ready. |-| `status` | [`Option<KvStatus>`](#kvstatus-record) | | The broker's status. |-| `server_verified` / `serverVerified` | `bool` | | The daemon was checked against Cua's signature. |-| `items` | [`Vec<KvItem>`](#kvitem-record) | | The vault's secret items, in order (app, domain, key). |-| `names_visible` / `namesVisible` | `bool` | | Domains and keys are present in `items` (the browse window is open). |-| `items_total` / `itemsTotal` | `u32` | | Items in the vault. |-| `pending` | [`Vec<KvPending>`](#kvpending-record) | | Pending requests. |-| `grants` | [`Vec<KvGrant>`](#kvgrant-record) | | Grants. |-| `rules` | [`Vec<KvRule>`](#kvrule-record) | | Rules. |-| `deliveries` | [`Vec<KvDelivery>`](#kvdelivery-record) | | Deliveries. |-| `audit` | [`Vec<KvAuditEntry>`](#kvauditentry-record) | | Audit tail, oldest first. |-| `audit_verification` / `auditVerification` | [`Option<KvVerification>`](#kvverification-record) | | Chain check. |-| `partial_errors` / `partialErrors` | `Vec<String>` | | Sections that failed while the rest loaded. |--## `KvAccessRequest` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `selectors` | [`Vec<KvSelector>`](#kvselector-enum) | | What. |-| `targets` | `Vec<String>` | | Where. |-| `actions` | `Vec<String>` | | Actions. |-| `duration_secs` / `durationSecs` | `Option<u64>` | | For how long. |-| `uses` | `Option<u32>` | | Uses. |-| `reason` | `String` | | The caller's reason (unverified). |-| `claimed_name` / `claimedName` | `Option<String>` | | The caller's name for itself (unverified). |-| `agent` | `Option<String>` | | The named agent the request is for (unverified). |--## `KvAuditEntry` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `seq` | `u64` | | Sequence. |-| `ts_ms` / `tsMs` | `u64` | | Time. |-| `kind` | `String` | | Kind (`consent.allow`, ...). |-| `actor` | `String` | | Actor. |-| `caller_fp` / `callerFp` | `String` | | Caller fingerprint. |-| `item` | `Option<String>` | | Item. |-| `target` | `Option<String>` | | Target. |-| `decision` | `String` | | `ok`, `allow`, `deny`, `error`. |-| `detail` | `Option<String>` | | Detail. |-| `authless` | `Option<bool>` | | Written without the MAC key. |--## `KvCaller` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `pid` | `i32` | | Pid. |-| `uid` | `u32` | | Uid. |-| `path` | `Option<String>` | | Executable. |-| `signing` | [`KvSigning`](#kvsigning-enum) | | Signing. |-| `first_party` / `firstParty` | `bool` | | Satisfied the Cua requirement. |-| `os_verified` / `osVerified` | `bool` | | The OS verified the signature. |-| `launched_by` / `launchedBy` | `Option<String>` | | Launched by. |-| `verified_name` / `verifiedName` | `Option<String>` | | OS-verified leaf name. |--## `KvCredentialForm` record--Returned by [`kv_credential_form`](#kv_credential_form).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `mode` | [`KvFormMode`](#kvformmode-enum) | | Setup or unlock. |-| `method` | [`KvMethod`](#kvmethod-enum) | | Touch ID or a passphrase. |-| `help` | `String` | | One line under the form. |-| `passphrase_label` / `passphraseLabel` | `Option<String>` | | The passphrase field's label (passphrase only). |-| `confirm_label` / `confirmLabel` | `Option<String>` | | The second field's label (passphrase setup only). |-| `submit_label` / `submitLabel` | `String` | | The button. |--## `KvDelivery` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `import_id` / `importId` | `String` | | Import id. |-| `target` | `String` | | Target. |-| `provider_id` / `providerId` | `String` | | Provider. |-| `items` | `Vec<String>` | | Items. |-| `caller_fp` / `callerFp` | `String` | | Caller fingerprint. |-| `delivered_ms` / `deliveredMs` | `u64` | | Delivered. |-| `expires_ms` / `expiresMs` | `u64` | | Wiped at (`KV_NO_EXPIRY`: only when wiped). |-| `wiped` | `bool` | | Already wiped. |--## `KvDomainCount` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `domain` | `String` | | Registrable domain. |-| `cookies` | `u32` | | Cookies. |-| `session_cookies` / `sessionCookies` | `u32` | | Cookies without an expiry. |-| `local_storage` / `localStorage` | `u32` | | localStorage values. |-| `passwords` | `u32` | | Saved passwords. |-| `signin` | `bool` | | Looks like it keeps a sign-in. |-| `identity_provider` / `identityProvider` | `bool` | | An identity provider. |-| `unavailable` | `u32` | | Cookies that cannot be read (Chrome's app-bound encryption). |-| `unavailable_reason` / `unavailableReason` | `String` | | Why they cannot be read. |--## `KvFavicon` record--Returned by [`KeyvaultClient.favicons`](#keyvaultclientfavicons).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `site` | `String` | | The site (registrable domain). |-| `png` | `String` | | PNG, base64. |--## `KvGrant` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Id. |-| `request_id` / `requestId` | `String` | | Request. |-| `caller_fp` / `callerFp` | `String` | | Caller fingerprint. |-| `caller_display` / `callerDisplay` | `String` | | Caller. |-| `items` | `Vec<String>` | | Items. |-| `targets` | `Vec<String>` | | Targets. |-| `actions` | `Vec<String>` | | Actions. |-| `created_ms` / `createdMs` | `u64` | | Created. |-| `not_after_ms` / `notAfterMs` | `u64` | | Expires. |-| `uses_left` / `usesLeft` | `Option<u32>` | | Uses left (none: unlimited until expiry). |-| `revoked` | `bool` | | Revoked. |-| `agent` | `Option<String>` | | The named agent it was approved for. |--## `KvInventory` record--Returned by [`KeyvaultClient.inventory`](#keyvaultclientinventory).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider_id` / `providerId` | `String` | | Provider id. |-| `app_display` / `appDisplay` | `String` | | App name. |-| `domains` | [`Vec<KvDomainCount>`](#kvdomaincount-record) | | Domains with counts. |-| `notes` | `Vec<String>` | | Notes. |--## `KvItem` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Id. |-| `kind` | `String` | | `cookie`, `local_storage`, `password` or `file`. |-| `provider_id` / `providerId` | `String` | | The source app (`chrome`, `slack`). |-| `app_display` / `appDisplay` | `String` | | The app's name. |-| `domain` | `Option<String>` | | A cookie's host, a storage value's or password's origin; none for a file or when the names are hidden. |-| `key` | `String` | | A cookie name, storage key, username or file path; empty when the names are hidden. |-| `path` | `Option<String>` | | A cookie's path. |-| `source` | `String` | | Profile. |-| `session` | `bool` | | A cookie without an expiry. |-| `expires_ms` / `expiresMs` | `Option<i64>` | | A cookie's expiry, Unix ms. |-| `bytes` | `u64` | | Bytes. |-| `blob` | `Option<String>` | | The blob a big file's bytes live in. |-| `identity_provider` / `identityProvider` | `bool` | | Identity providers always ask: they cannot be unlocked. |-| `policy` | [`KvItemPolicy`](#kvitempolicy-record) | | Policy: `unattended` is the unlock. |-| `created_ms` / `createdMs` | `u64` | | Created. |-| `updated_ms` / `updatedMs` | `u64` | | Last saved. |-| `rev` | `u64` | | Revision. |-| `record_digest` / `recordDigest` | `String` | | Digest. |--## `KvItemPolicy` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `allowed_targets` / `allowedTargets` | `Vec<String>` | | Allowed targets (empty: any). |-| `ttl_secs` / `ttlSecs` | `u64` | | Delivery lifetime. |-| `unattended` | `bool` | | Unattended rules may use it. |--## `KvLabels` record--Returned by [`kv_labels`](#kv_labels).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `deny` | `String` | | "Deny". |-| `review` | `String` | | "Review…" (opens the approval sheet). |-| `cancel` | `String` | | "Cancel". |-| `set_up` / `setUp` | `String` | | "Set up Keyvault". |-| `unlock` | `String` | | "Unlock". |-| `revoke_all` / `revokeAll` | `String` | | "Revoke all". |-| `confirm_note` / `confirmNote` | `String` | | Under the approval sheet. |-| `protection_title` / `protectionTitle` | `String` | | "Protection". |--## `KvPassphraseCheck` record--Returned by [`kv_passphrase_check`](#kv_passphrase_check).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `can_submit` / `canSubmit` | `bool` | | The button is enabled. |-| `strength` | [`Option<KvStrength>`](#kvstrength-enum) | | Setup only, once something is typed. |-| `hint` | `Option<String>` | | One short line under the fields. |--## `KvPending` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Id. |-| `caller` | [`KvCaller`](#kvcaller-record) | | Verified caller. |-| `caller_fp` / `callerFp` | `String` | | Fingerprint. |-| `caller_display` / `callerDisplay` | `String` | | One-line verified identity. |-| `request` | [`KvAccessRequest`](#kvaccessrequest-record) | | The request. |-| `items` | [`Vec<KvItem>`](#kvitem-record) | | Existing items it resolves to. |-| `needs_import` / `needsImport` | [`Vec<KvSelector>`](#kvselector-enum) | | Selectors approval would import. |-| `created_ms` / `createdMs` | `u64` | | Created. |--## `KvRule` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Id. |-| `items` | `Vec<String>` | | Items. |-| `targets` | `Vec<String>` | | Targets (`*`: any Space). |-| `callers` | [`Vec<KvRuleCaller>`](#kvrulecaller-record) | | Callers. |-| `created_ms` / `createdMs` | `u64` | | Created. |-| `not_after_ms` / `notAfterMs` | `u64` | | Expires. |-| `enabled` | `bool` | | Enabled. |-| `note` | `String` | | Note. |--## `KvRuleCaller` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `fp` | `String` | | Fingerprint. |-| `display` | `String` | | Display. |--## `KvStatus` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `version` | `String` | | Version. |-| `initialized` | `bool` | | A vault exists. |-| `unlocked` | `bool` | | Unlocked. |-| `disabled` | `bool` | | The kill switch is on. |-| `caller_first_party` / `callerFirstParty` | `bool` | | This app is first party. |-| `caller_display` / `callerDisplay` | `String` | | How the broker sees this app. |-| `items` | `u32` | | Items. |-| `pending` | `u32` | | Pending requests. |-| `unlock_policy` / `unlockPolicy` | `Option<String>` | | `auto` or `presence`. |-| `auto_wipe` / `autoWipe` | `Option<bool>` | | Delivered copies wipe themselves after their TTL (off by default; none: not told, a broker before the setting or a third party). |-| `os_protector_available` / `osProtectorAvailable` | `bool` | | The daemon can create the OS key store protector (setup offers Touch ID); false for a development daemon, which is passphrase-only. |-| `passphrase_available` / `passphraseAvailable` | `bool` | | A passphrase can always be chosen. |-| `unlock_protectors` / `unlockProtectors` | `Vec<String>` | | Protector kinds that can unlock this vault now (`macos-keychain`, `windows-credential`, `linux-secret-service`, `passphrase`, `recovery`). |-| `browse_until_ms` / `browseUntilMs` | `Option<u64>` | | The browse window is open until this time, Unix ms: item names are visible until then. |-| `skip_unlock_prompt` / `skipUnlockPrompt` | `Option<bool>` | | "Never ask again" on the unlock prompt is on. |-| `features` | `Vec<String>` | | What the daemon supports beyond the original protocol (`password_domains`: it reads only the saved passwords of the sites picked for them); empty from a daemon that predates the list. |-| `reset_notice` / `resetNotice` | `Option<String>` | | An earlier preview's vault was found and set aside. |--## `KvVerification` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ok` | `bool` | | Intact. |-| `entries` | `u64` | | Entries. |-| `unauthenticated` | `u64` | | Entries without a MAC. |-| `tampered_line` / `tamperedLine` | `Option<u64>` | | First tampered line. |-| `reason` | `Option<String>` | | Why. |--## `KvCommand` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.setup-.unlock-.setDisabled(disabled: Bool)-.setUnattended(itemIds: [String], unattended: Bool)-.setLocked(itemIds: [String], locked: Bool)-.deleteItems(itemIds: [String])-.setSkipUnlockPrompt(on: Bool)-.browse-.endBrowse-.revokeGrant(id: String)-.removeRule(id: String)-.setAutoWipe(on: Bool)-.release(target: String)-.approve(requestId: String, items: [String]?)-.deny(requestId: String)-```--</Tab>-<Tab value="Rust">--```rust-KvCommand::Setup-KvCommand::Unlock-KvCommand::SetDisabled { disabled: bool }-KvCommand::SetUnattended { item_ids: Vec<String>, unattended: bool }-KvCommand::SetLocked { item_ids: Vec<String>, locked: bool }-KvCommand::DeleteItems { item_ids: Vec<String> }-KvCommand::SetSkipUnlockPrompt { on: bool }-KvCommand::Browse-KvCommand::EndBrowse-KvCommand::RevokeGrant { id: String }-KvCommand::RemoveRule { id: String }-KvCommand::SetAutoWipe { on: bool }-KvCommand::Release { target: String }-KvCommand::Approve { request_id: String, items: Option<Vec<String>> }-KvCommand::Deny { request_id: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Setup` | Create the vault with the OS key store (the daemon asks for presence). A passphrase never travels in a command: the shells pass it to `KeyvaultCommands::setup_with_passphrase` directly. |-| `Unlock` | Unlock with the OS key store (a passphrase goes to `KeyvaultCommands::unlock_with_passphrase`). |-| `SetDisabled` | The kill switch (turning it off asks for Touch ID). Fields: `disabled: bool` |-| `SetUnattended` | Per-item unattended (turning on asks for Touch ID): the same as `KvCommand.SetLocked` with `locked` the other way round. Fields: `item_ids: Vec<String>`, `unattended: bool` |-| `SetLocked` | Lock or unlock items together. Unlocking allows unattended access and asks for Touch ID once for the whole batch; locking does not. Fields: `item_ids: Vec<String>`, `locked: bool` |-| `DeleteItems` | Delete items, wiping every live copy of them in Spaces. Fields: `item_ids: Vec<String>` |-| `SetSkipUnlockPrompt` | "Never ask again" on the unlock prompt (Settings turns it back on). Fields: `on: bool` |-| `Browse` | Show item names for a few minutes (the daemon asks for Touch ID). |-| `EndBrowse` | Hide item names again. |-| `RevokeGrant` | Revoke a grant (`*`: all). Fields: `id: String` |-| `RemoveRule` | Remove a rule. Fields: `id: String` |-| `SetAutoWipe` | Auto-wipe of delivered copies (turning it off asks for Touch ID). Fields: `on: bool` |-| `Release` | Wipe a Space's copies. Fields: `target: String` |-| `Approve` | Approve a request for exactly these items (the daemon asks for presence). `None` keeps everything the request asked for, which the approval sheet only sends when the user ticked every row. Fields: `request_id: String`, `items: Option<Vec<String>>` |-| `Deny` | Deny a request. Fields: `request_id: String` |--## `KvFormMode` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.setup-.unlock-```--</Tab>-<Tab value="Rust">--```rust-KvFormMode::Setup-KvFormMode::Unlock-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Setup` | No vault yet. |-| `Unlock` | The vault is locked. |--## `KvMethod` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.touchId-.passphrase-```--</Tab>-<Tab value="Rust">--```rust-KvMethod::TouchId-KvMethod::Passphrase-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `TouchId` | The OS key store (the login keychain), confirmed with Touch ID. |-| `Passphrase` | A passphrase. |--## `KvOutcome` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.done-.recoveryKey(key: String?)-.locked(changed: [String], skipped: [String])-.deleted(count: UInt32, wiped: [String])-.browsing(untilMs: UInt64)-.revoked(count: UInt32)-.wiped(imports: [String])-.granted(grant: KvGrant)-```--</Tab>-<Tab value="Rust">--```rust-KvOutcome::Done-KvOutcome::RecoveryKey { key: Option<String> }-KvOutcome::Locked { changed: Vec<String>, skipped: Vec<String> }-KvOutcome::Deleted { count: u32, wiped: Vec<String> }-KvOutcome::Browsing { until_ms: u64 }-KvOutcome::Revoked { count: u32 }-KvOutcome::Wiped { imports: Vec<String> }-KvOutcome::Granted { grant: KvGrant }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Done` | Nothing to show. |-| `RecoveryKey` | The recovery key, shown once and never stored. Fields: `key: Option<String>` |-| `Locked` | Items locked or unlocked. Identity providers always ask: they are in `skipped`, never changed. Fields: `changed: Vec<String>`, `skipped: Vec<String>` |-| `Deleted` | Items deleted. Fields: `count: u32`, `wiped: Vec<String>` |-| `Browsing` | The browse window is open until then, Unix ms. Fields: `until_ms: u64` |-| `Revoked` | Grants revoked. Fields: `count: u32` |-| `Wiped` | Imports wiped. Fields: `imports: Vec<String>` |-| `Granted` | The grant an approval minted. Fields: `grant: KvGrant` |--## `KvSelector` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.item(id: String)-.site(app: String, site: String)-.app(app: String)-.login(site: String)-```--</Tab>-<Tab value="Rust">--```rust-KvSelector::Item { id: String }-KvSelector::Site { app: String, site: String }-KvSelector::App { app: String }-KvSelector::Login { site: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Item` | An existing item. Fields: `id: String` |-| `Site` | A site of an app. Fields: `app: String`, `site: String` |-| `App` | A whole app. Fields: `app: String` |-| `Login` | A site's saved password, used to sign in (never delivered). Fields: `site: String` |--## `KvSigning` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.signed(teamId: String, identifier: String, cdhash: String)-.adHoc(identifier: String, cdhash: String)-.unsigned-.unknown-```--</Tab>-<Tab value="Rust">--```rust-KvSigning::Signed { team_id: String, identifier: String, cdhash: String }-KvSigning::AdHoc { identifier: String, cdhash: String }-KvSigning::Unsigned-KvSigning::Unknown-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Signed` | Team-signed. Fields: `team_id: String`, `identifier: String`, `cdhash: String` |-| `AdHoc` | Ad hoc. Fields: `identifier: String`, `cdhash: String` |-| `Unsigned` | Unsigned. |-| `Unknown` | Unknown platform. |--## `KvStrength` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.weak-.fair-.strong-```--</Tab>-<Tab value="Rust">--```rust-KvStrength::Weak-KvStrength::Fair-KvStrength::Strong-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Weak` | Too short, or easy to guess. |-| `Fair` | Acceptable. |-| `Strong` | Long and varied. |--## `kv_credential_form`--The setup or unlock form for an overview (also `KvPage.form`): Touch ID-when the daemon can use the OS key store, else a passphrase.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvCredentialForm(overview: KeyvaultOverview) -> KvCredentialForm?-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_credential_form(overview: KeyvaultOverview) -> Option<KvCredentialForm>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |--**Returns** [`Option<KvCredentialForm>`](#kvcredentialform-record)--## `kv_duration`--A duration in words ("5 min").--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvDuration(ms: Int64) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_duration(ms: i64) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `ms` | `i64` | required |--**Returns** `String`--## `kv_labels`--The Keyvault's fixed words.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvLabels() -> KvLabels-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_labels() -> KvLabels-```--</Tab>-</Tabs>--**Returns** [`KvLabels`](#kvlabels-record)--## `kv_overview_from_json`--A Keyvault overview from JSON (fixtures, parity flows). Fixture data-only: it carries metadata, never a secret value.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvOverviewFromJson(json: String) throws -> KeyvaultOverview-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_overview_from_json(json: String) -> Result<KeyvaultOverview, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`KeyvaultOverview`](#keyvaultoverview-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `kv_passphrase_check`--The passphrase fields' hint and whether the form can be sent. Pure: the-passphrase is only measured, never kept.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvPassphraseCheck(mode: KvFormMode, passphrase: String, confirm: String) -> KvPassphraseCheck-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_passphrase_check(mode: KvFormMode, passphrase: String, confirm: String) -> KvPassphraseCheck-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `mode` | [`KvFormMode`](#kvformmode-enum) | required |-| `passphrase` | `String` | required |-| `confirm` | `String` | required |--**Returns** [`KvPassphraseCheck`](#kvpassphrasecheck-record)--## `kv_prune_dismissed`--The dismissed copies still live.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvPruneDismissed(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String]) -> [String]-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_prune_dismissed(overview: KeyvaultOverview, now_ms: i64, dismissed: Vec<String>) -> Vec<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |-| `dismissed` | `Vec<String>` | required |--**Returns** `Vec<String>`--## `kv_recovery_key_text`--The banner after setup: the recovery key, shown once.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvRecoveryKeyText(key: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_recovery_key_text(key: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `key` | `String` | required |--**Returns** `String`--## `kv_sharing_label`--The always-visible signal while Keyvault sign-ins are live in a Space-(the notch indicator and the menu bar line); none when nothing is live.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvSharingLabel(overview: KeyvaultOverview, nowMs: Int64) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_sharing_label(overview: KeyvaultOverview, now_ms: i64) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |--**Returns** `Option<String>`--## `kv_signed_in_spaces`--The ids of `spaces` signed in through the Keyvault (a live copy is in-them), less the `dismissed` copies: "Signed in" in the Spaces list-(nothing dismissed), the key on notch tiles.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvSignedInSpaces(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String], spaces: [AppSpace]) -> [String]-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_signed_in_spaces(overview: KeyvaultOverview, now_ms: i64, dismissed: Vec<String>, spaces: Vec<AppSpace>) -> Vec<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |-| `dismissed` | `Vec<String>` | required |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |--**Returns** `Vec<String>`--## `kv_space_access_key`--The Access row of `space`'s copies, to focus from its "Signed in" badge.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvSpaceAccessKey(overview: KeyvaultOverview, nowMs: Int64, space: AppSpace) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_space_access_key(overview: KeyvaultOverview, now_ms: i64, space: AppSpace) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |-| `space` | [`AppSpace`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |--**Returns** `Option<String>`--## `kv_visible_sharing_label`--`kv_sharing_label` without the copies the user dismissed (import ids):-the notch indicator.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func kvVisibleSharingLabel(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String]) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn kv_visible_sharing_label(overview: KeyvaultOverview, now_ms: i64, dismissed: Vec<String>) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |-| `now_ms` | `i64` | required |-| `dismissed` | `Vec<String>` | required |--**Returns** `Option<String>`diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.json b/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.jsondeleted file mode 100644index 8ebd7658db..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.json+++ /dev/null@@ -1,32 +0,0 @@-{- "title": "Spaces app core",- "pages": [- "spaces",- "creates",- "stream",- "new-space",- "images",- "teleport",- "teleport-transfer",- "teleport-run",- "teleport-review",- "teleport-grid",- "cloud",- "drag-trigger",- "experiments",- "run-on",- "power",- "notch",- "keyvault",- "keyvault-screens",- "onboarding-settings",- "onboarding-previews",- "about",- "this-machine",- "window",- "devices",- "agent-keys",- "share",- "telemetry"- ]-}diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/new-space.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/new-space.mdxdeleted file mode 100644index 1956652ce7..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/new-space.mdx+++ /dev/null@@ -1,897 +0,0 @@-----title: "New Space wizard"-description: "The New Space wizard: where it runs, image, engine, address and the create call."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`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.--## `AppLocation` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.cloud-.local-.yours-.host-```--</Tab>-<Tab value="Rust">--```rust-AppLocation::Cloud-AppLocation::Local-AppLocation::Yours-AppLocation::Host-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Cloud` | 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. |--## `AppCloudEngine` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.gvisor-.kubevirt-```--</Tab>-<Tab value="Rust">--```rust-AppCloudEngine::Gvisor-AppCloudEngine::Kubevirt-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Gvisor` | gVisor containers. |-| `Kubevirt` | KubeVirt VMs. |--## `AppLocalEngine` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.container-.qemu-.lume-```--</Tab>-<Tab value="Rust">--```rust-AppLocalEngine::Container-AppLocalEngine::Qemu-AppLocalEngine::Lume-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Container` | A container (gVisor when installed, else runc). |-| `Qemu` | A QEMU VM. |-| `Lume` | A Lume VM. |--## `AppRuntime` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.auto-.gvisor-.runc-.qemu-.lume-.kubevirt-```--</Tab>-<Tab value="Rust">--```rust-AppRuntime::Auto-AppRuntime::Gvisor-AppRuntime::Runc-AppRuntime::Qemu-AppRuntime::Lume-AppRuntime::Kubevirt-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Auto` | Let the SDK pick. |-| `Gvisor` | gVisor. |-| `Runc` | runc. |-| `Qemu` | QEMU. |-| `Lume` | Lume. |-| `Kubevirt` | KubeVirt. |--## `AppKindOption` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`AppSpaceKind`](/cua-sdk/reference/spaces/app-core/spaces#appspacekind-enum) | | Container or VM. |-| `image` | [`AppSandboxImage`](/cua-sdk/reference/spaces/app-core/images#appsandboximage-record) | | The image with that variant. |--## `AppMenuOption` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `value` | `String` | | Value. |-| `label` | `String` | | Title. |--## `AppTile` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Stable id (`linux`, `cloud`, `vm`, ...). |-| `title` | `String` | | Title. |-| `detail` | `String` | | Tooltip. |-| `pressed` | `bool` | | Selected. |-| `enabled` | `bool` | | Enabled. |--## `AppCreatePlan` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `placement` | [`AppLocation`](#applocation-enum) | | Where. |-| `cloud` | `Option<String>` | | For "Your cloud": the connected cloud's word (`aws`). |-| `host` | `Option<String>` | | For one of your machines: its id (`on="host:<id>"`). |-| `image` | [`AppSandboxImage`](/cua-sdk/reference/spaces/app-core/images#appsandboximage-record) | | The image (its variant is the kind). |-| `runtime` | [`AppRuntime`](#appruntime-enum) | | Engine (`auto` unless chosen). |-| `name` | `Option<String>` | | Name, when given. |-| `cpus` | `Option<u32>` | | vCPUs (local and Cua Cloud). |-| `memory_mb` / `memoryMb` | `Option<u32>` | | Memory MB (local and Cua Cloud). |-| `disk_gb` / `diskGb` | `Option<u32>` | | Local VMs only: grow the disk to this many GB (larger than the image's). |-| `open_when_ready` / `openWhenReady` | `bool` | | Open the desktop when ready. |-| `open_desktop` / `openDesktop` | `bool` | | Open the desktop once created: asked for and the image streams. |-| `gpu` | `Option<String>` | | A GPU option of the runtime (`paravirtual`), when checked and offered. |--## `AppCreateSpaceArgs` record--Returned by [`app_wizard_create_args`](#app_wizard_create_args).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image` | `String` | | Image ref. |-| `on` | `String` | | The SDK's `on`: `local`, `cloud`, `host:<machine>`, or a connected cloud's word (`aws`, `gcp`, `modal`). |-| `kind` | [`AppSpaceKind`](/cua-sdk/reference/spaces/app-core/spaces#appspacekind-enum) | | `container` / `vm`. |-| `runtime` | [`AppRuntime`](#appruntime-enum) | | Engine. |-| `name` | `Option<String>` | | Name. |-| `cpus` | `Option<u32>` | | vCPUs. |-| `memory_mb` / `memoryMb` | `Option<u32>` | | Memory MB. |-| `disk_gb` / `diskGb` | `Option<u32>` | | Disk GB (local VMs; the image's size when unset). |-| `spacesd` | `bool` | | Runs cua-spacesd. |-| `gpu` | `Option<String>` | | A GPU option of the runtime (`paravirtual`). |--## `AppLocalStorage` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `reserve_bytes` / `reserveBytes` | `u64` | | Bytes the SDK keeps free on a volume (a create that would leave less fails). |-| `lume` | [`Option<AppStorageVolume>`](#appstoragevolume-record) | | Lume's VM storage (macOS). |-| `qemu` | [`Option<AppStorageVolume>`](#appstoragevolume-record) | | The cua home (QEMU disks and the image cache). |-| `container` | [`Option<AppStorageVolume>`](#appstoragevolume-record) | | The container engine's data disk. |-| `pulled` | `Vec<String>` | | Catalog refs already pulled here. |-| `linux_runtime_download_bytes` / `linuxRuntimeDownloadBytes` | `u64` | | |--## `AppStorageVolume` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `available_bytes` / `availableBytes` | `u64` | | Bytes available. |-| `total_bytes` / `totalBytes` | `u64` | | Volume size in bytes. |-| `name` | `String` | | `Macintosh HD`, `Colima`, `Docker Desktop`. |--## `AppCloudPricing` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `vcpu_hour_usd` / `vcpuHourUsd` | `f64` | | USD per reserved vCPU per hour. |-| `memory_gib_hour_usd` / `memoryGibHourUsd` | `f64` | | USD per reserved GB (GiB) of memory per hour. |--## `AppGpuChoice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `runtime` | `String` | | `lume`, `qemu`, `container`, `gvisor`, `fleet`. |-| `id` | `String` | | What the create passes as `gpu` (`paravirtual`). |-| `label` | `String` | | "GPU acceleration". |-| `experimental` | `bool` | | Shown as "(Experimental)". |-| `supported` | `bool` | | Works on this machine now. |-| `reason` | `Option<String>` | | Why not, one line. |-| `learn_more` / `learnMore` | `Option<String>` | | The page "Learn more" opens. |--## `AppGpuRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | "GPU acceleration (Experimental)". |-| `on` | `bool` | | Checked. |-| `enabled` | `bool` | | It can be checked here. |-| `reason` | `Option<String>` | | Why not, one line (a disabled row). |-| `learn_more_label` / `learnMoreLabel` | `String` | | "Learn more". |-| `learn_more_url` / `learnMoreUrl` | `Option<String>` | | The page it opens. |--## `AppRuntimeSwitch` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `setting` | `String` | | The `cua config` setting: `runtime.lume`. |-| `value` | `String` | | The value to set: `builtin`. |-| `label` | `String` | | The button: "Use built-in Lume". |-| `detail` | `String` | | One line on what that does. |--## `AppAddressForm` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `url` | `String` | | `host:port`. |-| `token` | `String` | | spacesd token. |-| `name` | `String` | | Optional name. |-| `busy` | `bool` | | The handshake is running. |-| `error` | `Option<String>` | | The last error, in words. |--## `AppAddressSubmit` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `url` | `String` | | `host:port`, trimmed. |-| `token` | `Option<String>` | | Token, when given. |-| `name` | `Option<String>` | | Name, when given. |--## `AppAddressView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `valid` | `bool` | | The address has the right shape. |-| `show_invalid` / `showInvalid` | `bool` | | Mark the field invalid. |-| `can_submit` / `canSubmit` | `bool` | | "Add Space" is enabled. |-| `submit_label` / `submitLabel` | `String` | | "Add Space" / "Connecting...". |-| `error` | `Option<String>` | | Error line. |-| `submit` | [`Option<AppAddressSubmit>`](#appaddresssubmit-record) | | What "Add Space" sends (trimmed), when it can be pressed. |--## `AppStepDot` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | [`AppOnboardingStep`](/cua-sdk/reference/spaces/app-core/onboarding-settings#apponboardingstep-enum) | | Page. |-| `label` | `String` | | Label. |-| `current` | `bool` | | Current. |--## `AppStepView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | Title. |-| `state` | [`AppStepState`](#appstepstate-enum) | | State. |--## `AppWizardEnv` record--Returned by [`app_wizard_env_from_json`](#app_wizard_env_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `default_location` / `defaultLocation` | [`AppLocation`](#applocation-enum) | | 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. |-| `lume_source` / `lumeSource` | `Option<String>` | | Which Lume macOS Spaces run on (`runtime.lume`: `auto`, `builtin`, `system`), when known. |-| `linux_source` / `linuxSource` | `Option<String>` | | Which engine local Linux Spaces run on (`runtime.linux`: `auto`, `builtin`, `system`), when known (a Mac). |-| `storage` | [`Option<AppLocalStorage>`](#applocalstorage-record) | | Free space and pulled images here (the SDK's `Local.storage()`), when known. |-| `cloud_pricing` / `cloudPricing` | [`Option<AppCloudPricing>`](#appcloudpricing-record) | | This account's Cua Cloud rates, when known (no estimate without). |-| `clouds` | [`Vec<AppConnectedCloud>`](/cua-sdk/reference/spaces/app-core/cloud#appconnectedcloud-record) | | The user's connected clouds (`cloud_status`), for "Your cloud" (offered only while its experiment is on: `offered_clouds`). |-| `hosts` | [`Vec<AppSpaceHost>`](/cua-sdk/reference/spaces/app-core/run-on#appspacehost-record) | | The user's machines that provide Spaces (`Spaces.hosts()`). |-| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments ("Your cloud" decides whether clouds show). |-| `gpus` | [`Option<Vec<AppGpuChoice>>`](#appgpuchoice-record) | | 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. |-| `name_seed` / `nameSeed` | `Option<u64>` | | Picks the name an unnamed Space gets (`generated_space_name`); `None`: this process's own randomness. A core without randomness (the wasm build) is given one; tests give a fixed one. |--## `AppWizardFact` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `kind`, `arch`, `disk`, `download`, `available`. |-| `label` | `String` | | Label. |-| `value` | `String` | | Value. |-| `symbol` | `Option<String>` | | A symbol after the value (`exclamationmark.triangle`). |-| `help` | `Option<String>` | | The symbol's tooltip. |--## `AppWizardField` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `os`, `image`, `placement`, `kind`, `runtime`, `connect-cloud`, `connect-by-address`, `cpus`, `memory`, `disk`, `name`, `open-when-ready`, `address`, `token`, `address-name`. |-| `label` | `String` | | Label (or the link's title). |-| `placeholder` | `Option<String>` | | Placeholder. |-| `error` | `Option<String>` | | One line under the field. |-| `advanced` | `bool` | | Inside "Advanced". |--## `AppWizardLabels` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `cancel` | `String` | | "Cancel". |-| `back` | `String` | | "Back". |-| `advanced` | `String` | | "Advanced". |--## `AppWizardState` record--Returned by [`app_wizard_initial`](#app_wizard_initial), [`app_wizard_reduce`](#app_wizard_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `mode` | [`AppWizardMode`](#appwizardmode-enum) | | Create or address. |-| `step` | `u32` | | 0..=3. |-| `placement` | [`AppLocation`](#applocation-enum) | | Where it runs. |-| `picked` | `bool` | | The person chose a placement (the default no longer follows Settings). |-| `image_ref` / `imageRef` | `String` | | The preset the Space is based on (its OS, kind and engines). With a custom ref typed, the Space runs that ref the same way. |-| `image_text` / `imageText` | `String` | | The image field as typed: a preset's ref or any other reference. |-| `suggest_open` / `suggestOpen` | `bool` | | The suggestion list is open. |-| `suggest_filter` / `suggestFilter` | `bool` | | The list filters by the text (typing); opening it shows every preset. |-| `suggest_index` / `suggestIndex` | `Option<u32>` | | The highlighted row (keyboard), over the visible rows in order. |-| `cpus` | `u32` | | vCPUs as chosen (the view keeps them within where it runs). |-| `memory_gb` / `memoryGb` | `u32` | | Memory GB as chosen (the view keeps it within where it runs). |-| `disk_gb` / `diskGb` | `Option<u32>` | | Disk GB as chosen (local VMs that can grow); `None`: the image's. |-| `name` | `String` | | Name as typed. |-| `open_when_ready` / `openWhenReady` | `bool` | | Open the desktop when ready. |-| `advanced` | `bool` | | Advanced shown. |-| `runtime_choice` / `runtimeChoice` | [`AppRuntime`](#appruntime-enum) | | Runtime as chosen (the effective one is in the view). |-| `cloud` | `Option<String>` | | The connected cloud chosen for "Your cloud" (`aws`); `None`: the default one. |-| `host` | `Option<String>` | | The machine chosen for `Location::Host` (`SpaceHost.id`). |-| `gpu` | `bool` | | The GPU box is checked (it applies where the effective runtime offers a GPU). |-| `address` | [`AppAddressForm`](#appaddressform-record) | | The address form. |-| `generated_name` / `generatedName` | `String` | | The name the Space gets when Name is left empty (`generated_space_name`, chosen when the wizard opens). |-| `resource_edit` / `resourceEdit` | [`Option<AppResourceEdit>`](/cua-sdk/reference/spaces/app-core#appresourceedit-record) | | A slider's value being typed (its number was clicked). |--## `AppWizardView` record--Returned by [`app_wizard_view`](#app_wizard_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `mode` | [`AppWizardMode`](#appwizardmode-enum) | | Create or address. |-| `step` | `u32` | | 0..=3. |-| `steps` | [`Vec<AppStepView>`](#appstepview-record) | | Step list. |-| `title` | `String` | | Step heading. |-| `os_tiles` / `osTiles` | [`Vec<AppTile>`](#apptile-record) | | OS tiles. |-| `image_field` / `imageField` | [`AppImageFieldView`](/cua-sdk/reference/spaces/app-core/images#appimagefieldview-record) | | The image field. |-| `image` | [`AppSandboxImage`](/cua-sdk/reference/spaces/app-core/images#appsandboximage-record) | | The image. |-| `placements` | [`Vec<AppPlacementOption>`](/cua-sdk/reference/spaces/app-core/run-on#appplacementoption-record) | | The "Run on" menu: This Mac, your machines that provide Spaces, then your connected clouds (with the "Your cloud" experiment). |-| `placement_id` / `placementId` | `String` | | The chosen entry's id (`PlacementOption.id`). |-| `cloud` | `Option<String>` | | The connected cloud "Your cloud" creates in (`aws`). |-| `host` | `Option<String>` | | The machine of yours it creates on (`SpaceHost.id`). |-| `placement_error` / `placementError` | `Option<String>` | | Why the chosen placement cannot be used. |-| `placement_hint` / `placementHint` | `Option<String>` | | One line under "Run on" when This Mac cannot run the Space and no machine of yours is listed: how another Mac joins. |-| `runtime_switch` / `runtimeSwitch` | [`Option<AppRuntimeSwitch>`](#appruntimeswitch-record) | | Switches This Mac to the built-in runtime the Space needs, when it is set to use its own and that is missing. |-| `advanced` | `bool` | | Advanced shown. |-| `kind_tiles` / `kindTiles` | [`Vec<AppTile>`](#apptile-record) | | Kind tiles. |-| `runtimes` | [`Vec<AppMenuOption>`](#appmenuoption-record) | | Runtime menu. |-| `runtime` | [`AppRuntime`](#appruntime-enum) | | Effective runtime. |-| `runtime_enabled` / `runtimeEnabled` | `bool` | | The runtime menu has a choice. |-| `cpus` | `u32` | | Cores. |-| `min_cpus` / `minCpus` | `u32` | | Slider min. |-| `max_cpus` / `maxCpus` | `u32` | | Slider max. |-| `min_memory_gb` / `minMemoryGb` | `u32` | | Memory slider min, GB. |-| `max_memory_gb` / `maxMemoryGb` | `u32` | | Memory slider max, GB. |-| `cpus_text` / `cpusText` | `String` | | "2 cores". |-| `memory_gb` / `memoryGb` | `u32` | | Memory GB. |-| `memory_text` / `memoryText` | `String` | | "4 GB". |-| `disk_editable` / `diskEditable` | `bool` | | 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. |-| `resource_facts` / `resourceFacts` | [`Vec<AppWizardFact>`](#appwizardfact-record) | | The Resources step's lines under the sliders: kind, architecture, disk (or download), available. |-| `resources_error` / `resourcesError` | `Option<String>` | | One line when the Space does not fit where it is written (blocks Continue). |-| `gpu` | [`Option<AppGpuRow>`](#appgpurow-record) | | The GPU row (Resources), where the runtime offers a GPU. |-| `resource_edit` / `resourceEdit` | [`Option<AppResourceEditView>`](/cua-sdk/reference/spaces/app-core#appresourceeditview-record) | | A slider's value being typed: the field shows instead of its number (its error is also the field's `WizardField.error`). |-| `name` | `String` | | Name as typed. |-| `space_name` / `spaceName` | `String` | | The name the Space gets: the one typed, else the generated one (the Name field's placeholder). |-| `name_invalid` / `nameInvalid` | `bool` | | The name breaks the DNS-label rule. |-| `name_error` / `nameError` | `Option<String>` | | Why, in one line. |-| `open_when_ready` / `openWhenReady` | `bool` | | Open when ready. |-| `stream_note` / `streamNote` | `Option<String>` | | "No desktop stream for this image yet." |-| `summary` | [`Vec<AppFact>`](/cua-sdk/reference/spaces/app-core/window#appfact-record) | | The Summary list. |-| `can_continue` / `canContinue` | `bool` | | Continue is enabled. |-| `show_back` / `showBack` | `bool` | | Back shows. |-| `primary_label` / `primaryLabel` | `String` | | "Continue" or "Create Space". |-| `plan` | [`AppCreatePlan`](#appcreateplan-record) | | What Create sends. |-| `address` | [`AppAddressView`](#appaddressview-record) | | The address form. |-| `fields` | [`Vec<AppWizardField>`](#appwizardfield-record) | | The fields of this step (or the address form), in order. |-| `labels` | [`AppWizardLabels`](#appwizardlabels-record) | | Fixed words. |--## `AppStepState` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.done-.current-.todo-```--</Tab>-<Tab value="Rust">--```rust-AppStepState::Done-AppStepState::Current-AppStepState::Todo-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Done` | Done. |-| `Current` | Current. |-| `Todo` | Not reached. |--## `AppWizardAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.syncDefault(location: AppLocation)-.chooseOs(os: AppSpaceOs)-.chooseImage(imageRef: String)-.setImageText(text: String)-.openImageSuggestions-.moveImageSuggestion(delta: Int32)-.pickImageSuggestion-.dismissImageSuggestions-.setPlacement(placement: AppLocation)-.chooseCloud(cloud: String)-.choosePlacement(on: String)-.toggleAdvanced-.chooseKind(kind: AppSpaceKind)-.setRuntime(runtime: AppRuntime)-.setCpus(cpus: UInt32)-.setMemory(memoryGb: UInt32)-.setDisk(diskGb: UInt32)-.resetDisk-.editResource(field: AppResourceField)-.setResourceText(text: String)-.commitResource-.cancelResource-.setGpu(on: Bool)-.setName(name: String)-.setOpenWhenReady(on: Bool)-.next-.back-.showAddress-.hideAddress-.setAddress(url: String)-.setToken(token: String)-.setAddressName(name: String)-.submitAddress-.addressFailed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppWizardAction::SyncDefault { location: AppLocation }-AppWizardAction::ChooseOs { os: AppSpaceOs }-AppWizardAction::ChooseImage { image_ref: String }-AppWizardAction::SetImageText { text: String }-AppWizardAction::OpenImageSuggestions-AppWizardAction::MoveImageSuggestion { delta: i32 }-AppWizardAction::PickImageSuggestion-AppWizardAction::DismissImageSuggestions-AppWizardAction::SetPlacement { placement: AppLocation }-AppWizardAction::ChooseCloud { cloud: String }-AppWizardAction::ChoosePlacement { on: String }-AppWizardAction::ToggleAdvanced-AppWizardAction::ChooseKind { kind: AppSpaceKind }-AppWizardAction::SetRuntime { runtime: AppRuntime }-AppWizardAction::SetCpus { cpus: u32 }-AppWizardAction::SetMemory { memory_gb: u32 }-AppWizardAction::SetDisk { disk_gb: u32 }-AppWizardAction::ResetDisk-AppWizardAction::EditResource { field: AppResourceField }-AppWizardAction::SetResourceText { text: String }-AppWizardAction::CommitResource-AppWizardAction::CancelResource-AppWizardAction::SetGpu { on: bool }-AppWizardAction::SetName { name: String }-AppWizardAction::SetOpenWhenReady { on: bool }-AppWizardAction::Next-AppWizardAction::Back-AppWizardAction::ShowAddress-AppWizardAction::HideAddress-AppWizardAction::SetAddress { url: String }-AppWizardAction::SetToken { token: String }-AppWizardAction::SetAddressName { name: String }-AppWizardAction::SubmitAddress-AppWizardAction::AddressFailed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SyncDefault` | 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. |-| `EditResource` | A slider's number clicked: its value can be typed. Fields: `field: AppResourceField` |-| `SetResourceText` | The typed value's text. Fields: `text: String` |-| `CommitResource` | Return (or leaving the field): the typed value is used when it is within the slider's limits; otherwise the field stays with why. |-| `CancelResource` | Escape: the slider's value stays. |-| `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` |--## `AppWizardMode` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.create-.address-```--</Tab>-<Tab value="Rust">--```rust-AppWizardMode::Create-AppWizardMode::Address-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Create` | The four steps. |-| `Address` | Connect by address. |--## `app_wizard_action_from_json`--A wizard action from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardActionFromJson(json: String) throws -> AppWizardAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_action_from_json(json: String) -> Result<AppWizardAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppWizardAction`](#appwizardaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_wizard_create_args`--The SDK call a plan makes (`create_space`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardCreateArgs(plan: AppCreatePlan) -> AppCreateSpaceArgs-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_create_args(plan: AppCreatePlan) -> AppCreateSpaceArgs-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `plan` | [`AppCreatePlan`](#appcreateplan-record) | required |--**Returns** [`AppCreateSpaceArgs`](#appcreatespaceargs-record)--## `app_wizard_create_failed_text`--The notice when `create_space` failed.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardCreateFailedText(error: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_create_failed_text(error: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `error` | `String` | required |--**Returns** `String`--## `app_wizard_creating_text`--The notice while a plan is being created.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardCreatingText(plan: AppCreatePlan) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_creating_text(plan: AppCreatePlan) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `plan` | [`AppCreatePlan`](#appcreateplan-record) | required |--**Returns** `String`--## `app_wizard_env_from_json`--The wizard's environment from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardEnvFromJson(json: String) throws -> AppWizardEnv-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_env_from_json(json: String) -> Result<AppWizardEnv, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppWizardEnv`](#appwizardenv-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_wizard_image_suggestions`--The presets matching the image field's text, grouped.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardImageSuggestions(query: String) -> [AppImageGroup]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_image_suggestions(query: String) -> Vec<AppImageGroup>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `query` | `String` | required |--**Returns** [`Vec<AppImageGroup>`](/cua-sdk/reference/spaces/app-core/images#appimagegroup-record)--## `app_wizard_initial`--The wizard's first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardInitial(env: AppWizardEnv) -> AppWizardState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_initial(env: AppWizardEnv) -> AppWizardState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `env` | [`AppWizardEnv`](#appwizardenv-record) | required |--**Returns** [`AppWizardState`](#appwizardstate-record)--## `app_wizard_reduce`--Advances the wizard.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardReduce(state: AppWizardState, action: AppWizardAction, env: AppWizardEnv) -> AppWizardState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_reduce(state: AppWizardState, action: AppWizardAction, env: AppWizardEnv) -> AppWizardState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppWizardState`](#appwizardstate-record) | required |-| `action` | [`AppWizardAction`](#appwizardaction-enum) | required |-| `env` | [`AppWizardEnv`](#appwizardenv-record) | required |--**Returns** [`AppWizardState`](#appwizardstate-record)--## `app_wizard_validate_image_ref`--Why a typed image ref cannot be used, in one line (`None`: it can).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardValidateImageRef(imageRef: String) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_validate_image_ref(image_ref: String) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `image_ref` | `String` | required |--**Returns** `Option<String>`--## `app_wizard_view`--The wizard as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardView(state: AppWizardState, env: AppWizardEnv) -> AppWizardView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_view(state: AppWizardState, env: AppWizardEnv) -> AppWizardView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppWizardState`](#appwizardstate-record) | required |-| `env` | [`AppWizardEnv`](#appwizardenv-record) | required |--**Returns** [`AppWizardView`](#appwizardview-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdxdeleted file mode 100644index 48c2da9616..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdx+++ /dev/null@@ -1,748 +0,0 @@-----title: "Notch"-description: "The notch switcher: state, events, layout on the screen and motion."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The notch is the Space switcher at the top of the screen. `app_notch_reduce` applies an event; `app_notch_layout`, `app_notch_radii` and `app_notch_motion` place and animate it.--## `AppScreenFacts` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `frame` | [`AppLogicalRect`](#applogicalrect-record) | | `NSScreen.frame`. |-| `visible_frame` / `visibleFrame` | [`AppLogicalRect`](#applogicalrect-record) | | `NSScreen.visibleFrame`. |-| `safe_area_top` / `safeAreaTop` | `f64` | | `safeAreaInsets.top` (0 without a notch). |-| `aux_left_width` / `auxLeftWidth` | `Option<f64>` | | `auxiliaryTopLeftArea` width, when present. |-| `aux_right_width` / `auxRightWidth` | `Option<f64>` | | `auxiliaryTopRightArea` width, when present. |--## `AppLogicalRect` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `x` | `f64` | | |-| `y` | `f64` | | |-| `width` | `f64` | | |-| `height` | `f64` | | |--## `app_presence_name`--The name on this user's presence cursor: the account's name, else its-email's local part, else its username, else this computer's account-(full, then short name). Never empty, never an agent's or "You".--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPresenceName(name: String?, email: String?, username: String?, osFullName: String?, osUser: String?) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_presence_name(name: Option<String>, email: Option<String>, username: Option<String>, os_full_name: Option<String>, os_user: Option<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `name` | `Option<String>` | required |-| `email` | `Option<String>` | required |-| `username` | `Option<String>` | required |-| `os_full_name` | `Option<String>` | required |-| `os_user` | `Option<String>` | required |--**Returns** `String`--## `app_presence_principal_id`--The stable principal id this user joins presence as.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPresencePrincipalId(email: String?, subject: String?, username: String?, osUser: String?) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_presence_principal_id(email: Option<String>, subject: Option<String>, username: Option<String>, os_user: Option<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `email` | `Option<String>` | required |-| `subject` | `Option<String>` | required |-| `username` | `Option<String>` | required |-| `os_user` | `Option<String>` | required |--**Returns** `String`--## `app_os_icon_svg`--An OS icon's artwork (a single-color 24 x 24 SVG), by the id a tile-carries (`os-ubuntu`, ...).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOsIconSvg(id: String) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_os_icon_svg(id: String) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |--**Returns** `Option<String>`--## `app_os_icon_system_symbol`--The system symbol drawn instead of the SVG on macOS (`apple.logo`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOsIconSystemSymbol(id: String) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_os_icon_system_symbol(id: String) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |--**Returns** `Option<String>`--## `AppNotchAccess` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | "Keyvault sign-ins live in dev-1" (opens the Access page). |-| `dismiss` | `String` | | "Dismiss". |--## `AppNotchActivity` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`AppNotchActivityKind`](#appnotchactivitykind-enum) | | Which. |-| `label` | `String` | | Spoken label and tooltip. |-| `symbol` | `Option<String>` | | The symbol to draw (the hotspot), else a ring. |-| `permille` | `Option<u32>` | | Real progress in thousandths (a transfer with a known total). |-| `started_at` / `startedAt` | `Option<i64>` | | Epoch ms the ring's estimate runs from (the earliest starting Space); none means from when the ring appears. |-| `estimate_ms` / `estimateMs` | `u32` | | The estimate reaches about 80% after this long (`estimated_progress`). |--## `AppNotchButton` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | [`AppNotchButtonId`](#appnotchbuttonid-enum) | | What it does. |-| `symbol` | `String` | | SF Symbol. |-| `label` | `String` | | Accessibility label. |-| `help` | `String` | | Tooltip. |--## `AppNotchHeader` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `query` | `String` | | The search text. |-| `placeholder` | `String` | | "Search". |-| `search_label` / `searchLabel` | `String` | | The field's spoken label. |-| `match_count` / `matchCount` | `Option<u32>` | | How many Spaces match, while searching. |-| `buttons` | [`Vec<AppNotchButton>`](#appnotchbutton-record) | | Left to right: the list, then Settings at the far right. |--## `AppNotchLayout` record--Returned by [`app_notch_layout`](#app_notch_layout).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `has_notch` / `hasNotch` | `bool` | | A real camera housing. |-| `notch` | [`AppLogicalRect`](#applogicalrect-record) | | The notch (or the virtual one), AppKit coordinates. |-| `closed_frame` / `closedFrame` | [`AppLogicalRect`](#applogicalrect-record) | | The closed panel's hit area: the notch grown for hover and drags. |-| `open_frame` / `openFrame` | [`AppLogicalRect`](#applogicalrect-record) | | The open panel frame (tiles and prompt), top-centred. |-| `prompt_frame` / `promptFrame` | [`AppLogicalRect`](#applogicalrect-record) | | The "Teleport to Cua" box alone, hanging below the notch. |-| `tab_frame` / `tabFrame` | [`AppLogicalRect`](#applogicalrect-record) | | The "N Spaces" tab beside the closed notch (right of it), at its widest. |-| `tab_inset_notch` / `tabInsetNotch` | `f64` | | Space between a closed tab's content (the "N Spaces" rows, the activity ring on the left) and the tab's edge toward the notch. |-| `tab_inset_outer` / `tabInsetOuter` | `f64` | | Space between a closed tab's content and its outer edge (before the outer ear). |-| `stage_frame` / `stageFrame` | [`AppLogicalRect`](#applogicalrect-record) | | The overlay window: every frame above plus `SHADOW_PADDING`, so the shape animates inside one window that never resizes mid-spring. Its transparent pixels pass clicks through. |-| `notch_style` / `notchStyle` | `bool` | | Draw the black notch shape (true) or a floating glass capsule. |--## `AppNotchMotion` record--Returned by [`app_notch_motion`](#app_notch_motion).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `hover_dwell_ms` / `hoverDwellMs` | `u32` | | Hover dwell before the panel opens. |-| `close_delay_ms` / `closeDelayMs` | `u32` | | Delay before closing after the pointer leaves. |-| `open_response` / `openResponse` | `f64` | | Opening spring response (s). |-| `open_damping` / `openDamping` | `f64` | | Opening spring damping fraction. |-| `close_response` / `closeResponse` | `f64` | | Closing spring response (s). |-| `close_damping` / `closeDamping` | `f64` | | Closing spring damping fraction. |-| `reduced_duration` / `reducedDuration` | `f64` | | Reduce Motion: opacity-only duration (s). |-| `hover_response` / `hoverResponse` | `f64` | | Hover acknowledgement spring response (s): the closed notch grows a little while the dwell runs. |-| `hover_damping` / `hoverDamping` | `f64` | | Hover acknowledgement damping fraction. |-| `hover_scale` / `hoverScale` | `f64` | | Horizontal scale of the closed notch (and its tab) under the pointer. |-| `hover_scale_y` / `hoverScaleY` | `f64` | | Vertical scale of the closed notch under the pointer (a few points taller, anchored at the top). |-| `content_delay_ms` / `contentDelayMs` | `u32` | | The content starts fading in this long after the shape starts opening (ms). |-| `content_in` / `contentIn` | `f64` | | Content fade-in duration (s). |-| `content_out` / `contentOut` | `f64` | | Content fade-out duration on close (s); the shape waits for it. |-| `content_scale` / `contentScale` | `f64` | | Content scale at the start of its fade-in (anchored at the top). |--## `AppNotchPermission` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | The line. |-| `action` | `String` | | The button. |-| `pane` | `String` | | Which settings pane the button opens (`accessibility`). |--## `AppNotchPreview` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `closed` | [`AppLogicalRect`](#applogicalrect-record) | | The closed notch with its ears, top centred. |-| `open` | [`AppLogicalRect`](#applogicalrect-record) | | The open panel, top centred. |-| `closed_radii` / `closedRadii` | [`AppNotchRadii`](#appnotchradii-record) | | Closed radii, scaled. |-| `open_radii` / `openRadii` | [`AppNotchRadii`](#appnotchradii-record) | | Open radii, scaled. |-| `tab` | [`AppLogicalRect`](#applogicalrect-record) | | The "N Spaces" tab right of the notch. |-| `notch` | [`AppLogicalRect`](#applogicalrect-record) | | The camera housing (the closed notch without its ears). |-| `view` | [`AppNotchView`](#appnotchview-record) | | The open panel's content at real size (the header row flanking the notch, then the tiles): the shells lay it out at `content_width` by `content_height` points and scale it by `scale` into `open`. |-| `content_width` / `contentWidth` | `f64` | | The content's real width. |-| `content_height` / `contentHeight` | `f64` | | The content's real height. |-| `notch_height` / `notchHeight` | `f64` | | The real notch's height (the header row's height, real points). |-| `side` | `f64` | | The content's side inset, real points (open top radius + padding). |-| `scale` | `f64` | | Real points to stage points. |--## `AppNotchRadii` record--Returned by [`app_notch_radii`](#app_notch_radii).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `top` | `f64` | | Top (concave ear) radius. |-| `bottom` | `f64` | | Bottom radius. |--## `AppNotchState` record--Returned by [`app_notch_initial`](#app_notch_initial).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `open` | `bool` | | Opened by hover or click. |-| `hovering` | `bool` | | The pointer is over the panel. |-| `drop_targeted` / `dropTargeted` | `bool` | | A file or app drag (pasteboard) is over the panel. |-| `drag` | [`AppDragOverlayState`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlaystate-record) | | The window drag state machine. |-| `drag_permission_missing` / `dragPermissionMissing` | `bool` | | Window-drag detection needs a permission this process lacks (macOS Accessibility): the open panel says so instead of failing silently. |-| `query` | `String` | | The header's search text (cleared when the panel closes). |-| `hotspot` | `bool` | | This machine shares its network to a Space (the hotspot). |-| `transfer` | [`Option<AppNotchTransfer>`](#appnotchtransfer-record) | | A teleport or file transfer is in flight. |-| `keyvault` | `Option<String>` | | Keyvault sign-ins are live in a Space right now (the core's `crate.keyvault.view.sharing_label`), so access is never silent. |-| `signed_in` / `signedIn` | `Vec<String>` | | The Spaces signed in through the Keyvault, less the copies the user dismissed (`crate.keyvault.view.signed_in_spaces`): their tiles carry the key. |-| `hidden` | `bool` | | "Spaces tab in the notch: Hide" (menu bar only): nothing shows in the notch, and hover, clicks and window drags do nothing. |--## `AppNotchTab` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `count` | `String` | | "9". |-| `word` | `String` | | "Spaces" (or "Space"). |--## `AppNotchTile` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Space id. |-| `name` | `String` | | Name. |-| `os` | [`AppSpaceOs`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | OS. |-| `status` | [`AppSpaceStatus`](/cua-sdk/reference/spaces/app-core/spaces#appspacestatus-enum) | | Status. |-| `dim` | `bool` | | Drawn at reduced opacity. |-| `drop_target` / `dropTarget` | `bool` | | Accepts a teleport drop (reachable). |-| `targeted` | `bool` | | Under the dragged window. |-| `symbol` | `String` | | The Space's OS icon id (`os_icon`: `os-macos`, `os-windows`, `os-ubuntu`, ..., `os-linux`); the artwork is `os_icon_svg`, or on macOS the system symbol `os_icon_system_symbol` names. |-| `label` | `String` | | Accessibility label: name, OS, where it runs and status. |-| `location` | `String` | | Where it runs, in words, on the tile's header line next to the OS logo: "This Mac", the machine that provides it ("Mac mini"), the address of one added by address, or the cloud's place (`location`). |-| `progress` | `Option<u32>` | | While it is being created: overall progress in thousandths (a ring over the tile). |-| `progress_label` / `progressLabel` | `Option<String>` | | While it is being created: the phase in words ("Starting…"), or "Failed"; while it is being deleted, "Deleting…". |-| `signed_in` / `signedIn` | `bool` | | Signed in through the Keyvault (and not dismissed): the key badge. |--## `AppNotchTransfer` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `sent` | `Option<u64>` | | Bytes sent so far. |-| `total` | `Option<u64>` | | Total bytes, when known. |--## `AppNotchTransition` record--Returned by [`app_notch_reduce`](#app_notch_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `state` | [`AppNotchState`](#appnotchstate-record) | | New state. |-| `effects` | [`Vec<AppNotchEffect>`](#appnotcheffect-enum) | | Effects to run. |--## `AppNotchView` record--Returned by [`app_notch_view`](#app_notch_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | [`AppNotchPhase`](#appnotchphase-enum) | | What shows. |-| `tiles` | [`Vec<AppNotchTile>`](#appnotchtile-record) | | The tiles (in `tiles`). |-| `drop_mode` / `dropMode` | `bool` | | Tiles accept drops. |-| `prompt` | `Option<String>` | | The prompt line. |-| `label` | `String` | | Accessibility label of the panel. |-| `count_label` / `countLabel` | `String` | | "N Spaces": the tab's spoken label (remote Spaces only). |-| `tab` | [`AppNotchTab`](#appnotchtab-record) | | The tab's two rows: the count over the word. |-| `header` | [`Option<AppNotchHeader>`](#appnotchheader-record) | | The row flanking the notch in the open panel: the search left of it, the buttons right of it. None while dropping. |-| `empty` | `Option<String>` | | The line in place of the tiles when the search matches nothing. |-| `activity` | [`Option<AppNotchActivity>`](#appnotchactivity-record) | | The indicator left of the closed notch. |-| `hidden` | `bool` | | The notch is hidden (menu bar only): draw nothing. |-| `show_tab` / `showTab` | `bool` | | The tab shows (closed, no drag in flight; a drag tucks it away). |-| `hover_cue` / `hoverCue` | `bool` | | The pointer rests on the closed notch while the dwell runs: the shells grow it by `NotchMotion.hover_scale`. |-| `permission` | [`Option<AppNotchPermission>`](#appnotchpermission-record) | | One line in the open panel when window drags cannot be detected. |-| `access` | [`Option<AppNotchAccess>`](#appnotchaccess-record) | | One line in the open panel while Keyvault sign-ins are live in a Space (and not dismissed): what is live, and Dismiss. |--## `AppNotchActivityKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.transfer-.remoteAccess-.hotspot-.provisioning-.deleting-.keyvault-```--</Tab>-<Tab value="Rust">--```rust-AppNotchActivityKind::Transfer-AppNotchActivityKind::RemoteAccess-AppNotchActivityKind::Hotspot-AppNotchActivityKind::Provisioning-AppNotchActivityKind::Deleting-AppNotchActivityKind::Keyvault-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Transfer` | A teleport or file transfer: a progress ring. |-| `RemoteAccess` | Someone is connected to this machine (host sharing): its symbol, pulsing, for as long as they are. |-| `Hotspot` | The network hotspot: its symbol, pulsing. |-| `Provisioning` | A Space starting: a progress ring on the startup estimate. |-| `Deleting` | A Space being deleted: a ring on the delete estimate. |-| `Keyvault` | Keyvault sign-ins live in a Space: the key symbol, pulsing. |--## `AppNotchButtonId` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.list-.settings-```--</Tab>-<Tab value="Rust">--```rust-AppNotchButtonId::List-AppNotchButtonId::Settings-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `List` | Opens the main window (the Spaces list). |-| `Settings` | Opens Settings. |--## `AppNotchEffect` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.startDwell(ms: UInt32)-.startClose(ms: UInt32)-.cancelTimers-.drag(effect: AppDragOverlayEffect)-```--</Tab>-<Tab value="Rust">--```rust-AppNotchEffect::StartDwell { ms: u32 }-AppNotchEffect::StartClose { ms: u32 }-AppNotchEffect::CancelTimers-AppNotchEffect::Drag { effect: AppDragOverlayEffect }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `StartDwell` | Start (or restart) the dwell timer. Fields: `ms: u32` |-| `StartClose` | Start the close timer. Fields: `ms: u32` |-| `CancelTimers` | Cancel pending timers. |-| `Drag` | A window drag effect (capture the ghost, commit the teleport). Fields: `effect: AppDragOverlayEffect` |--## `AppNotchEvent` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.hoverEnter-.hoverExit-.dwellElapsed-.closeElapsed-.click-.dismiss-.dropTargeted(targeted: Bool)-.drag(event: AppDragOverlayEvent)-.dragPermission(granted: Bool)-.search(query: String)-.escape-.visibility(shown: Bool)-.activity(hotspot: Bool, transfer: AppNotchTransfer?)-.keyvault(label: String?, signedIn: [String])-```--</Tab>-<Tab value="Rust">--```rust-AppNotchEvent::HoverEnter-AppNotchEvent::HoverExit-AppNotchEvent::DwellElapsed-AppNotchEvent::CloseElapsed-AppNotchEvent::Click-AppNotchEvent::Dismiss-AppNotchEvent::DropTargeted { targeted: bool }-AppNotchEvent::Drag { event: AppDragOverlayEvent }-AppNotchEvent::DragPermission { granted: bool }-AppNotchEvent::Search { query: String }-AppNotchEvent::Escape-AppNotchEvent::Visibility { shown: bool }-AppNotchEvent::Activity { hotspot: bool, transfer: Option<AppNotchTransfer> }-AppNotchEvent::Keyvault { label: Option<String>, signed_in: Vec<String> }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `HoverEnter` | Pointer entered. |-| `HoverExit` | Pointer left. |-| `DwellElapsed` | The dwell timer the core asked for fired. |-| `CloseElapsed` | The close timer the core asked for fired. |-| `Click` | Click on the closed notch. |-| `Dismiss` | Esc or a click outside. |-| `DropTargeted` | A pasteboard drag entered (true) or left (false) the panel. Fields: `targeted: bool` |-| `Drag` | A window drag event. Fields: `event: AppDragOverlayEvent` |-| `DragPermission` | The shell checked the window-drag permission. Fields: `granted: bool` |-| `Search` | The header's search text changed. Fields: `query: String` |-| `Escape` | Esc: clears the search first, then closes. |-| `Visibility` | The notch setting changed: shown, or hidden (menu bar only). Fields: `shown: bool` |-| `Activity` | The hotspot or a transfer started, progressed or ended. Fields: `hotspot: bool`, `transfer: Option<AppNotchTransfer>` |-| `Keyvault` | Keyvault sharing started, changed or stopped (none: nothing live). Fields: `label: Option<String>`, `signed_in: Vec<String>` |--## `AppNotchPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.closed-.tiles-.prompt-```--</Tab>-<Tab value="Rust">--```rust-AppNotchPhase::Closed-AppNotchPhase::Tiles-AppNotchPhase::Prompt-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Closed` | Just the notch. |-| `Tiles` | The Space tiles. |-| `Prompt` | The Teleport prompt ("Teleport to Cua"). |--## `app_notch_estimated_progress`--The activity ring's fill without real progress, in thousandths.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchEstimatedProgress(elapsedMs: Int64, estimateMs: UInt32) -> UInt32-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_estimated_progress(elapsed_ms: i64, estimate_ms: u32) -> u32-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `elapsed_ms` | `i64` | required |-| `estimate_ms` | `u32` | required |--**Returns** `u32`--## `app_notch_initial`--The notch panel's first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchInitial() -> AppNotchState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_initial() -> AppNotchState-```--</Tab>-</Tabs>--**Returns** [`AppNotchState`](#appnotchstate-record)--## `app_notch_layout`--The notch rectangle and panel frames for a screen.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchLayout(screen: AppScreenFacts, prompt: Bool) -> AppNotchLayout-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_layout(screen: AppScreenFacts, prompt: bool) -> AppNotchLayout-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `screen` | [`AppScreenFacts`](#appscreenfacts-record) | required |-| `prompt` | `bool` | required |--**Returns** [`AppNotchLayout`](#appnotchlayout-record)--## `app_notch_motion`--The springs and delays every shell animates with.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchMotion() -> AppNotchMotion-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_motion() -> AppNotchMotion-```--</Tab>-</Tabs>--**Returns** [`AppNotchMotion`](#appnotchmotion-record)--## `app_notch_radii`--Closed and open corner radii.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchRadii() -> [AppNotchRadii]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_radii() -> Vec<AppNotchRadii>-```--</Tab>-</Tabs>--**Returns** [`Vec<AppNotchRadii>`](#appnotchradii-record)--## `app_notch_reduce`--Advances the notch panel.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchReduce(state: AppNotchState, event: AppNotchEvent) -> AppNotchTransition-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_reduce(state: AppNotchState, event: AppNotchEvent) -> AppNotchTransition-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppNotchState`](#appnotchstate-record) | required |-| `event` | [`AppNotchEvent`](#appnotchevent-enum) | required |--**Returns** [`AppNotchTransition`](#appnotchtransition-record)--## `app_notch_tile_at`--The drop-target tile under a point (AppKit coordinates) in the open-panel; `row` when the line above the tiles shows.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchTileAt(layout: AppNotchLayout, tiles: [AppNotchTile], row: Bool, x: Double, y: Double) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_tile_at(layout: AppNotchLayout, tiles: Vec<AppNotchTile>, row: bool, x: f64, y: f64) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `layout` | [`AppNotchLayout`](#appnotchlayout-record) | required |-| `tiles` | [`Vec<AppNotchTile>`](#appnotchtile-record) | required |-| `row` | `bool` | required |-| `x` | `f64` | required |-| `y` | `f64` | required |--**Returns** `Option<String>`--## `app_notch_view`--The notch panel as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appNotchView(state: AppNotchState, spaces: [AppSpace]) -> AppNotchView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_notch_view(state: AppNotchState, spaces: Vec<AppSpace>) -> AppNotchView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppNotchState`](#appnotchstate-record) | required |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |--**Returns** [`AppNotchView`](#appnotchview-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-previews.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-previews.mdxdeleted file mode 100644index 9955324c02..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-previews.mdx+++ /dev/null@@ -1,284 +0,0 @@-----title: "Onboarding previews"-description: "The animated miniatures on the onboarding cards: the background computer-use card, the notch and the menu bar."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_driver_preview` and `app_presentation_preview` return the miniatures of the AI agents and presentation cards; the `*_frame` functions give one frame of the loop and the `*_still` functions the frame shown with Reduce Motion. The onboarding flow itself is on [Onboarding and settings](/cua-sdk/reference/spaces/app-core/onboarding-settings).--## `AppDriverFrame` record--Returned by [`app_driver_preview_frame`](#app_driver_preview_frame), [`app_driver_preview_still`](#app_driver_preview_still).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `pointer` | [`AppPreviewPoint`](#apppreviewpoint-record) | | The user's pointer tip. |-| `pressed` | `bool` | | The user presses (drawn a little smaller). |-| `selection` | `f64` | | How much of the selected line is highlighted, 0 to 1 from its left. |-| `agent` | [`AppPreviewPoint`](#apppreviewpoint-record) | | The agent cursor's tip. |-| `agent_pressed` / `agentPressed` | `bool` | | The agent presses (drawn a little smaller). |-| `ripple` | `f64` | | The click rays, 0 hidden, else 0 to 1 through their burst (they grow out and fade). |-| `checked` | `Vec<f64>` | | Each checkbox's tick, 0 to 1. |--## `AppDriverPreview` record--Returned by [`app_driver_preview`](#app_driver_preview).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `width` | `f64` | | Stage width. |-| `height` | `f64` | | Stage height. |-| `loop_ms` / `loopMs` | `u32` | | One loop (ms). |-| `back` | [`AppPreviewWindow`](#apppreviewwindow-record) | | The window the agent works in (behind). |-| `front` | [`AppPreviewWindow`](#apppreviewwindow-record) | | The window the user works in (in front). |-| `checkboxes` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The back window's checkboxes, top to bottom. |-| `labels` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The label bar right of each checkbox. |-| `lines` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The front window's text lines (placeholder bars). |-| `selected_line` / `selectedLine` | `u32` | | The line the user selects (an index into `lines`). |-| `pointer` | [`Vec<AppPreviewPoint>`](#apppreviewpoint-record) | | The user's pointer outline, tip at the origin (fill black, stroke white). |-| `agent_pointer` / `agentPointer` | [`Vec<AppPreviewPoint>`](#apppreviewpoint-record) | | The agent cursor's outline, tip at the origin (fill `agent_fill`, stroke white, a soft glow of `agent_fill`). |-| `agent_fill` / `agentFill` | `String` | | The agent cursor's fill. |-| `agent_rays` / `agentRays` | [`Vec<AppPreviewSegment>`](#apppreviewsegment-record) | | The click rays, relative to the agent cursor's tip. |--## `AppMenuPreview` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `icon` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The Cua Spaces icon (the tray template). |-| `highlight` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The status item's highlight while pressed or open. |-| `clock` | `String` | | The clock at the menu bar's right end. |-| `clock_right` / `clockRight` | `f64` | | Its right edge. |-| `menu` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The menu. |-| `radius` | `f64` | | Its corner radius. |-| `rows` | [`Vec<AppMenuPreviewRow>`](#appmenupreviewrow-record) | | The rows, top to bottom (`window.menu_bar` for `SPACES`). |-| `inset` | `f64` | | Text and shortcut inset from the menu's edges. |-| `font_size` / `fontSize` | `f64` | | The rows' font size. |--## `AppMenuPreviewRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `item` | [`AppMenuItem`](/cua-sdk/reference/spaces/app-core/window#appmenuitem-record) | | The core's item. |-| `frame` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | Its row on the stage. |--## `AppPresentationPreview` record--Returned by [`app_presentation_preview`](#app_presentation_preview).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `menu_bar` / `menuBar` | `bool` | | The menu bar card (else the notch card). |-| `width` | `f64` | | Stage width. |-| `height` | `f64` | | Stage height. |-| `menu_bar_height` / `menuBarHeight` | `f64` | | The menu bar strip along the top. |-| `loop_ms` / `loopMs` | `u32` | | One loop (ms). |-| `pointer` | [`Vec<AppPreviewPoint>`](#apppreviewpoint-record) | | The pointer's outline, tip at the origin (fill black, stroke white). |-| `notch` | [`Option<AppNotchPreview>`](/cua-sdk/reference/spaces/app-core/notch#appnotchpreview-record) | | The notch card's miniature. |-| `menu` | [`Option<AppMenuPreview>`](#appmenupreview-record) | | The menu bar card's miniature. |--## `AppPreviewFrame` record--Returned by [`app_presentation_preview_frame`](#app_presentation_preview_frame), [`app_presentation_preview_still`](#app_presentation_preview_still).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `pointer` | [`AppPreviewPoint`](#apppreviewpoint-record) | | The pointer's tip. |-| `pressed` | `bool` | | The pointer presses (drawn a little smaller). |-| `hover` | `f64` | | Notch: the hover cue, 0 to 1 (the closed notch and its tab grow by 1 + (hover_scale - 1) * hover horizontally, about the top centre). |-| `open` | `f64` | | Notch: the shape, closed 0 to open 1 (a spring: it can pass 1); menu: the menu's opacity. |-| `content` | `f64` | | Notch: the content's fade, 0 to 1 (it also grows from `content_scale`, anchored at the top); menu: the same as `open`. |-| `tab` | `f64` | | Notch: the tab, 1 shown to 0 tucked under the notch. |-| `highlighted` | `Option<u32>` | | Menu: the row under the pointer (an enabled item), highlighted. |-| `active` | `bool` | | Menu: the status item is highlighted (pressed, or its menu open). |--## `AppPreviewPoint` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `x` | `f64` | | Left. |-| `y` | `f64` | | Down. |--## `AppPreviewSegment` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `from` | [`AppPreviewPoint`](#apppreviewpoint-record) | | Start. |-| `to` | [`AppPreviewPoint`](#apppreviewpoint-record) | | End. |--## `AppPreviewWindow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `frame` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | Its frame on the stage. |-| `title_bar` / `titleBar` | `f64` | | The title bar's height (the three window buttons sit in it). |-| `radius` | `f64` | | Corner radius. |--## `app_driver_preview`--The AI agents page's background computer-use card: its miniature (an-agent clicking in a background window while the user works in front).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriverPreview() -> AppDriverPreview-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_driver_preview() -> AppDriverPreview-```--</Tab>-</Tabs>--**Returns** [`AppDriverPreview`](#appdriverpreview-record)--## `app_driver_preview_frame`--The card's miniature `t_ms` into its loop (it wraps).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriverPreviewFrame(tMs: UInt32) -> AppDriverFrame-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_driver_preview_frame(t_ms: u32) -> AppDriverFrame-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `t_ms` | `u32` | required |--**Returns** [`AppDriverFrame`](#appdriverframe-record)--## `app_driver_preview_still`--The card's miniature with Reduce Motion: mid-task, still.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriverPreviewStill() -> AppDriverFrame-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_driver_preview_still() -> AppDriverFrame-```--</Tab>-</Tabs>--**Returns** [`AppDriverFrame`](#appdriverframe-record)--## `app_presentation_preview`--A presentation card's animated miniature (the notch card, or with-`menu_bar` the menu bar card).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPresentationPreview(menuBar: Bool) -> AppPresentationPreview-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_presentation_preview(menu_bar: bool) -> AppPresentationPreview-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `menu_bar` | `bool` | required |--**Returns** [`AppPresentationPreview`](#apppresentationpreview-record)--## `app_presentation_preview_frame`--The miniature `t_ms` into its loop (it wraps).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPresentationPreviewFrame(menuBar: Bool, tMs: UInt32) -> AppPreviewFrame-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_presentation_preview_frame(menu_bar: bool, t_ms: u32) -> AppPreviewFrame-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `menu_bar` | `bool` | required |-| `t_ms` | `u32` | required |--**Returns** [`AppPreviewFrame`](#apppreviewframe-record)--## `app_presentation_preview_still`--The miniature with Reduce Motion: expanded, still.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPresentationPreviewStill(menuBar: Bool) -> AppPreviewFrame-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_presentation_preview_still(menu_bar: bool) -> AppPreviewFrame-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `menu_bar` | `bool` | required |--**Returns** [`AppPreviewFrame`](#apppreviewframe-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdxdeleted file mode 100644index 711e8c33cf..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx+++ /dev/null@@ -1,748 +0,0 @@-----title: "Onboarding and settings"-description: "First-run onboarding, the settings file and the hotkey label."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_onboarding_reduce` steps through first-run onboarding. `app_settings_load` and `app_settings_save` read and write the apps' settings file. The animated miniatures on the onboarding cards are on [Onboarding previews](/cua-sdk/reference/spaces/app-core/onboarding-previews).--## `app_format_hotkey`--A hotkey label (`⌘⇧Space`), or none.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appFormatHotkey(combo: AppKeyCombo) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_format_hotkey(combo: AppKeyCombo) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `combo` | [`AppKeyCombo`](#appkeycombo-record) | required |--**Returns** `Option<String>`--## `AppKeyCombo` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | The key (`" "`, `"k"`, `"ArrowUp"`, ...). |-| `meta_key` / `metaKey` | `bool` | | Command. |-| `ctrl_key` / `ctrlKey` | `bool` | | Control. |-| `alt_key` / `altKey` | `bool` | | Option. |-| `shift_key` / `shiftKey` | `bool` | | Shift. |--## `AppSwitcherTheme` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.island-.glass-```--</Tab>-<Tab value="Rust">--```rust-AppSwitcherTheme::Island-AppSwitcherTheme::Glass-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Island` | Opaque black, flush with the notch (default). |-| `Glass` | Translucent, below the notch. |--## `AppUsageToggle` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | "Share anonymous usage data". |-| `on` | `bool` | | On. |-| `enabled` | `bool` | | It can be changed (the environment does not decide). |-| `help` | `Option<String>` | | Why it cannot ("Set by env DO_NOT_TRACK"). |--## `AppModeChoice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `mode` | [`AppOnboardingMode`](#apponboardingmode-enum) | | What it means. |-| `label` | `String` | | Label. |-| `preselected` | `bool` | | Highlighted (the installer's preselection, else the first). |--## `AppPresentationCard` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `menu_bar` / `menuBar` | `bool` | | Menu bar only. |-| `title` | `String` | | "Notch and menu bar". |-| `id` | `String` | | The card's id (`onboarding-notch`, `onboarding-menu-bar`): its accessibility identifier and list key. |-| `image_label` / `imageLabel` | `String` | | The miniature's spoken description. |-| `selected` | `bool` | | Picked. |--## `AppOnboardingCheckbox` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | "Launch at login". |-| `checked` | `bool` | | Ticked. |-| `note` | `String` | | The line under it. |--## `AppOnboardingCopy` record--Returned by [`app_onboarding_copy`](#app_onboarding_copy).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `back` | `String` | | "Back". |-| `skip` | `String` | | "Skip". |-| `continue_label` / `continueLabel` | `String` | | "Continue". |-| `try_again` / `tryAgain` | `String` | | "Try again". |-| `checking` | `String` | | "Checking…" (the install plan loads). |-| `install_script` / `installScript` | `String` | | The install script when the app bundles no `cua`. |-| `install` | `String` | | "Install". |-| `installing` | `String` | | "Installing…". |-| `add_to_path` / `addToPath` | `String` | | The PATH switch. |-| `shadowed` | `String` | | When another `cua` comes first on PATH. |-| `sign_in` / `signIn` | `String` | | "Sign in". |-| `sign_in_waiting` / `signInWaiting` | `String` | | While the browser is open. |-| `agents_looking` / `agentsLooking` | `String` | | While agents are detected. |-| `agents_none` / `agentsNone` | `String` | | No agent found. |-| `agents_skills` / `agentsSkills` | `String` | | The skills switch. |-| `agents_mcp` / `agentsMcp` | `String` | | The MCP switch. |-| `agents_set_up` / `agentsSetUp` | `String` | | "Set up". |-| `agents_setting_up` / `agentsSettingUp` | `String` | | "Setting up…". |-| `agents_done_title` / `agentsDoneTitle` | `String` | | After setup: heading. |-| `agents_done_lede` / `agentsDoneLede` | `String` | | After setup: one line. |-| `agents_driver` / `agentsDriver` | `String` | | The background computer-use card's one line (its checkbox). |-| `agents_driver_image` / `agentsDriverImage` | `String` | | The card's miniature, for accessibility. |-| `permissions_title` / `permissionsTitle` | `String` | | Over the permission rows (Done, after host setup). |-| `open_settings` / `openSettings` | `String` | | The permission rows' button. |-| `teams` | `String` | | The Sign in page's Teams line ("Teams · manage them at app.cua.ai"). |-| `teams_link` / `teamsLink` | `String` | | Its link ("Open the account app"). |-| `teams_url` / `teamsUrl` | `String` | | The link's URL: the account app, which administers teams. |--## `AppOnboardingState` record--Returned by [`app_onboarding_initial`](#app_onboarding_initial), [`app_onboarding_reduce`](#app_onboarding_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | [`AppOnboardingStep`](#apponboardingstep-enum) | | Page. |-| `cli_target` / `cliTarget` | `Option<String>` | | Where `cua` was installed, when it was. |-| `cli_plan` / `cliPlan` | [`Option<AppCliInstallPlan>`](/cua-sdk/reference/spaces/app-core/about#appcliinstallplan-record) | | The bundled `cua`'s install plan, as the shell read it. |-| `cli_installing` / `cliInstalling` | `bool` | | Continue on Command line: the shell is installing. |-| `cli_error` / `cliError` | `Option<String>` | | Why the install failed. |-| `menu_bar` / `menuBar` | `bool` | | Menu bar only (no notch). The same setting as Settings' "Spaces tab in the notch". |-| `identity` | `Option<String>` | | Signed-in identity. |-| `agents` | `Vec<String>` | | Agents configured. |-| `mode` | [`Option<AppOnboardingMode>`](#apponboardingmode-enum) | | The choice. |-| `installer_mode` / `installerMode` | [`Option<AppOnboardingMode>`](#apponboardingmode-enum) | | The installer's preselection (`--mode host`, MDM file). |-| `drive_os` / `driveOs` | [`Option<AppSpaceOs>`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | This machine's system, once the drive was checked. |-| `drive_status` / `driveStatus` | [`Option<AppDriveMountInput>`](/cua-sdk/reference/spaces/volume-app-core#appdrivemountinput-record) | | `volume_mount_status`, when the daemon answered. |-| `drive_checked` / `driveChecked` | `bool` | | The drive was checked (answered or not). |-| `drive_mount` / `driveMount` | `bool` | | The Cua Volume checkbox (off by default). |-| `drive_request` / `driveRequest` | [`Option<AppDriveStepRequest>`](/cua-sdk/reference/spaces/volume-app-core#appdrivesteprequest-enum) | | What the shell is running for the page. |-| `drive_error` / `driveError` | `Option<String>` | | Why mounting failed. |-| `drive_storage` / `driveStorage` | [`Option<AppDriveStorageInput>`](/cua-sdk/reference/spaces/volume-app-core#appdrivestorageinput-record) | | `volume_storage`, when the daemon answered. |-| `storage_choice` / `storageChoice` | [`AppStorageChoice`](/cua-sdk/reference/spaces/volume-app-core#appstoragechoice-enum) | | Where the files live, as picked. |-| `drive_home` / `driveHome` | `Option<String>` | | The home folder (paths show as `~/...`). |-| `storage_picked` / `storagePicked` | `bool` | | The user picked (the saved backend no longer decides). |-| `storage` | [`AppStorageState`](/cua-sdk/reference/spaces/volume-app-core#appstoragestate-record) | | The bucket form and its test or save (`crate.drive_settings`'s state; its `request` is the shell's). |-| `launch_at_login` / `launchAtLogin` | `bool` | | Done's "Launch at login" checkbox (ticked unless unticked). The shell applies it when the first run finishes. |-| `telemetry` | [`Option<AppTelemetryInput>`](/cua-sdk/reference/spaces/app-core/window#apptelemetryinput-record) | | The usage-data switch on Welcome: the machine's telemetry setting (Settings' "Share anonymous usage data", `cua telemetry off`), none until the shell read it (then it shows on). |-| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments: the Cua Volume page (and its Done line) only while Cua Volume is on. Off until the shell says otherwise. |-| `run_counted` / `runCounted` | `bool` | | The run's start was counted (`onboarding_shown`, Welcome shown): when Welcome showed on a machine whose usage notice was already shown, else when Welcome was left. Once per run, however often Welcome shows again (Back). |-| `revisit` | `bool` | | A page opened from Done's to-do list: leaving it (Continue, Skip or Back) comes back to Done. |--## `AppOnboardingTodo` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | [`AppOnboardingTodoId`](#apponboardingtodoid-enum) | | Which. |-| `title` | `String` | | "Cua CLI". |-| `note` | `String` | | One plain line under it. |-| `done` | `bool` | | Set up. |-| `optional` | `bool` | | Nice to have: "You're all set" does not wait for it. |-| `action` | `Option<String>` | | The fix's button ("Install the Cua CLI"), while not done. |--## `AppOnboardingView` record--Returned by [`app_onboarding_view`](#app_onboarding_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | [`AppOnboardingStep`](#apponboardingstep-enum) | | Page. |-| `dots` | [`Vec<AppStepDot>`](/cua-sdk/reference/spaces/app-core/new-space#appstepdot-record) | | Page dots. |-| `title` | `String` | | Heading. |-| `lede` | `String` | | One line under it. |-| `primary_label` / `primaryLabel` | `String` | | The primary button. |-| `can_skip` / `canSkip` | `bool` | | A Skip button shows. |-| `can_back` / `canBack` | `bool` | | A Back button shows. |-| `show_mark` / `showMark` | `bool` | | The stacked Cua mark shows (Welcome). |-| `preselected_mode` / `preselectedMode` | [`AppOnboardingMode`](#apponboardingmode-enum) | | The machine choice to highlight (the installer's preselection). |-| `summary` | [`Vec<AppFact>`](/cua-sdk/reference/spaces/app-core/window#appfact-record) | | Done's facts. |-| `choices` | [`Vec<AppModeChoice>`](#appmodechoice-record) | | This machine's two answers (the installer's preselection first highlighted), on its page. |-| `presentations` | [`Vec<AppPresentationCard>`](#apppresentationcard-record) | | The presentation page's two cards, side by side. |-| `prompts` | `Vec<String>` | | Done's example prompts (`PROMPTS`), one line each: shown under both columns under "Try asking your agent:", to suggest what to ask a coding agent. Each copies to the clipboard on click. |-| `notice` | `Option<String>` | | The first-run telemetry notice (the Welcome page, so the first run itself can be measured): nothing is sent before it has been shown once. |-| `notice_link_label` / `noticeLinkLabel` | `Option<String>` | | Its link: label. |-| `notice_link_url` / `noticeLinkUrl` | `Option<String>` | | Its link: URL. |-| `usage` | [`Option<AppUsageToggle>`](#appusagetoggle-record) | | Welcome's usage-data switch, next to the notice: nothing is sent before the user leaves Welcome, and nothing at all while it is off. |-| `drive` | [`Option<AppDriveCard>`](/cua-sdk/reference/spaces/volume-app-core#appdrivecard-record) | | The Cua Volume page's card. |-| `launch_at_login` / `launchAtLogin` | [`Option<AppOnboardingCheckbox>`](#apponboardingcheckbox-record) | | Done's "Launch at login" checkbox. |-| `todos` | [`Vec<AppOnboardingTodo>`](#apponboardingtodo-record) | | Done's to-do list: the Cua CLI, the account, an AI agent and Cua Volume, each set up or with its fix. The title says "Almost done" until every one that is not optional is. |--## `AppSettings` record--Returned by [`app_settings_choose_experiment`](/cua-sdk/reference/spaces/app-core/experiments#app_settings_choose_experiment), [`app_settings_load`](#app_settings_load), [`app_settings_resolve_new_ui`](/cua-sdk/reference/spaces/app-core/experiments#app_settings_resolve_new_ui).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `hotkey` | `String` | | Global hotkey label. |-| `menu_bar` / `menuBar` | `bool` | | The switcher lives in the menu bar instead of the notch. |-| `theme` | [`AppSwitcherTheme`](#appswitchertheme-enum) | | Switcher theme. |-| `default_location` / `defaultLocation` | [`AppLocation`](/cua-sdk/reference/spaces/app-core/new-space#applocation-enum) | | Where New Space starts. |-| `hide_in_full_screen` / `hideInFullScreen` | `bool` | | Hide the notch over full-screen apps. |-| `notifications_seen_ms` / `notificationsSeenMs` | `u64` | | The newest notification already posted (Unix ms; 0: never polled). |-| `last_seen_version` / `lastSeenVersion` | `Option<String>` | | The version and build the app last launched as (`crate.about.identity`; `None`: never recorded). A launch as another one follows an update (`crate.about.after_launch`). |-| `update_channel` / `updateChannel` | [`AppUpdateChannel`](/cua-sdk/reference/spaces/app-core/about#appupdatechannel-enum) | | Which releases the updater offers (Settings, About). |-| `launch_at_login` / `launchAtLogin` | `Option<bool>` | | Launch at login, as the user chose it (the first run's Done page or Settings); `None`: never chosen (`crate.login_item.launch_plan`). |-| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments: every switch off unless turned on (`crate.experiments`). Its `webUi` is the New UI as this launch shows it (`resolve_new_ui`); the file keeps only `Self.new_ui`'s "on" there, the value older builds read. |-| `new_ui` / `newUi` | `Option<bool>` | | The New UI as the user chose it (Settings, Experiments, "Use classic UI"); `None`: never chosen, so `crate.experiments.new_ui_default` decides. An older build's saved `webUi: true` reads as `Some(true)`; its `false` was only the saved default, so it reads as never chosen (`load`). |-| `dismissed_access` / `dismissedAccess` | `Vec<String>` | | Keyvault copies (import ids) the user dismissed from the notch: it no longer shows them, nothing is revoked or wiped (`crate.keyvault.view.prune_dismissed` forgets the gone ones). |-| `keyvault_site_icons` / `keyvaultSiteIcons` | `bool` | | Keyvault rows may load a site's icon from Google's favicon service when the source browser had none (Settings, Keyvault; on by default). Off, only icons read locally are shown. |-| `teleport_choices` / `teleportChoices` | [`Vec<AppRememberedChoice>`](/cua-sdk/reference/spaces/app-core/teleport-review#apprememberedchoice-record) | | The sites the user sent to each Space last time, per app (`crate.teleport.review.remember`): the review starts from them. |-| `auto_connect` / `autoConnect` | `bool` | | Settings, General: a running Space's desktop streams as soon as it is opened (on by default); off, it waits for Connect (`crate.spaces.cover`). |-| `current_team_id` / `currentTeamId` | `Option<String>` | | Settings, Teams: the team (organization id) the account works in when it is in several (`crate.teams.current`); `None` or an id the account left: its first owned team. |--## `AppOnboardingAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.start-.cliInstalled(target: String?)-.cliPlanned(plan: AppCliInstallPlan)-.cliDone(install: Bool)-.cliInstallFailed(error: String)-.presentationPicked(menuBar: Bool)-.presentationDone-.signedIn(identity: String)-.signinDone-.agentsDone(configured: [String])-.modeChosen(mode: AppOnboardingMode)-.driveChecked(os: AppSpaceOs, status: AppDriveMountInput?)-.driveToggled(on: Bool)-.driveContinue-.driveMounted(status: AppDriveMountInput)-.driveFailed(error: String)-.driveStorageLoaded(storage: AppDriveStorageInput, home: String?)-.storageChosen(choice: AppStorageChoice)-.driveStorage(action: AppStorageAction)-.driveStorageSaved(check: AppDriveCheckInput)-.launchAtLoginToggled(on: Bool)-.back-.telemetryLoaded(telemetry: AppTelemetryInput)-.welcomeShown-.usageDataToggled(on: Bool)-.experimentsLoaded(experiments: AppExperiments)-.todoChosen(id: AppOnboardingTodoId)-.agentsDetected(configured: [String])-```--</Tab>-<Tab value="Rust">--```rust-AppOnboardingAction::Start-AppOnboardingAction::CliInstalled { target: Option<String> }-AppOnboardingAction::CliPlanned { plan: AppCliInstallPlan }-AppOnboardingAction::CliDone { install: bool }-AppOnboardingAction::CliInstallFailed { error: String }-AppOnboardingAction::PresentationPicked { menu_bar: bool }-AppOnboardingAction::PresentationDone-AppOnboardingAction::SignedIn { identity: String }-AppOnboardingAction::SigninDone-AppOnboardingAction::AgentsDone { configured: Vec<String> }-AppOnboardingAction::ModeChosen { mode: AppOnboardingMode }-AppOnboardingAction::DriveChecked { os: AppSpaceOs, status: Option<AppDriveMountInput> }-AppOnboardingAction::DriveToggled { on: bool }-AppOnboardingAction::DriveContinue-AppOnboardingAction::DriveMounted { status: AppDriveMountInput }-AppOnboardingAction::DriveFailed { error: String }-AppOnboardingAction::DriveStorageLoaded { storage: AppDriveStorageInput, home: Option<String> }-AppOnboardingAction::StorageChosen { choice: AppStorageChoice }-AppOnboardingAction::DriveStorage { action: AppStorageAction }-AppOnboardingAction::DriveStorageSaved { check: AppDriveCheckInput }-AppOnboardingAction::LaunchAtLoginToggled { on: bool }-AppOnboardingAction::Back-AppOnboardingAction::TelemetryLoaded { telemetry: AppTelemetryInput }-AppOnboardingAction::WelcomeShown-AppOnboardingAction::UsageDataToggled { on: bool }-AppOnboardingAction::ExperimentsLoaded { experiments: AppExperiments }-AppOnboardingAction::TodoChosen { id: AppOnboardingTodoId }-AppOnboardingAction::AgentsDetected { configured: Vec<String> }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Start` | "Get started". |-| `CliInstalled` | The app installed its bundled `cua` on first launch (any page). Fields: `target: Option<String>` |-| `CliPlanned` | The bundled `cua`'s install plan, read or installed (any page). Fields: `plan: AppCliInstallPlan` |-| `CliDone` | Continue (`install`) or Skip from Command line. Fields: `install: bool` |-| `CliInstallFailed` | The Command line page's install failed. Fields: `error: String` |-| `PresentationPicked` | A presentation card was picked (it stays on the page). Fields: `menu_bar: bool` |-| `PresentationDone` | Continue from the presentation page. |-| `SignedIn` | Signed in. Fields: `identity: String` |-| `SigninDone` | Continue (or Skip) from Sign in. |-| `AgentsDone` | The agents step finished. Fields: `configured: Vec<String>` |-| `ModeChosen` | The machine choice was made. Fields: `mode: AppOnboardingMode` |-| `DriveChecked` | What the drive mount can do here (`volume_mount_status`; none when the daemon could not answer). Any page. Fields: `os: AppSpaceOs`, `status: Option<AppDriveMountInput>` |-| `DriveToggled` | The Cua Volume checkbox. Fields: `on: bool` |-| `DriveContinue` | Continue from Cua Volume: mounts or unmounts first when the checkbox and the daemon disagree. |-| `DriveMounted` | `volume_mount` / `volume_unmount` answered. Fields: `status: AppDriveMountInput` |-| `DriveFailed` | `volume_mount` / `volume_unmount` failed. Fields: `error: String` |-| `DriveStorageLoaded` | `volume_storage` answered. Any page. Fields: `storage: AppDriveStorageInput`, `home: Option<String>` |-| `StorageChosen` | Where the files live was picked. Fields: `choice: AppStorageChoice` |-| `DriveStorage` | An edit of the bucket form, Test connection, or a test's answer (`set-field`, `set-path-style`, `test`, `checked`, `failed`). Fields: `action: AppStorageAction` |-| `DriveStorageSaved` | Continue's `volume_storage_set` answered. Fields: `check: AppDriveCheckInput` |-| `LaunchAtLoginToggled` | Done's "Launch at login" checkbox. Fields: `on: bool` |-| `Back` | Back one page (not from Welcome or Done). |-| `TelemetryLoaded` | The machine's telemetry setting, as the shell read it. Any page. Fields: `telemetry: AppTelemetryInput` |-| `WelcomeShown` | Welcome is on screen (each time it shows; after `telemetry-loaded`). On a machine that already showed the usage notice, with usage data on, the run's start counts now rather than when Welcome is left. |-| `UsageDataToggled` | Welcome's "Share anonymous usage data" switch (not while the environment decides). The shell writes the setting. Fields: `on: bool` |-| `ExperimentsLoaded` | Settings, Experiments, as the shell read them (at the start, and whenever a switch changes). Any page; turning Cua Volume off on its page moves on. Fields: `experiments: AppExperiments` |-| `TodoChosen` | A to-do on Done was clicked: its page opens, and leaving it comes back to Done. Cua Volume needs its experiment on first (the shell turns it on and sends `experiments-loaded`). Fields: `id: AppOnboardingTodoId` |-| `AgentsDetected` | The coding agents that already use cua (set up earlier, from the CLI or Settings), as the shell read them. Any page. Fields: `configured: Vec<String>` |--## `AppOnboardingMode` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.client-.host-```--</Tab>-<Tab value="Rust">--```rust-AppOnboardingMode::Client-AppOnboardingMode::Host-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Client` | Access other machines (nothing installed). |-| `Host` | Set this machine up for unattended access. |--## `AppOnboardingStep` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.welcome-.cli-.signin-.agents-.presentation-.drive-.mode-.done-```--</Tab>-<Tab value="Rust">--```rust-AppOnboardingStep::Welcome-AppOnboardingStep::Cli-AppOnboardingStep::Signin-AppOnboardingStep::Agents-AppOnboardingStep::Presentation-AppOnboardingStep::Drive-AppOnboardingStep::Mode-AppOnboardingStep::Done-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Welcome` | Welcome. |-| `Cli` | Install the bundled `cua`, while its plan needs it. |-| `Signin` | Sign in to Cua. |-| `Agents` | Coding agents: cua skills and the cua MCP server. |-| `Presentation` | Where Cua Spaces shows up: the notch and the menu bar, or the menu bar only (the "Spaces tab in the notch" setting). |-| `Drive` | The Cua Volume as a Finder volume (a mount on Linux), off unless ticked. Skipped where it cannot mount (Windows). |-| `Mode` | Access other machines, or set this one up for unattended access. |-| `Done` | Done. |--## `AppOnboardingTodoId` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.cli-.signin-.agents-.volume-```--</Tab>-<Tab value="Rust">--```rust-AppOnboardingTodoId::Cli-AppOnboardingTodoId::Signin-AppOnboardingTodoId::Agents-AppOnboardingTodoId::Volume-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Cli` | The Cua CLI. |-| `Signin` | The Cua account. |-| `Agents` | A coding agent that uses cua. |-| `Volume` | Cua Volume (optional). |--## `app_onboarding_action_from_json`--A first-run action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingActionFromJson(json: String) throws -> AppOnboardingAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_action_from_json(json: String) -> Result<AppOnboardingAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppOnboardingAction`](#apponboardingaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_onboarding_copy`--First run's fixed words.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingCopy() -> AppOnboardingCopy-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_copy() -> AppOnboardingCopy-```--</Tab>-</Tabs>--**Returns** [`AppOnboardingCopy`](#apponboardingcopy-record)--## `app_onboarding_initial`--First run's first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingInitial(installerMode: AppOnboardingMode?, identity: String?) -> AppOnboardingState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_initial(installer_mode: Option<AppOnboardingMode>, identity: Option<String>) -> AppOnboardingState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `installer_mode` | [`Option<AppOnboardingMode>`](#apponboardingmode-enum) | required |-| `identity` | `Option<String>` | required |--**Returns** [`AppOnboardingState`](#apponboardingstate-record)--## `app_onboarding_installed_at_text`--The Command line page's line once `cua` is current.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingInstalledAtText(target: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_installed_at_text(target: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `target` | `String` | required |--**Returns** `String`--## `app_onboarding_reduce`--Advances first run.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingReduce(state: AppOnboardingState, action: AppOnboardingAction) -> AppOnboardingState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_reduce(state: AppOnboardingState, action: AppOnboardingAction) -> AppOnboardingState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppOnboardingState`](#apponboardingstate-record) | required |-| `action` | [`AppOnboardingAction`](#apponboardingaction-enum) | required |--**Returns** [`AppOnboardingState`](#apponboardingstate-record)--## `app_onboarding_replaces_text`--The install target's tooltip when a `cua` is already there.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingReplacesText(installedVersion: String?) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_replaces_text(installed_version: Option<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `installed_version` | `Option<String>` | required |--**Returns** `String`--## `app_onboarding_sign_in_code_text`--The Sign in page's line while the browser is open.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingSignInCodeText(userCode: String?) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_sign_in_code_text(user_code: Option<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `user_code` | `Option<String>` | required |--**Returns** `String`--## `app_onboarding_signed_in_text`--The Sign in page's line once signed in.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingSignedInText(identity: String?) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_signed_in_text(identity: Option<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `identity` | `Option<String>` | required |--**Returns** `String`--## `app_onboarding_view`--First run as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOnboardingView(state: AppOnboardingState) -> AppOnboardingView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_onboarding_view(state: AppOnboardingState) -> AppOnboardingView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppOnboardingState`](#apponboardingstate-record) | required |--**Returns** [`AppOnboardingView`](#apponboardingview-record)--## `app_settings_load`--Reads the settings file (defaults when missing or damaged).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsLoad(path: String) -> AppSettings-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_load(path: String) -> AppSettings-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `path` | `String` | required |--**Returns** [`AppSettings`](#appsettings-record)--## `app_settings_save`--Writes the settings file.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsSave(path: String, settings: AppSettings) throws-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_save(path: String, settings: AppSettings) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `path` | `String` | required |-| `settings` | [`AppSettings`](#appsettings-record) | required |--**Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/power.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/power.mdxdeleted file mode 100644index 92a65b3fd0..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/power.mdx+++ /dev/null@@ -1,133 +0,0 @@-----title: "Power button"-description: "The power button on a Space: suspend and resume, or turn off and on."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_power_button` derives the button for a Space from what its provider supports and any power change in flight (`app_creates_is_powering`).--## `app_creates_is_powering`--Whether a power action runs for the Space `id`: its button waits.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCreatesIsPowering(state: AppCreatesState, id: String) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_creates_is_powering(state: AppCreatesState, id: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppCreatesState`](/cua-sdk/reference/spaces/app-core/creates#appcreatesstate-record) | required |-| `id` | `String` | required |--**Returns** `bool`--## `AppPendingPower` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The Space's id. |-| `on` | `bool` | | Turning it on (else off). |-| `started_at` / `startedAt` | `i64` | | Epoch ms it started. |-| `done` | `bool` | | The SDK returned: the row keeps saying so until the registry shows the Space on (or off). |-| `error` | `Option<String>` | | Why it failed: shown inline until the next power action. |--## `AppPowerButton` record--Returned by [`app_power_button`](#app_power_button).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `symbol` | `String` | | SF Symbol (`POWER_SYMBOL`). |-| `help` | `String` | | Tooltip and accessibility label: "Suspend", "Resume", "Turn off" or "Turn on"; while it runs, "Suspending…" and the like. |-| `turn_on` / `turnOn` | `bool` | | A press turns it on (else off): the shell's SDK call. |-| `enabled` | `bool` | | It can be pressed (not while an action runs). |-| `busy` | `bool` | | An action runs: a spinner shows in its place. |--## `AppSpacePower` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `control` | [`AppPowerControl`](#apppowercontrol-enum) | | How it turns off. |-| `off` | `bool` | | It is off: suspended or stopped as the SDK recorded it, or not answering with no recorded state (a Space one of your machines provides). |-| `turning_on` / `turningOn` | `Option<bool>` | | Being turned on (`true`) or off (`false`) now. |-| `error` | `Option<String>` | | Why the last power action failed, until the next one. |-| `stop_reason` / `stopReason` | `Option<String>` | | Why it stopped without being asked to, in plain words ("out of memory"), while it is off. |--## `AppPowerControl` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.suspend-.stop-```--</Tab>-<Tab value="Rust">--```rust-AppPowerControl::Suspend-AppPowerControl::Stop-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Suspend` | Suspended in memory; it resumes where it was. |-| `Stop` | Stopped with its disk kept; it boots again. |--## `app_power_button`--The power button next to Delete, for a Space that turns off and on.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPowerButton(space: AppSpace) -> AppPowerButton?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_power_button(space: AppSpace) -> Option<AppPowerButton>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`AppSpace`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |--**Returns** [`Option<AppPowerButton>`](#apppowerbutton-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/run-on.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/run-on.mdxdeleted file mode 100644index c090901a66..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/run-on.mdx+++ /dev/null@@ -1,102 +0,0 @@-----title: "Run on"-description: "The New Space Run on menu: This Mac, your machines that provide Spaces, and connected clouds."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`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.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWizardPlacementOptions(state: AppWizardState, env: AppWizardEnv) -> [AppPlacementOption]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_wizard_placement_options(state: AppWizardState, env: AppWizardEnv) -> Vec<AppPlacementOption>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppWizardState`](/cua-sdk/reference/spaces/app-core/new-space#appwizardstate-record) | required |-| `env` | [`AppWizardEnv`](/cua-sdk/reference/spaces/app-core/new-space#appwizardenv-record) | required |--**Returns** [`Vec<AppPlacementOption>`](#appplacementoption-record)--## `app_space_host`--One of your machines that provides Spaces (the SDK's `Spaces.hosts()`)-as the wizard reads it.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceHost(host: SpacesHost) -> AppSpaceHost-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_host(host: SpacesHost) -> AppSpaceHost-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `host` | [`SpacesHost`](/cua-sdk/reference/spaces/space#spaceshost-record) | required |--**Returns** [`AppSpaceHost`](#appspacehost-record)--## `AppPlacementOption` record--Returned by [`app_wizard_placement_options`](#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)", "Mac mini (not sharing)", "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, not sharing, at its limit: not). |-| `detail` | `String` | | One line: why not, or what it runs (the tooltip). |--## `AppSpaceHost` record--Returned by [`app_space_host`](#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 is online: it answered just now, or the relay sees it connected (the Machines page says the same). |-| `os` | `String` | | Its operating system (`macos`, `linux`, `windows`), when it answered. |-| `limits` | [`Vec<AppHostLimit>`](/cua-sdk/reference/spaces/app-core/this-machine#apphostlimit-record) | | Its limits, when it answered; a `HOST_SHARING_STOPPED` entry when it is online and refused because its owner stopped sharing it. |diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/share.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/share.mdxdeleted file mode 100644index 134c339da8..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/share.mdx+++ /dev/null@@ -1,318 +0,0 @@-----title: "Share sheet"-description: "The Share sheet: who a Space is shared with (viewer or editor) and the share request to run."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_share_view` derives the Share sheet from `AppShareInput` (the Space and its `Space.shares`): one row per person with a role menu, the email field and why sharing is unavailable. `app_share_reduce` applies an action; its `request` goes to `Space.share` or `Space.unshare`, which ask for presence first.--## `AppRoleOption` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `viewer` or `editor`. |-| `label` | `String` | | `Can view` or `Can edit`. |--## `AppShareEntryInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `who` | `String` | | Email or account id. |-| `role` | `String` | | `viewer` or `editor`. |-| `connected` | `bool` | | Connected through the relay now. |--## `AppShareInput` record--Returned by [`app_share_input_from_json`](#app_share_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `space_id` / `spaceId` | `String` | | The Space's id. |-| `space_name` / `spaceName` | `String` | | Its display name. |-| `shares` | [`Vec<AppShareEntryInput>`](#appshareentryinput-record) | | Who it is shared with. |-| `signed_in` / `signedIn` | `bool` | | Signed in to cua.ai (sharing goes through the account's relay). |-| `shareable` | `bool` | | The Space can be shared (a host, or a driver with `relay_attach`). |--## `AppShareRowView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `who` | `String` | | Email or account id. |-| `role` | `String` | | `viewer` or `editor`. |-| `connected` | `bool` | | Connected through the relay now (the shells show a status dot). |--## `AppShareSheetState` record--Returned by [`app_share_initial`](#app_share_initial), [`app_share_reduce`](#app_share_reduce), [`app_share_state_from_json`](#app_share_state_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `who` | `String` | | The add field, as typed. |-| `role` | `String` | | The role the add field shares with. |-| `busy` | `bool` | | A command runs. |-| `error` | `Option<String>` | | The last failure. |-| `request` | [`Option<AppShareRequest>`](#appsharerequest-enum) | | The command waiting for the shell. |--## `AppShareSheetView` record--Returned by [`app_share_view`](#app_share_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | `Share “studio”`. |-| `rows` | [`Vec<AppShareRowView>`](#appsharerowview-record) | | One person per line. |-| `empty_text` / `emptyText` | `String` | | Shown with no rows. |-| `who_placeholder` / `whoPlaceholder` | `String` | | The add field's placeholder. |-| `who` | `String` | | The add field, as typed. |-| `role` | `String` | | The add field's role. |-| `roles` | [`Vec<AppRoleOption>`](#approleoption-record) | | The role menu (for the add field and every row). |-| `can_share` / `canShare` | `bool` | | Share is enabled. |-| `share_label` / `shareLabel` | `String` | | Share. |-| `remove_label` / `removeLabel` | `String` | | Remove (per row). |-| `done_label` / `doneLabel` | `String` | | Done. |-| `disabled_reason` / `disabledReason` | `Option<String>` | | Why the sheet cannot share at all (not signed in, an old driver). |-| `hint` | `Option<String>` | | What the add field lacks (shown under it, only once typed). |-| `busy` | `bool` | | A command runs. |-| `error` | `Option<String>` | | The last failure. |-| `request` | [`Option<AppShareRequest>`](#appsharerequest-enum) | | The command waiting for the shell. |--## `AppShareRequest` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.share(space: String, who: String, role: String)-.unshare(space: String, who: String)-```--</Tab>-<Tab value="Rust">--```rust-AppShareRequest::Share { space: String, who: String, role: String }-AppShareRequest::Unshare { space: String, who: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Share` | `share_space` (also changes a role). Fields: `space: String`, `who: String`, `role: String` |-| `Unshare` | `unshare_space`. Fields: `space: String`, `who: String` |--## `AppShareSheetAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.setWho(who: String)-.setRole(role: String)-.submit-.changeRole(who: String, role: String)-.remove(who: String)-.done-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppShareSheetAction::SetWho { who: String }-AppShareSheetAction::SetRole { role: String }-AppShareSheetAction::Submit-AppShareSheetAction::ChangeRole { who: String, role: String }-AppShareSheetAction::Remove { who: String }-AppShareSheetAction::Done-AppShareSheetAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SetWho` | The add field changed. Fields: `who: String` |-| `SetRole` | The add field's role menu changed. Fields: `role: String` |-| `Submit` | Share was pressed. |-| `ChangeRole` | A person's role menu changed. Fields: `who: String`, `role: String` |-| `Remove` | A person's Remove was pressed. Fields: `who: String` |-| `Done` | The command finished. |-| `Failed` | The command failed (or presence was declined). Fields: `error: String` |--## `app_share_action_from_json`--A Share sheet action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appShareActionFromJson(json: String) throws -> AppShareSheetAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_share_action_from_json(json: String) -> Result<AppShareSheetAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppShareSheetAction`](#appsharesheetaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_share_initial`--A new Share sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appShareInitial() -> AppShareSheetState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_share_initial() -> AppShareSheetState-```--</Tab>-</Tabs>--**Returns** [`AppShareSheetState`](#appsharesheetstate-record)--## `app_share_input_from_json`--Share sheet input from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appShareInputFromJson(json: String) throws -> AppShareInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_share_input_from_json(json: String) -> Result<AppShareInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppShareInput`](#appshareinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_share_reduce`--Advances the Share sheet.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appShareReduce(input: AppShareInput, state: AppShareSheetState, action: AppShareSheetAction) -> AppShareSheetState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_share_reduce(input: AppShareInput, state: AppShareSheetState, action: AppShareSheetAction) -> AppShareSheetState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppShareInput`](#appshareinput-record) | required |-| `state` | [`AppShareSheetState`](#appsharesheetstate-record) | required |-| `action` | [`AppShareSheetAction`](#appsharesheetaction-enum) | required |--**Returns** [`AppShareSheetState`](#appsharesheetstate-record)--## `app_share_state_from_json`--The Share sheet's state from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appShareStateFromJson(json: String) throws -> AppShareSheetState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_share_state_from_json(json: String) -> Result<AppShareSheetState, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppShareSheetState`](#appsharesheetstate-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_share_view`--The Share sheet as drawn.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appShareView(input: AppShareInput, state: AppShareSheetState) -> AppShareSheetView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_share_view(input: AppShareInput, state: AppShareSheetState) -> AppShareSheetView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppShareInput`](#appshareinput-record) | required |-| `state` | [`AppShareSheetState`](#appsharesheetstate-record) | required |--**Returns** [`AppShareSheetView`](#appsharesheetview-record)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.mdxdeleted file mode 100644index 9eb3af1647..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/spaces.mdx+++ /dev/null@@ -1,1080 +0,0 @@-----title: "Space list"-description: "The Space list (roster), the sidebar, a Space's detail and its remote windows."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The roster is the list of Spaces the app shows, from `Spaces.list` rows. `app_roster_reduce` applies an action; `app_sidebar` and `app_space_detail` derive the main window.--## `AppFactWarning` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `symbol` | `String` | | SF Symbol (`WARNING_SYMBOL`). |-| `help` | `String` | | Tooltip and accessibility label. |--## `app_rows_to_spaces`--Registry rows (`Spaces.list`) as Spaces.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appRowsToSpaces(rows: [AppSpaceRow], nowMs: Int64) -> [AppSpace]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_rows_to_spaces(rows: Vec<AppSpaceRow>, now_ms: i64) -> Vec<AppSpace>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `rows` | [`Vec<AppSpaceRow>`](#appspacerow-record) | required |-| `now_ms` | `i64` | required |--**Returns** [`Vec<AppSpace>`](#appspace-record)--## `app_status_line`--The menu bar status line ("3 Spaces").--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStatusLine(count: UInt32) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_status_line(count: u32) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `count` | `u32` | required |--**Returns** `String`--## `app_this_machine_space`--The "This machine" roster entry.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appThisMachineSpace(status: AppHostSummaryInput?, nowMs: Int64) -> AppSpace-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_this_machine_space(status: Option<AppHostSummaryInput>, now_ms: i64) -> AppSpace-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `status` | [`Option<AppHostSummaryInput>`](#apphostsummaryinput-record) | required |-| `now_ms` | `i64` | required |--**Returns** [`AppSpace`](#appspace-record)--## `AppHostSummaryInput` record--Returned by [`app_host_summary_input`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_summary_input).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `configured` | `bool` | | Set up for access. |-| `error` | `Option<String>` | | Needs attention. |-| `service_running` / `serviceRunning` | `bool` | | The host service runs. |-| `sharing` | `bool` | | Sharing is on. |-| `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`--A coding agent's display name.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAgentName(agent: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_agent_name(agent: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `agent` | `String` | required |--**Returns** `String`--## `AppAgentStatus` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.running-.idle-.failed-.crashed-.unknown-```--</Tab>-<Tab value="Rust">--```rust-AppAgentStatus::Running-AppAgentStatus::Idle-AppAgentStatus::Failed-AppAgentStatus::Crashed-AppAgentStatus::Unknown-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Running` | A turn is running. |-| `Idle` | Waiting for a follow-up. |-| `Failed` | Failed. |-| `Crashed` | Crashed. |-| `Unknown` | Could not be read. |--## `app_ambient_dots`--The ambient status dots.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appAmbientDots(spaces: [AppSpace]) -> AppAmbientDots-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_ambient_dots(spaces: Vec<AppSpace>) -> AppAmbientDots-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](#appspace-record) | required |--**Returns** [`AppAmbientDots`](#appambientdots-record)--## `AppAmbientDots` record--Returned by [`app_ambient_dots`](#app_ambient_dots).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `running` | `bool` | | Any Space running or starting. |-| `approval` | `bool` | | Any Space waiting for approval. |-| `suspended` | `bool` | | Any Space suspended. |-| `agent_active` / `agentActive` | `bool` | | Any agent actively working. |--## `app_group_windows_by_app`--A Space's remote windows grouped by app.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appGroupWindowsByApp(windows: [AppRemoteWindow]) -> [AppRemoteWindowGroup]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_group_windows_by_app(windows: Vec<AppRemoteWindow>) -> Vec<AppRemoteWindowGroup>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `windows` | [`Vec<AppRemoteWindow>`](#appremotewindow-record) | required |--**Returns** [`Vec<AppRemoteWindowGroup>`](#appremotewindowgroup-record)--## `AppOpenApp` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app_id` / `appId` | `String` | | App id. |-| `app_name` / `appName` | `String` | | App name. |-| `supported` | `bool` | | Supported. |--## `AppOpenWindow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `window_id` / `windowId` | `u32` | | CoreGraphics window number. |-| `app_id` / `appId` | `String` | | App id. |-| `app_name` / `appName` | `String` | | App name. |-| `window_title` / `windowTitle` | `String` | | Window title. |-| `supported` | `bool` | | Teleport can bring the app up in a Space. |-| `bundle_path` / `bundlePath` | `Option<String>` | | The owning app's bundle (or `.desktop` entry), when known. |--## `AppThumbnailScene` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.macDesktop-.windowsDesktop-.linuxTerminal-.notes-.browser-.blank-```--</Tab>-<Tab value="Rust">--```rust-AppThumbnailScene::MacDesktop-AppThumbnailScene::WindowsDesktop-AppThumbnailScene::LinuxTerminal-AppThumbnailScene::Notes-AppThumbnailScene::Browser-AppThumbnailScene::Blank-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `MacDesktop` | A macOS desktop. |-| `WindowsDesktop` | A Windows desktop. |-| `LinuxTerminal` | A Linux terminal. |-| `Notes` | A notes app. |-| `Browser` | A browser. |-| `Blank` | Nothing. |--## `AppWindowMode` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.ambient-.ambientTeleport-.switcher-.createFleet-```--</Tab>-<Tab value="Rust">--```rust-AppWindowMode::Ambient-AppWindowMode::AmbientTeleport-AppWindowMode::Switcher-AppWindowMode::CreateFleet-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Ambient` | |-| `AmbientTeleport` | Ambient, but grown taller so the drag teleport's "Teleport to Cua" box has room to hang below the notch. Same top-centre placement as `Ambient`. |-| `Switcher` | |-| `CreateFleet` | |--## `AppNotice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `u32` | | Sequence id (clear by id). |-| `kind` | [`AppNoticeKind`](#appnoticekind-enum) | | Kind. |-| `text` | `String` | | Text. |--## `AppNoticeKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.switch-.create-```--</Tab>-<Tab value="Rust">--```rust-AppNoticeKind::Switch-AppNoticeKind::Create-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Switch` | Switched Spaces. |-| `Create` | Created (or creating) Spaces. |--## `AppNewSpaceOn` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | The button's label. |-| `on` | `String` | | The "Run on" entry it picks (`host:<machine id>`; the wizard's `ChoosePlacement`). |--## `app_hosted_rows`--The Spaces one of your machines provides (`machine_space_id` is its-`relay:<id>`), as sidebar rows.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostedRows(spaces: [AppSpace], machineSpaceId: String, selectedId: String) -> [AppSidebarRow]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_hosted_rows(spaces: Vec<AppSpace>, machine_space_id: String, selected_id: String) -> Vec<AppSidebarRow>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](#appspace-record) | required |-| `machine_space_id` | `String` | required |-| `selected_id` | `String` | required |--**Returns** [`Vec<AppSidebarRow>`](#appsidebarrow-record)--## `app_without_this_relay_machine`--The roster without this machine's own relay entry (`this_machine_id`-is `HostStatus.machine_id`): it is "This machine", not one of "My-machines". Matched by id, never by name.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWithoutThisRelayMachine(spaces: [AppSpace], thisMachineId: String?) -> [AppSpace]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_without_this_relay_machine(spaces: Vec<AppSpace>, this_machine_id: Option<String>) -> Vec<AppSpace>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](#appspace-record) | required |-| `this_machine_id` | `Option<String>` | required |--**Returns** [`Vec<AppSpace>`](#appspace-record)--## `AppRemoteWindow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Stable key. |-| `app_name` / `appName` | `String` | | App name. |-| `title` | `String` | | Title. |-| `visible` | `bool` | | Visible. |-| `app_id` / `appId` | `String` | | App id. |-| `target_epoch` / `targetEpoch` | `u64` | | Window handle epoch. |-| `width_px` / `widthPx` | `Option<u32>` | | Width, px. |-| `height_px` / `heightPx` | `Option<u32>` | | Height, px. |-| `pid` | `Option<u32>` | | The owning process (what the SDK's `Space.app_icon` looks a macOS app up by), when the window list reports one. |--## `AppRemoteWindowGroup` record--Returned by [`app_group_windows_by_app`](#app_group_windows_by_app).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app_id` / `appId` | `String` | | App id. |-| `app_name` / `appName` | `String` | | App name. |-| `windows` | [`Vec<AppRemoteWindow>`](#appremotewindow-record) | | Windows, arrival order. |--## `AppRosterState` record--Returned by [`app_roster_initial`](#app_roster_initial), [`app_roster_reduce`](#app_roster_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `mode` | [`AppWindowMode`](#appwindowmode-enum) | | The notch switcher's mode. |-| `spaces` | [`Vec<AppSpace>`](#appspace-record) | | Spaces, MRU order. |-| `selected_id` / `selectedId` | `String` | | The selected Space id (empty when none). |-| `focus_index` / `focusIndex` | `i32` | | Keyboard focus: an index into `spaces`, or `NEW_TILE_INDEX`. |-| `notice` | [`Option<AppNotice>`](#appnotice-record) | | The notice, if one shows. |-| `notice_seq` / `noticeSeq` | `u32` | | Last notice id. |--## `AppSidebarRow` record--Returned by [`app_hosted_rows`](#app_hosted_rows).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Space id. |-| `name` | `String` | | Name. |-| `os_icon` / `osIcon` | `String` | | The Space's OS icon id (`crate.notch.os_icon`, the same mark the notch tiles use), before the name. |-| `status` | [`AppSpaceStatus`](#appspacestatus-enum) | | Status (the dot). |-| `status_text` / `statusText` | `String` | | Status word (the dot's accessibility label). |-| `detail` | `String` | | Tooltip. |-| `dim` | `bool` | | Drawn at reduced opacity. |-| `selected` | `bool` | | Selected. |-| `progress` | `Option<u32>` | | While it is being created: overall progress in thousandths (a ring). |-| `trailing` | `Option<String>` | | Short text after the name: the percentage while it is being created, the error when the create failed. |-| `nested` | `bool` | | A Space one of your machines provides, drawn nested under that machine's row (the row before it). |-| `power` | [`Option<AppPowerButton>`](/cua-sdk/reference/spaces/app-core/power#apppowerbutton-record) | | The power button (next to Delete), for a Space whose provider can turn it off and on. |-| `place` | `Option<String>` | | Where a Space in your cloud runs ("AWS · us-west-2"), secondary text after the name. |--## `AppSidebarSection` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Cua Cloud", "This Mac", "Connected", "My machines". |-| `rows` | [`Vec<AppSidebarRow>`](#appsidebarrow-record) | | Rows. |--## `AppSidebarView` record--Returned by [`app_sidebar`](#app_sidebar).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `this_machine` / `thisMachine` | [`Option<AppSidebarRow>`](#appsidebarrow-record) | | The "This machine" row, when it matches the search. |-| `sections` | [`Vec<AppSidebarSection>`](#appsidebarsection-record) | | Location sections, in `SECTION_ORDER`. |-| `selected_id` / `selectedId` | `Option<String>` | | The effective selection (falls back to the first Space). |-| `empty_text` / `emptyText` | `Option<String>` | | "No matches" / "No Spaces yet" when nothing is listed. |--## `AppSpace` record--Returned by [`app_creates_compose`](/cua-sdk/reference/spaces/app-core/creates#app_creates_compose), [`app_rows_to_spaces`](#app_rows_to_spaces), [`app_spaces_from_json`](#app_spaces_from_json), [`app_this_machine_space`](#app_this_machine_space), [`app_with_this_machine`](/cua-sdk/reference/spaces/app-core/this-machine#app_with_this_machine), [`app_without_this_relay_machine`](#app_without_this_relay_machine).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Sandbox ref (`cloud:<name>`, `local:<name>`, `direct:<host:port>`, ...). |-| `name` | `String` | | Display name. |-| `os` | [`AppSpaceOs`](#appspaceos-enum) | | Operating system. |-| `status` | [`AppSpaceStatus`](#appspacestatus-enum) | | Status. |-| `detail` | `String` | | One short status detail. |-| `last_used_at` / `lastUsedAt` | `i64` | | Epoch ms of the last focus. |-| `started_at` / `startedAt` | `Option<i64>` | | Epoch ms it was created. |-| `scene` | [`AppThumbnailScene`](#appthumbnailscene-enum) | | Placeholder scene. |-| `fleet_id` / `fleetId` | `Option<String>` | | Group (cloud namespace or location word). |-| `size` | `Option<String>` | | Fixture machine size. |-| `region` | `Option<String>` | | Fixture region. |-| `provider` | [`Option<AppSpaceProvider>`](#appspaceprovider-enum) | | Where it runs (cloud when omitted). |-| `sdk` | [`Option<AppSpaceSdkRef>`](#appspacesdkref-record) | | SDK facts, for Spaces from the live registry. |-| `os_name` / `osName` | `Option<String>` | | The guest OS product or distribution ("Ubuntu", "macOS"), when the Space reported one: it picks the OS icon (`crate.notch.os_icon`). |-| `os_pretty_name` / `osPrettyName` | `Option<String>` | | The guest's full OS string ("Ubuntu 24.04.3 LTS"), when the Space reported one. |-| `image` | `Option<String>` | | The image it runs ("ghcr.io/trycua/linux:24.04"), when known. |-| `image_digest` / `imageDigest` | `Option<String>` | | The digest of the variant that runs, when known. |-| `progress` | [`Option<AppSpaceProgress>`](#appspaceprogress-record) | | While it is being created: how far along, from the SDK's create progress (`crate.spaces.creating`). |-| `kind` | [`Option<AppSpaceKind>`](#appspacekind-enum) | | Container or virtual machine, when known. |-| `arch` | `Option<String>` | | The guest's CPU architecture (`arm64`, `amd64`), when known. |-| `host` | `Option<String>` | | For a Space one of your machines provides: that machine's relay id (the sidebar nests it under the machine). |-| `host_name` / `hostName` | `Option<String>` | | That machine's name, when known. |-| `power` | [`Option<AppSpacePower>`](/cua-sdk/reference/spaces/app-core/power#appspacepower-record) | | Whether and how it turns off and on (the SDK's `power`), with a power action in flight (`crate.spaces.creating.compose`). `None`: it cannot (a cloud Space, one added by address). |-| `cloud` | `Option<String>` | | For a Space in your cloud: the provider word (`aws`, `gcp`, `modal`). |-| `cloud_place` / `cloudPlace` | `Option<String>` | | Its account and region in words ("AWS · us-west-2"). |-| `cloud_delete` / `cloudDelete` | `Option<String>` | | Where Delete permanently can delete it: `here`, `host:<machine>` (that machine created it) or `elsewhere` (another device did). |--## `AppSpaceAgentRun` record--Returned by [`app_agent_rows`](/cua-sdk/reference/spaces/agents-app-core#app_agent_rows).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `run_id` / `runId` | `String` | | Run id. |-| `agent` | `String` | | Harness id. |-| `status` | [`AppAgentStatus`](#appagentstatus-enum) | | Status. |-| `reason` | `String` | | Why. |-| `summary` | `String` | | Prompt summary. |-| `created_at` / `createdAt` | `Option<i64>` | | Unix seconds. |-| `phase` | `String` | | Finer phase. |-| `turn` | `u32` | | Turns. |--## `AppSpaceDetail` record--Returned by [`app_space_detail`](#app_space_detail), [`app_space_detail_for`](#app_space_detail_for), [`app_space_detail_live`](/cua-sdk/reference/spaces/app-core/stream#app_space_detail_live), [`app_space_detail_with`](#app_space_detail_with).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Space id. |-| `title` | `String` | | Title. |-| `facts` | [`Vec<AppFact>`](/cua-sdk/reference/spaces/app-core/window#appfact-record) | | Status, Image, System, Memory, Storage, Identifier (each when known). |-| `is_host` / `isHost` | `bool` | | The host machine itself. |-| `show_sections` / `showSections` | `bool` | | The Stream / Agents / Teleport sections show. |-| `can_stream` / `canStream` | `bool` | | Streaming is possible (toolbar PiP and Stream). |-| `preview_text` / `previewText` | `String` | | Placeholder over the preview until a frame arrives. |-| `progress` | `Option<u32>` | | While it is being created: overall progress in thousandths (the preview's ring). |-| `progress_text` / `progressText` | `Option<String>` | | Under the bar while it downloads: "4.2 of 22.1 GB · 85 MB/s · about 4 min". |-| `delete_label` / `deleteLabel` | `String` | | "Remove" (added by address) or "Delete Space". |-| `remove_only` / `removeOnly` | `bool` | | Removing only forgets it. |-| `actions` | [`Vec<AppDetailAction>`](/cua-sdk/reference/spaces/app-core/window#appdetailaction-record) | | Toolbar buttons, in order (none for this machine). |-| `confirm` | [`AppDeleteConfirm`](/cua-sdk/reference/spaces/app-core/window#appdeleteconfirm-record) | | What Delete asks first. |-| `sections` | `Vec<String>` | | The sections under the facts, in order (Stream, Agents, Teleport). |-| `credit_notice` / `creditNotice` | [`Option<AppCreditNotice>`](/cua-sdk/reference/spaces/account-app-core#appcreditnotice-record) | | A cloud Space refused for want of credit: one line and "Add credit" (the website billing page). |-| `power_error` / `powerError` | `Option<String>` | | Why turning it off or on failed, shown inline under the preview. |-| `access` | [`Option<AppMachineAccessNotice>`](/cua-sdk/reference/spaces/app-core/devices#appmachineaccessnotice-record) | | Signed in, but this device is not enrolled: a machine reached through the relay is listed with its Connect greyed out under this line and its one action (`detail_for`). |-| `desktop_note` / `desktopNote` | `Option<String>` | | One of your machines that does not share its desktop: the line shown in place of its desktop, Stream, Agents and Teleport (`desktop_note`). |-| `new_space` / `newSpace` | [`Option<AppNewSpaceOn>`](#appnewspaceon-record) | | With `Self.desktop_note`, when the machine provides Spaces: "New Space on <name>…", which opens New Space on it. |--## `AppSpaceProgress` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | `String` | | The SDK's phase word (`preparing`, `pulling`, `booting`, ...). |-| `permille` | `u32` | | Overall progress in thousandths. |-| `label` | `String` | | The phase in words ("Starting…", "Downloading image…"), or "Failed". |-| `error` | `Option<String>` | | Why the create failed. |-| `credit_url` / `creditUrl` | `Option<String>` | | It failed because the account is out of Cua Cloud credit: the website billing page "Add credit" opens. |-| `transfer` | `Option<String>` | | While it downloads: "4.2 of 22.1 GB · 85 MB/s · about 4 min" (`crate.spaces.creating.transfer_text`). |-| `cancellable` | `bool` | | Cancel can stop it now. |-| `cancelling` | `bool` | | Cancel was pressed and the create is being cleaned up. |--## `AppSpaceRow` record--Returned by [`app_space_rows_from_json`](#app_space_rows_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Sandbox ref. |-| `name` | `String` | | Name spacesd reported. |-| `provider` | `String` | | Location word. |-| `spacesd_version` / `spacesdVersion` | `String` | | spacesd version. |-| `features` | `Vec<String>` | | spacesd features. |-| `added_at` / `addedAt` | `Option<String>` | | RFC 3339 time it was added. |-| `os` | [`Option<AppSpaceOs>`](#appspaceos-enum) | | Operating system. |-| `os_name` / `osName` | `Option<String>` | | OS product or distribution spacesd reported ("Ubuntu"). |-| `os_pretty_name` / `osPrettyName` | `Option<String>` | | The guest's full OS string ("Ubuntu 24.04.3 LTS"), when the Space reported one. |-| `image` | `Option<String>` | | The image it runs ("ghcr.io/trycua/linux:24.04"), when known. |-| `image_digest` / `imageDigest` | `Option<String>` | | The digest of the variant that runs, when known. |-| `kind` | [`Option<AppSpaceKind>`](#appspacekind-enum) | | Container or virtual machine, when known. |-| `arch` | `Option<String>` | | The guest's CPU architecture, when known (any spelling: `arm64`, `aarch64`, `amd64`, `x86_64`). |-| `reachable` | `bool` | | Answered the last connect. |-| `error` | `Option<String>` | | Why not. |-| `host` | `Option<String>` | | For a Space one of your machines provides: that machine's relay id. |-| `host_name` / `hostName` | `Option<String>` | | That machine's name, when known. |-| `power` | `Option<String>` | | How it turns off and on (`suspend`, `stop`); absent when it cannot. |-| `power_state` / `powerState` | `Option<String>` | | `running`, `suspended` or `stopped` as the SDK recorded it; absent when unknown. |-| `cloud` | `Option<String>` | | For a Space in your cloud: the provider word (`aws`, `gcp`, `modal`). |-| `cloud_place` / `cloudPlace` | `Option<String>` | | Its account and region in words ("AWS · us-west-2"). |-| `cloud_delete` / `cloudDelete` | `Option<String>` | | Where Delete permanently can delete it: `here`, `host:<machine>` (that machine created it) or `elsewhere` (another device did). |-| `stop_reason` / `stopReason` | `Option<String>` | | Why a local Space stopped without being asked to, in plain words ("out of memory", "killed", "exited with code 1"), as the SDK recorded it; absent otherwise. |--## `AppSpaceSdkRef` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `features` | `Vec<String>` | | spacesd feature names. |-| `spacesd_version` / `spacesdVersion` | `String` | | spacesd version at the last handshake. |-| `reachable` | `bool` | | Answered the last bounded connect. |-| `error` | `Option<String>` | | Why not. |--## `AppRosterAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.expand-.collapse-.openCreate-.cancelCreate-.focus(index: Int32)-.focusMove(delta: Int32)-.select(id: String, now: Int64)-.clearNotice(id: UInt32)-.notify(text: String, kind: AppNoticeKind?)-.syncSpaces(spaces: [AppSpace])-```--</Tab>-<Tab value="Rust">--```rust-AppRosterAction::Expand-AppRosterAction::Collapse-AppRosterAction::OpenCreate-AppRosterAction::CancelCreate-AppRosterAction::Focus { index: i32 }-AppRosterAction::FocusMove { delta: i32 }-AppRosterAction::Select { id: String, now: i64 }-AppRosterAction::ClearNotice { id: u32 }-AppRosterAction::Notify { text: String, kind: Option<AppNoticeKind> }-AppRosterAction::SyncSpaces { spaces: Vec<AppSpace> }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Expand` | Open the switcher. |-| `Collapse` | Back to ambient. |-| `OpenCreate` | Open the create panel. |-| `CancelCreate` | Close it. |-| `Focus` | Focus a tile. Fields: `index: i32` |-| `FocusMove` | Move focus by one, wrapping through the New tile. Fields: `delta: i32` |-| `Select` | Select a Space (touches its MRU time). Fields: `id: String`, `now: i64` |-| `ClearNotice` | Clear the notice with this id. Fields: `id: u32` |-| `Notify` | Show a notice. Fields: `text: String`, `kind: Option<AppNoticeKind>` |-| `SyncSpaces` | Replace the list with a registry refresh. Fields: `spaces: Vec<AppSpace>` |--## `AppSpaceKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.container-.vm-```--</Tab>-<Tab value="Rust">--```rust-AppSpaceKind::Container-AppSpaceKind::Vm-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Container` | A container. |-| `Vm` | A virtual machine. |--## `AppSpaceOs` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.macos-.windows-.linux-.unknown-```--</Tab>-<Tab value="Rust">--```rust-AppSpaceOs::Macos-AppSpaceOs::Windows-AppSpaceOs::Linux-AppSpaceOs::Unknown-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Macos` | macOS. |-| `Windows` | Windows. |-| `Linux` | Linux. |-| `Unknown` | The host has not reported a recognized operating system. |--## `AppSpaceProvider` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.cloud-.local-.direct-.relay-```--</Tab>-<Tab value="Rust">--```rust-AppSpaceProvider::Cloud-AppSpaceProvider::Local-AppSpaceProvider::Direct-AppSpaceProvider::Relay-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Cloud` | Cua Cloud. |-| `Local` | This Mac. |-| `Direct` | A machine added by address. |-| `Relay` | A machine of the signed-in account through the relay. |--## `AppSpaceStatus` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.local-.running-.approval-.suspended-.provisioning-.deleting-```--</Tab>-<Tab value="Rust">--```rust-AppSpaceStatus::Local-AppSpaceStatus::Running-AppSpaceStatus::Approval-AppSpaceStatus::Suspended-AppSpaceStatus::Provisioning-AppSpaceStatus::Deleting-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Local` | The host machine itself. |-| `Running` | Reachable, session active. |-| `Approval` | An agent waits for approval. |-| `Suspended` | Unreachable or suspended. |-| `Provisioning` | Being created. |-| `Deleting` | Being deleted (the user confirmed; the SDK is removing it). |--## `app_roster_initial`--The Space list's first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appRosterInitial(spaces: [AppSpace]) -> AppRosterState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_roster_initial(spaces: Vec<AppSpace>) -> AppRosterState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](#appspace-record) | required |--**Returns** [`AppRosterState`](#approsterstate-record)--## `app_roster_reduce`--Advances the Space list.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appRosterReduce(state: AppRosterState, action: AppRosterAction) -> AppRosterState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_roster_reduce(state: AppRosterState, action: AppRosterAction) -> AppRosterState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppRosterState`](#approsterstate-record) | required |-| `action` | [`AppRosterAction`](#approsteraction-enum) | required |--**Returns** [`AppRosterState`](#approsterstate-record)--## `app_sidebar`--The main window's sidebar.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSidebar(spaces: [AppSpace], query: String, selectedId: String) -> AppSidebarView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_sidebar(spaces: Vec<AppSpace>, query: String, selected_id: String) -> AppSidebarView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](#appspace-record) | required |-| `query` | `String` | required |-| `selected_id` | `String` | required |--**Returns** [`AppSidebarView`](#appsidebarview-record)--## `app_space_accepts_drop`--Whether a Space takes a teleport drop (the notch tiles' and the Space-rows' rule).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceAcceptsDrop(space: AppSpace) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_accepts_drop(space: AppSpace) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`AppSpace`](#appspace-record) | required |--**Returns** `bool`--## `app_space_detail`--A Space's detail.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceDetail(space: AppSpace) -> AppSpaceDetail-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_detail(space: AppSpace) -> AppSpaceDetail-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`AppSpace`](#appspace-record) | required |--**Returns** [`AppSpaceDetail`](#appspacedetail-record)--## `app_space_detail_for`--`app_space_detail_with` as this device sees it: `access` (from-`app_machine_access_notice`) greys out Connect on every Space reached-through the relay while this device is not enrolled; one of your-machines that does not share its desktop shows its note in place of the-desktop, Stream, Agents and Teleport.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceDetailFor(space: AppSpace, usage: AppSpaceUsage?, hostArch: String?, experiments: AppExperiments, access: AppMachineAccessNotice?) -> AppSpaceDetail-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_detail_for(space: AppSpace, usage: Option<AppSpaceUsage>, host_arch: Option<String>, experiments: AppExperiments, access: Option<AppMachineAccessNotice>) -> AppSpaceDetail-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`AppSpace`](#appspace-record) | required |-| `usage` | [`Option<AppSpaceUsage>`](/cua-sdk/reference/spaces/app-core/stream#appspaceusage-record) | required |-| `host_arch` | `Option<String>` | required |-| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | required |-| `access` | [`Option<AppMachineAccessNotice>`](/cua-sdk/reference/spaces/app-core/devices#appmachineaccessnotice-record) | required |--**Returns** [`AppSpaceDetail`](#appspacedetail-record)--## `app_space_detail_with`--`app_space_detail_live` without what Settings, Experiments hides (the-Share button while Sharing is off).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceDetailWith(space: AppSpace, usage: AppSpaceUsage?, hostArch: String?, experiments: AppExperiments) -> AppSpaceDetail-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_detail_with(space: AppSpace, usage: Option<AppSpaceUsage>, host_arch: Option<String>, experiments: AppExperiments) -> AppSpaceDetail-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`AppSpace`](#appspace-record) | required |-| `usage` | [`Option<AppSpaceUsage>`](/cua-sdk/reference/spaces/app-core/stream#appspaceusage-record) | required |-| `host_arch` | `Option<String>` | required |-| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | required |--**Returns** [`AppSpaceDetail`](#appspacedetail-record)--## `app_space_rows_from_json`--Registry rows from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceRowsFromJson(json: String) throws -> [AppSpaceRow]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_rows_from_json(json: String) -> Result<Vec<AppSpaceRow>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppSpaceRow>`](#appspacerow-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_spaces_from_json`--Spaces from the webview's JSON shape (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpacesFromJson(json: String) throws -> [AppSpace]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_spaces_from_json(json: String) -> Result<Vec<AppSpace>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppSpace>`](#appspace-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/stream.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/stream.mdxdeleted file mode 100644index 95489e8014..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/stream.mdx+++ /dev/null@@ -1,534 +0,0 @@-----title: "Stream section and facts"-description: "A Space detail's Stream rows (desktop and windows with their icons and picture in picture) and its facts with live memory and storage use."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_stream_section` builds the Stream rows both apps draw: the Desktop with the OS mark and the display's resolution, then one row per window titled by the window, with the app's icon source and a picture-in-picture button. `app_space_detail_live` adds Memory and Storage to the facts from `Space.usage`. `app_desktop_cover` says what the preview card shows before the first frame (Connecting, a Connect button, or the Space's own line) and `app_thumbnail_policy` how fresh the shells keep its blurred preview.--## `app_space_detail_live`--The selected Space's detail with its memory and storage use (the SDK's-`Space.usage`, refreshed every `app_usage_refresh_ms`). `host_arch` is-this Mac's CPU architecture (`arm64`, `x86_64`): a local Space of-another one shows a warning on its Architecture.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceDetailLive(space: AppSpace, usage: AppSpaceUsage?, hostArch: String?) -> AppSpaceDetail-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_detail_live(space: AppSpace, usage: Option<AppSpaceUsage>, host_arch: Option<String>) -> AppSpaceDetail-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`AppSpace`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |-| `usage` | [`Option<AppSpaceUsage>`](#appspaceusage-record) | required |-| `host_arch` | `Option<String>` | required |--**Returns** [`AppSpaceDetail`](/cua-sdk/reference/spaces/app-core/spaces#appspacedetail-record)--## `AppSpaceUsage` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `memory_used` / `memoryUsed` | `u64` | | Memory in use, bytes. |-| `memory_total` / `memoryTotal` | `u64` | | Memory size, bytes. |-| `memory_limited` / `memoryLimited` | `bool` | | `memory_total` is the guest's limit. |-| `disk_used` / `diskUsed` | `u64` | | Storage in use, bytes. |-| `disk_total` / `diskTotal` | `u64` | | Storage size, bytes. |-| `disk_limited` / `diskLimited` | `bool` | | `disk_total` is the guest's own disk. |--## `app_usage_refresh_ms`--How often a shell refreshes a visible detail's memory and storage use.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appUsageRefreshMs() -> UInt64-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_usage_refresh_ms() -> u64-```--</Tab>-</Tabs>--**Returns** `u64`--## `AppPipCommand` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.open(row: String)-.close(row: String)-```--</Tab>-<Tab value="Rust">--```rust-AppPipCommand::Open { row: String }-AppPipCommand::Close { row: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Open` | Open the row's panel. Fields: `row: String` |-| `Close` | Close the row's open panel. Fields: `row: String` |--## `AppPipEvent` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.opened(row: String)-.closed(row: String)-.synced(rows: [String])-```--</Tab>-<Tab value="Rust">--```rust-AppPipEvent::Opened { row: String }-AppPipEvent::Closed { row: String }-AppPipEvent::Synced { rows: Vec<String> }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Opened` | A row's panel opened. Fields: `row: String` |-| `Closed` | A row's panel closed. Fields: `row: String` |-| `Synced` | The panels open now, as the shell listed them. Fields: `rows: Vec<String>` |--## `app_desktop_cover`--What a Space's preview card shows before (or instead of) its live-desktop: "Connecting…", a Connect button, or the Space's own line.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDesktopCover(input: AppDesktopCoverInput) -> AppDesktopCover-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_desktop_cover(input: AppDesktopCoverInput) -> AppDesktopCover-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppDesktopCoverInput`](#appdesktopcoverinput-record) | required |--**Returns** [`AppDesktopCover`](#appdesktopcover-record)--## `AppDesktopCover` record--Returned by [`app_desktop_cover`](#app_desktop_cover).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`AppDesktopCoverKind`](#appdesktopcoverkind-enum) | | How it draws. |-| `text` | `Option<String>` | | The line, centered. |-| `button` | `Option<String>` | | A button under (or instead of) the line. |-| `button_help` / `buttonHelp` | `Option<String>` | | Its tooltip. |-| `open_stream` / `openStream` | `bool` | | The shell opens a stream session now (none is open, and one is wanted). |-| `retry` | `bool` | | The shell starts the open session again (Try again was pressed). |-| `button_disabled` / `buttonDisabled` | `bool` | | The button shows greyed out (Connect while this device is not enrolled). |-| `action` | `Option<String>` | | The one action above a greyed-out Connect ("Enroll This Mac…"): the shell opens the enroll sheet. |--## `AppDesktopCoverInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `can_stream` / `canStream` | `bool` | | The detail's `can_stream`. |-| `preview_text` / `previewText` | `String` | | The detail's `preview_text` (why it cannot stream). |-| `auto_connect` / `autoConnect` | `bool` | | Settings: "Connect to the desktop automatically". |-| `connect_requested` / `connectRequested` | `bool` | | Connect (or Try again) was pressed for this Space. |-| `stream` | [`AppStreamPhase`](#appstreamphase-enum) | | The shell's stream session. |-| `access` | [`Option<AppMachineAccessNotice>`](/cua-sdk/reference/spaces/app-core/devices#appmachineaccessnotice-record) | | The detail's `access`: this device is signed in but not enrolled, so Connect shows greyed out under this notice and its action. |--## `AppDesktopCoverKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.stream-.connecting-.connect-.status-```--</Tab>-<Tab value="Rust">--```rust-AppDesktopCoverKind::Stream-AppDesktopCoverKind::Connecting-AppDesktopCoverKind::Connect-AppDesktopCoverKind::Status-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Stream` | No cover: the live desktop (or the stream view's own badge). |-| `Connecting` | The preview with "Connecting…". |-| `Connect` | The preview with a Connect button. |-| `Status` | The preview with a line (and maybe a button): the Space cannot stream, or the stream failed. |--## `app_thumbnail_policy`--How fresh the shells keep each Space's thumbnail.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appThumbnailPolicy() -> AppThumbnailPolicy-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_thumbnail_policy() -> AppThumbnailPolicy-```--</Tab>-</Tabs>--**Returns** [`AppThumbnailPolicy`](#appthumbnailpolicy-record)--## `AppThumbnailPolicy` record--Returned by [`app_thumbnail_policy`](#app_thumbnail_policy).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `open_interval_ms` / `openIntervalMs` | `u64` | | While the notch is open: every running Space, this often. |-| `background_interval_ms` / `backgroundIntervalMs` | `u64` | | Otherwise (the app visible, not in Low Power Mode): a running Space whose thumbnail is older than this gets a new one. |-| `max_dimension` / `maxDimension` | `u32` | | The long edge of a captured thumbnail, in pixels. |-| `keep_ms` / `keepMs` | `u64` | | A thumbnail kept on disk longer than this is dropped at launch. |--## `AppStreamDisplay` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `width_px` / `widthPx` | `u32` | | Width, px. |-| `height_px` / `heightPx` | `u32` | | Height, px. |--## `AppStreamRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `DESKTOP_ROW_ID` or the window's handle. |-| `kind` | [`AppStreamRowKind`](#appstreamrowkind-enum) | | Desktop or window. |-| `label` | `String` | | The one line ("Desktop (1280×800)", a window's title). |-| `help` | `String` | | The full label, for the tooltip when it is truncated. |-| `resolution` | `Option<String>` | | The display's resolution ("1280×800"), Desktop row only. |-| `icon` | [`AppStreamRowIcon`](#appstreamrowicon-enum) | | The icon. |-| `actions` | [`Vec<AppStreamRowAction>`](#appstreamrowaction-record) | | Icon buttons, in order. |--## `AppStreamRowAction` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | [`AppStreamRowActionId`](#appstreamrowactionid-enum) | | What it does. |-| `symbol` | `String` | | SF Symbol (`pip.enter`, `pip.exit` while open). |-| `help` | `String` | | Tooltip and accessibility label. |-| `active` | `bool` | | Its panel is open. |--## `AppStreamSection` record--Returned by [`app_stream_section`](#app_stream_section).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `rows` | [`Vec<AppStreamRow>`](#appstreamrow-record) | | The Desktop row, then one per window. |-| `status_text` / `statusText` | `Option<String>` | | Under the rows while there are no window rows: loading, none, failed or no match. |--## `AppStreamSectionInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `windows` | [`Option<Vec<AppRemoteWindow>>`](/cua-sdk/reference/spaces/app-core/spaces#appremotewindow-record) | | The Space's windows, `None` while they load. |-| `failed` | `bool` | | The window list could not be read. |-| `display` | [`Option<AppStreamDisplay>`](#appstreamdisplay-record) | | The primary display, when the display list has been read. |-| `os` | [`AppSpaceOs`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | The Space's OS (the Desktop row's icon). |-| `os_name` / `osName` | `Option<String>` | | The OS name the Space reported ("Ubuntu 24.04"), if any. |-| `open` | `Vec<String>` | | Rows whose picture in picture is open (row ids). |-| `query` | `String` | | Filter text. |--## `AppStreamPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.noSession-.idle-.connecting-.reconnecting-.streaming-.suspended-.failed-```--</Tab>-<Tab value="Rust">--```rust-AppStreamPhase::NoSession-AppStreamPhase::Idle-AppStreamPhase::Connecting-AppStreamPhase::Reconnecting-AppStreamPhase::Streaming-AppStreamPhase::Suspended-AppStreamPhase::Failed-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `NoSession` | No session yet. |-| `Idle` | A session that has not started. |-| `Connecting` | Opening (no frame yet). |-| `Reconnecting` | Opening again by itself after the stream dropped (no frame yet). |-| `Streaming` | Frames arrive. |-| `Suspended` | Paused by the Space (the stream view says why). |-| `Failed` | It could not open. |--## `AppStreamRowActionId` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.pip-```--</Tab>-<Tab value="Rust">--```rust-AppStreamRowActionId::Pip-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Pip` | Picture in picture: the row's own stream in a floating panel. |--## `AppStreamRowIcon` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.os(id: String)-.app(appName: String, appId: String, pid: UInt32)-```--</Tab>-<Tab value="Rust">--```rust-AppStreamRowIcon::Os { id: String }-AppStreamRowIcon::App { app_name: String, app_id: String, pid: u32 }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Os` | The Space's OS mark (`os-ubuntu`, `os-windows`, ...): the core's artwork (`notch.osIconSvg`) or system symbol. Fields: `id: String` |-| `App` | The app's icon from the SDK's `Space.app_icon` (these three arguments); none when the Space has none. Fields: `app_name: String`, `app_id: String`, `pid: u32` |--## `AppStreamRowKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.desktop-.window-```--</Tab>-<Tab value="Rust">--```rust-AppStreamRowKind::Desktop-AppStreamRowKind::Window-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Desktop` | The whole desktop. |-| `Window` | One window. |--## `app_stream_desktop_row_id`--The Stream section's Desktop row id (a window row's id is its handle).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStreamDesktopRowId() -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_stream_desktop_row_id() -> String-```--</Tab>-</Tabs>--**Returns** `String`--## `app_stream_pip_click`--What a row's picture-in-picture button does: close its open panel, or-open one.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStreamPipClick(open: [String], row: String) -> AppPipCommand-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_stream_pip_click(open: Vec<String>, row: String) -> AppPipCommand-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `open` | `Vec<String>` | required |-| `row` | `String` | required |--**Returns** [`AppPipCommand`](#apppipcommand-enum)--## `app_stream_pip_reduce`--The open picture-in-picture panels (row ids) after a panel opened,-closed or the shell re-read them: the Stream section's `open`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStreamPipReduce(open: [String], event: AppPipEvent) -> [String]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_stream_pip_reduce(open: Vec<String>, event: AppPipEvent) -> Vec<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `open` | `Vec<String>` | required |-| `event` | [`AppPipEvent`](#apppipevent-enum) | required |--**Returns** `Vec<String>`--## `app_stream_section`--A Space's Stream section: the Desktop row, then one row per window.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStreamSection(input: AppStreamSectionInput) -> AppStreamSection-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_stream_section(input: AppStreamSectionInput) -> AppStreamSection-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppStreamSectionInput`](#appstreamsectioninput-record) | required |--**Returns** [`AppStreamSection`](#appstreamsection-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/telemetry.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/telemetry.mdxdeleted file mode 100644index 95435a88cd..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/telemetry.mdx+++ /dev/null@@ -1,428 +0,0 @@-----title: "Usage telemetry"-description: "Which anonymous usage events a Spaces app step means, and sending them."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--Each `app_telemetry_*` function takes a reducer step (the state before it and the action) and returns the `AppTelemetrySignal`s it means: first-run pages, Space creates, Settings, Storage, sharing and enrollment, as fixed words only. `app_telemetry_record` sends them on the SDK's telemetry client, where every switch and the first-run notice apply. `app_telemetry_start` and `app_telemetry_welcome_left` hold the first events until the first run's Welcome page is left, with its usage-data switch deciding. What is sent: [Telemetry and privacy](/cua-sdk/concepts/telemetry).--## `AppTelemetrySignal` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.feature(feature: String)-.step(step: String, ok: Bool)-.launched(onboardingEligible: Bool?)-.signInFailed(errorKind: String)-.onboardingPage(page: String, action: String, choice: String)-.spaceWizard(action: String)-.spaceCreate(location: String, guestOs: String, kind: String, outcome: String, failedPhase: String, stalled: Bool, elapsedMs: UInt64, gpu: Bool, errorVariant: String)-.spaceCreateStarted(location: String, guestOs: String, kind: String, gpu: Bool)-.volumeSetup(surface: String, storage: String, addToFinder: Bool, mountMethod: String, outcome: String)-.share(action: String, role: String, outcome: String)-.appUpdate(action: String, channel: String, trigger: String)-.deviceEnroll(method: String, outcome: String)-.experiment(action: String, experiment: String)-.experimentsOn(experiments: [String])-```--</Tab>-<Tab value="Rust">--```rust-AppTelemetrySignal::Feature { feature: String }-AppTelemetrySignal::Step { step: String, ok: bool }-AppTelemetrySignal::Launched { onboarding_eligible: Option<bool> }-AppTelemetrySignal::SignInFailed { error_kind: String }-AppTelemetrySignal::OnboardingPage { page: String, action: String, choice: String }-AppTelemetrySignal::SpaceWizard { action: String }-AppTelemetrySignal::SpaceCreate { location: String, guest_os: String, kind: String, outcome: String, failed_phase: String, stalled: bool, elapsed_ms: u64, gpu: bool, error_variant: String }-AppTelemetrySignal::SpaceCreateStarted { location: String, guest_os: String, kind: String, gpu: bool }-AppTelemetrySignal::VolumeSetup { surface: String, storage: String, add_to_finder: bool, mount_method: String, outcome: String }-AppTelemetrySignal::Share { action: String, role: String, outcome: String }-AppTelemetrySignal::AppUpdate { action: String, channel: String, trigger: String }-AppTelemetrySignal::DeviceEnroll { method: String, outcome: String }-AppTelemetrySignal::Experiment { action: String, experiment: String }-AppTelemetrySignal::ExperimentsOn { experiments: Vec<String> }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Feature` | A Spaces app feature was used (`cua_spaces_feature_used`). Fields: `feature: String` |-| `Step` | An install or activation funnel step (`cua_onboarding_step`; `first_*` steps count once per install). Fields: `step: String`, `ok: bool` |-| `Launched` | The app started (`cua_onboarding_step`, step `app_launched`). Fields: `onboarding_eligible: Option<bool>` |-| `SignInFailed` | A sign-in failed, timed out or was cancelled (`cua_onboarding_step`, step `signed_in`, outcome `error`). Fields: `error_kind: String` |-| `OnboardingPage` | A first-run page was shown or left (`cua_onboarding_page`). Fields: `page: String`, `action: String`, `choice: String` |-| `SpaceWizard` | The New Space panel (`cua_space_wizard`). Fields: `action: String` |-| `SpaceCreate` | A Space create reached ready or failed (`cua_space_create`). Fields: `location: String`, `guest_os: String`, `kind: String`, `outcome: String`, `failed_phase: String`, `stalled: bool`, `elapsed_ms: u64`, `gpu: bool`, `error_variant: String` |-| `SpaceCreateStarted` | A Space create started (`cua_space_create_started`). Fields: `location: String`, `guest_os: String`, `kind: String`, `gpu: bool` |-| `VolumeSetup` | A Cua Volume setting was saved (`cua_volume_setup`). Fields: `surface: String`, `storage: String`, `add_to_finder: bool`, `mount_method: String`, `outcome: String` |-| `Share` | A Space was shared, unshared or its role changed (`cua_share`). Fields: `action: String`, `role: String`, `outcome: String` |-| `AppUpdate` | An updater step (`cua_app_update`). Fields: `action: String`, `channel: String`, `trigger: String` |-| `DeviceEnroll` | This device enrolled with the relay, or failed to (`cua_device_enroll`). Fields: `method: String`, `outcome: String` |-| `Experiment` | An experiment was turned on or off in Settings, Experiments (`cua_experiment`). Fields: `action: String`, `experiment: String` |-| `ExperimentsOn` | Which experiments are on now (no event of its own: the daily `cua_app_active` carries them as `experiments_on`). Fields: `experiments: Vec<String>` |--## `app_telemetry_creates`--The events one step of the Spaces being created means, at `now_ms`-(call with the state before it).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryCreates(state: AppCreatesState, action: AppCreateAction, nowMs: Int64) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_creates(state: AppCreatesState, action: AppCreateAction, now_ms: i64) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppCreatesState`](/cua-sdk/reference/spaces/app-core/creates#appcreatesstate-record) | required |-| `action` | [`AppCreateAction`](/cua-sdk/reference/spaces/app-core/creates#appcreateaction-enum) | required |-| `now_ms` | `i64` | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_enroll`--The events one step of the enroll sheet means.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryEnroll(state: AppEnrollState, action: AppEnrollAction) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_enroll(state: AppEnrollState, action: AppEnrollAction) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppEnrollState`](/cua-sdk/reference/spaces/app-core/devices#appenrollstate-record) | required |-| `action` | [`AppEnrollAction`](/cua-sdk/reference/spaces/app-core/devices#appenrollaction-enum) | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_feature`--A Spaces app feature (a fixed name).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryFeature(feature: String) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_feature(feature: String) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `feature` | `String` | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_launched`--The app started (`app_launched`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryLaunched(onboardingEligible: Bool?) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_launched(onboarding_eligible: Option<bool>) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `onboarding_eligible` | `Option<bool>` | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_onboarding`--The events one first-run step means (call with the state before it).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryOnboarding(state: AppOnboardingState, action: AppOnboardingAction) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_onboarding(state: AppOnboardingState, action: AppOnboardingAction) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppOnboardingState`](/cua-sdk/reference/spaces/app-core/onboarding-settings#apponboardingstate-record) | required |-| `action` | [`AppOnboardingAction`](/cua-sdk/reference/spaces/app-core/onboarding-settings#apponboardingaction-enum) | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_onboarding_finished`--"Start using Cua Spaces".--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryOnboardingFinished(state: AppOnboardingState) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_onboarding_finished(state: AppOnboardingState) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppOnboardingState`](/cua-sdk/reference/spaces/app-core/onboarding-settings#apponboardingstate-record) | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_record`--Records `signals` on the SDK's telemetry client (the switch, the notice-and the schema apply) and marks the day active. Returns how many events-were queued.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryRecord(signals: [AppTelemetrySignal]) -> UInt32-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_record(signals: Vec<AppTelemetrySignal>) -> u32-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `signals` | [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum) | required |--**Returns** `u32`--## `app_telemetry_share`--The events one step of the Share sheet means.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryShare(input: AppShareInput, state: AppShareSheetState, action: AppShareSheetAction) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_share(input: AppShareInput, state: AppShareSheetState, action: AppShareSheetAction) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppShareInput`](/cua-sdk/reference/spaces/app-core/share#appshareinput-record) | required |-| `state` | [`AppShareSheetState`](/cua-sdk/reference/spaces/app-core/share#appsharesheetstate-record) | required |-| `action` | [`AppShareSheetAction`](/cua-sdk/reference/spaces/app-core/share#appsharesheetaction-enum) | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_sign_in_failed`--A sign-in failed (`message`, which never leaves: only its kind) or was-cancelled (none).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetrySignInFailed(message: String?) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_sign_in_failed(message: Option<String>) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `message` | `Option<String>` | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_start`--The app started: attributes this process's events to `spaces_app` at-`version`, lets the app show the first-run notice itself (nothing is-sent before it has been shown once), and records `app_launched` (on a-first run, once the notice shows). Call once at launch, before the-first `Cua`. `onboarding_eligible`: the first run is still to finish-(`app_launched` carries it). Returns whether the notice was already-shown here.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryStart(version: String, onboardingEligible: Bool?) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_start(version: String, onboarding_eligible: Option<bool>) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `version` | `String` | required |-| `onboarding_eligible` | `Option<bool>` | required |--**Returns** `bool`--## `app_telemetry_storage`--The events one step of Settings, Storage means.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryStorage(input: AppStorageInput, state: AppStorageState, action: AppStorageAction) -> [AppTelemetrySignal]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_storage(input: AppStorageInput, state: AppStorageState, action: AppStorageAction) -> Vec<AppTelemetrySignal>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppStorageInput`](/cua-sdk/reference/spaces/volume-app-core#appstorageinput-record) | required |-| `state` | [`AppStorageState`](/cua-sdk/reference/spaces/volume-app-core#appstoragestate-record) | required |-| `action` | [`AppStorageAction`](/cua-sdk/reference/spaces/volume-app-core#appstorageaction-enum) | required |--**Returns** [`Vec<AppTelemetrySignal>`](#apptelemetrysignal-enum)--## `app_telemetry_welcome_left`--The first run left Welcome with its usage-data switch at `on`: writes-the machine's setting when it changed (the same as Settings and `cua-telemetry off`), then records that the notice was shown. Nothing is-queued or sent before; with the switch off, nothing after either.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTelemetryWelcomeLeft(on: Bool) throws-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_telemetry_welcome_left(on: bool) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `on` | `bool` | required |--**Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-grid.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-grid.mdxdeleted file mode 100644index a9e1cdbed7..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-grid.mdx+++ /dev/null@@ -1,326 +0,0 @@-----title: "Teleport picker grid"-description: "The teleport picker's tiles in both apps: tabs, app and window tiles with their icon and preview sources, and the arrow keys."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_picker_app_grid`, `app_picker_window_grid` and `app_picker_remote_grid` build each tab's tiles; an app tile previews its frontmost window. `app_picker_grid_step` moves the selection for the arrow keys and `app_picker_grid_tabs` names the tabs.--## `AppPickerGrid` record--Returned by [`app_picker_app_grid`](#app_picker_app_grid), [`app_picker_remote_grid`](#app_picker_remote_grid), [`app_picker_window_grid`](#app_picker_window_grid).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `sections` | [`Vec<AppPickerTileSection>`](#apppickertilesection-record) | | Sections, in order. |-| `empty_text` / `emptyText` | `Option<String>` | | When there are no tiles: "No apps match." and the like. |--## `AppPickerGridPrimary` record--Returned by [`app_picker_grid_primary`](#app_picker_grid_primary).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | The label. |-| `enabled` | `bool` | | Enabled. |--## `AppPickerGridTabItem` record--Returned by [`app_picker_grid_tabs`](#app_picker_grid_tabs).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `tab` | [`AppPickerGridTab`](#apppickergridtab-enum) | | Which tab. |-| `label` | `String` | | Its label. |--## `AppPickerTile` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The catalog entry id (Apps) or the window id. |-| `title` | `String` | | One line: the app's name, or the window's title. |-| `help` | `String` | | The tooltip: what the app can take, why not, or the full title. |-| `disabled` | `bool` | | Dimmed and not choosable. |-| `selected` | `bool` | | Highlighted (keyboard or click). |-| `icon` | [`AppPickerTileIcon`](#apppickertileicon-enum) | | The icon. |-| `thumbnail` | [`AppPickerTileThumbnail`](#apppickertilethumbnail-enum) | | The preview. |--## `AppPickerTileSection` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | Title, empty for none. |-| `tiles` | [`Vec<AppPickerTile>`](#apppickertile-record) | | Tiles, in order. |--## `AppPickerGridTab` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.apps-.windows-.space-```--</Tab>-<Tab value="Rust">--```rust-AppPickerGridTab::Apps-AppPickerGridTab::Windows-AppPickerGridTab::Space-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Apps` | The app catalog. |-| `Windows` | This machine's open windows. |-| `Space` | The Space's windows. |--## `AppPickerTileIcon` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.host(path: String)-.guest(appName: String, appId: String, pid: UInt32)-.none-```--</Tab>-<Tab value="Rust">--```rust-AppPickerTileIcon::Host { path: String }-AppPickerTileIcon::Guest { app_name: String, app_id: String, pid: u32 }-AppPickerTileIcon::None-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Host` | This machine's app at `path` (the SDK's `Teleport.appIconPng`). Fields: `path: String` |-| `Guest` | A Space's app (the SDK's `Space.appIcons`). Fields: `app_name: String`, `app_id: String`, `pid: u32` |-| `None` | No icon to show. |--## `AppPickerTileThumbnail` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.hostWindow(windowId: UInt32)-.guestWindow(windowId: String, epoch: UInt64)-.none-```--</Tab>-<Tab value="Rust">--```rust-AppPickerTileThumbnail::HostWindow { window_id: u32 }-AppPickerTileThumbnail::GuestWindow { window_id: String, epoch: u64 }-AppPickerTileThumbnail::None-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `HostWindow` | One of this machine's windows (the window-drag preview source, the SDK's `Teleport.captureWindowThumbnail`). Fields: `window_id: u32` |-| `GuestWindow` | One of the Space's windows (the SDK's `Space.windowThumbnail`). Fields: `window_id: String`, `epoch: u64` |-| `None` | No window to preview (the tile shows the icon large). |--## `app_picker_app_grid`--The picker's Apps tab as tiles (`windows`: this machine's, front to back,-for each app's frontmost-window preview).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerAppGrid(state: AppPickerState, windows: [AppOpenWindow]) -> AppPickerGrid-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_app_grid(state: AppPickerState, windows: Vec<AppOpenWindow>) -> AppPickerGrid-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](/cua-sdk/reference/spaces/app-core/teleport#apppickerstate-record) | required |-| `windows` | [`Vec<AppOpenWindow>`](/cua-sdk/reference/spaces/app-core/spaces#appopenwindow-record) | required |--**Returns** [`AppPickerGrid`](#apppickergrid-record)--## `app_picker_grid_primary`--The picker grid's primary button for a tab ("Continue", "Teleport to-<Space>", "Stream to This Mac"), live with a choosable tile selected.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerGridPrimary(tab: AppPickerGridTab, spaceName: String, grid: AppPickerGrid) -> AppPickerGridPrimary-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_grid_primary(tab: AppPickerGridTab, space_name: String, grid: AppPickerGrid) -> AppPickerGridPrimary-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `tab` | [`AppPickerGridTab`](#apppickergridtab-enum) | required |-| `space_name` | `String` | required |-| `grid` | [`AppPickerGrid`](#apppickergrid-record) | required |--**Returns** [`AppPickerGridPrimary`](#apppickergridprimary-record)--## `app_picker_grid_step`--Arrow keys over a picker grid: the tile `delta` choosable places away.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerGridStep(grid: AppPickerGrid, selected: String?, delta: Int32) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_grid_step(grid: AppPickerGrid, selected: Option<String>, delta: i32) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `grid` | [`AppPickerGrid`](#apppickergrid-record) | required |-| `selected` | `Option<String>` | required |-| `delta` | `i32` | required |--**Returns** `Option<String>`--## `app_picker_grid_tabs`--The teleport picker's tab strip.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerGridTabs(spaceName: String) -> [AppPickerGridTabItem]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_grid_tabs(space_name: String) -> Vec<AppPickerGridTabItem>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space_name` | `String` | required |--**Returns** [`Vec<AppPickerGridTabItem>`](#apppickergridtabitem-record)--## `app_picker_remote_grid`--The picker's From <Space> tab.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerRemoteGrid(windows: [AppRemoteWindow], query: String, selected: String?) -> AppPickerGrid-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_remote_grid(windows: Vec<AppRemoteWindow>, query: String, selected: Option<String>) -> AppPickerGrid-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `windows` | [`Vec<AppRemoteWindow>`](/cua-sdk/reference/spaces/app-core/spaces#appremotewindow-record) | required |-| `query` | `String` | required |-| `selected` | `Option<String>` | required |--**Returns** [`AppPickerGrid`](#apppickergrid-record)--## `app_picker_window_grid`--The picker's Open windows tab.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerWindowGrid(windows: [AppOpenWindow], query: String, selected: String?) -> AppPickerGrid-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_window_grid(windows: Vec<AppOpenWindow>, query: String, selected: Option<String>) -> AppPickerGrid-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `windows` | [`Vec<AppOpenWindow>`](/cua-sdk/reference/spaces/app-core/spaces#appopenwindow-record) | required |-| `query` | `String` | required |-| `selected` | `Option<String>` | required |--**Returns** [`AppPickerGrid`](#apppickergrid-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-review.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-review.mdxdeleted file mode 100644index 50f63ad736..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-review.mdx+++ /dev/null@@ -1,305 +0,0 @@-----title: "Teleport review"-description: "The review and consent before a teleport: what to send per site, from the app or from the Keyvault, and the choice remembered for next time."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`AppReviewView` is the review sheet. `AppReviewToggle` and `AppReviewChoice` change what is sent, per site or per part; `app_review_remember` keeps the choice for the next teleport of the same app to the same Space, and `AppVaultSource` offers the items the Keyvault already holds, which need no Keychain prompt.--## `AppReviewView` record--Returned by [`app_picker_review`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_review).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Teleport Slack to Aurora". |-| `items` | [`Vec<AppConsentItem>`](#appconsentitem-record) | | The consent lines. |-| `steps` | [`Vec<AppPlanStepView>`](#appplanstepview-record) | | What happens, in plan steps, when the review has nothing to choose (no files, state, secrets or sites; e.g. "Just the app" for an app the Space's image already has), so the review is never blank. Empty otherwise: the lines below say what is sent, and a step's counts would not follow what is turned off. The installs are in `items`. |-| `needs_acknowledgement` / `needsAcknowledgement` | `bool` | | The secrets checkbox shows. |-| `acknowledged` | `bool` | | Checked. |-| `offers_save_to_keyvault` / `offersSaveToKeyvault` | `bool` | | The "Save to Keyvault" checkbox shows (a sensitive plan only: there is nothing to keep sealed otherwise). |-| `save_to_keyvault` / `saveToKeyvault` | `bool` | | Checked. |-| `needs_relay_plaintext_acknowledgement` / `needsRelayPlaintextAcknowledgement` | `bool` | | The relay-plaintext warning's checkbox shows (S1): this Space predates end-to-end sealing, and the Cua relay could read this secret in transit. |-| `acknowledged_relay_plaintext` / `acknowledgedRelayPlaintext` | `bool` | | Checked. |-| `can_confirm` / `canConfirm` | `bool` | | "Teleport" is enabled. |-| `leaves_text` / `leavesText` | `Option<String>` | | "12 MB leaves this Mac" (none when nothing leaves). |-| `warnings` | `Vec<String>` | | Caveats. |-| `toggles` | [`Vec<AppReviewToggle>`](#appreviewtoggle-record) | | Lines the user can turn off (files, folders, state, secrets), each with whether it is sent. The cookie store is the site list below. |-| `offers_domains` / `offersDomains` | `bool` | | The plan sends a browser's cookies, so the sites can be chosen. |-| `needs_domains` / `needsDomains` | `bool` | | The sites have not been read yet (the shell asks the Keyvault for them, which may ask for Touch ID). |-| `domains` | [`Vec<AppReviewDomain>`](#appreviewdomain-record) | | The sites with counts, filtered by the search. |-| `domain_summary` / `domainSummary` | `String` | | "3 of 12 sites". |-| `domain_query` / `domainQuery` | `String` | | The sites search text. |-| `selected_domains` / `selectedDomains` | `Vec<String>` | | The sites chosen (what is remembered for next time). |-| `source` | [`AppSendSource`](#appsendsource-enum) | | Where it sends from. |-| `offers_vault` / `offersVault` | `bool` | | The app has saved Keyvault items to send instead of reading the live app. |-| `vault` | [`AppVaultSource`](#appvaultsource-record) | | The saved items. |-| `vault_label` / `vaultLabel` | `String` | | "Send from the Keyvault (212 items, saved 2 days ago)". |-| `live_label` / `liveLabel` | `String` | | "Read Chrome now (macOS asks for Keychain access)". |-| `offers_passwords` / `offersPasswords` | `bool` | | "Also send saved passwords" shows (there are some to send). |-| `include_passwords` / `includePasswords` | `bool` | | Ticked. |-| `passwords_label` / `passwordsLabel` | `String` | | "Also send 14 saved passwords". |-| `passwords` | [`Vec<AppReviewPassword>`](#appreviewpassword-record) | | Ticked: the saved passwords to pick from (sites with counts when reading the app, each saved password's site and username from the Keyvault; never a value), filtered by the search. |-| `password_summary` / `passwordSummary` | `String` | | "2 of 5 sites", "2 of 5 passwords". |-| `password_query` / `passwordQuery` | `String` | | The passwords search text. |-| `source_note` / `sourceNote` | `String` | | What the Keychain will do for this source, in a line. |--## `AppSendSource` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.live-.vault-```--</Tab>-<Tab value="Rust">--```rust-AppSendSource::Live-AppSendSource::Vault-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Live` | Read the live app now (a browser's cookies are decrypted, so macOS asks for Keychain access). |-| `Vault` | Send the items saved in the Keyvault for this app. Nothing is read from the host. |--## `AppVaultSource` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `available` | `bool` | | The app has saved items that can be sent (passwords never are). |-| `items` | `u32` | | How many. |-| `saved` | `String` | | "saved 2 days ago". |-| `selected` | `Vec<String>` | | The items chosen to send (ids). |-| `password_ids` / `passwordIds` | `Vec<String>` | | The app's saved passwords (ids), sent only when ticked. |-| `passwords` | [`Vec<AppVaultPassword>`](/cua-sdk/reference/spaces/app-core#appvaultpassword-record) | | The same passwords with their site and username (never a value), for the review to list. |-| `password_picks` / `passwordPicks` | `bool` | | The Keyvault daemon enforces a choice of passwords by site (`password_domains` in its status). Without it the review offers the passwords as before (those of the chosen sites, or every saved one) and lists none to pick: it never shows a choice the daemon would not keep. |--## `AppRememberedChoice` record--Returned by [`app_review_remember`](#app_review_remember).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | `<app>\|<space>`. |-| `domains` | `Vec<String>` | | The sites (registrable domains) that were sent. |--## `AppPlanStepView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | `String` | | `install`, `files`, `state`, `launch`. |-| `summary` | `String` | | One line. |--## `AppInstallCuaPrompt` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `installed` | `bool` | | Cua is installed but not running. |-| `title` | `String` | | Title. |-| `message` | `String` | | One line. |-| `action_label` / `actionLabel` | `String` | | Button. |-| `url` | `String` | | Button target: always one of the constants, never from the error. |--## `AppConsentItem` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`AppConsentKind`](#appconsentkind-enum) | | Kind. |-| `key` | `String` | | Stable key. |-| `label` | `String` | | Label. |-| `detail` | `String` | | Detail. |-| `bytes` | `u64` | | Bytes that leave. |-| `sensitive` | `bool` | | Credentials, cookies, tokens. |--## `AppReviewChoice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `source` | [`AppSendSource`](#appsendsource-enum) | | Where to send from. |-| `domains` | [`Vec<KvDomainCount>`](/cua-sdk/reference/spaces/app-core/keyvault#kvdomaincount-record) | | The browser's sites with counts (none until read, or for an app that is not a browser). |-| `selected_domains` / `selectedDomains` | `Vec<String>` | | The sites chosen. |-| `query` | `String` | | The sites list's search text. |-| `excluded` | `Vec<String>` | | Consent items (keys) turned off. |-| `vault` | [`AppVaultSource`](#appvaultsource-record) | | The saved items. |-| `loaded` | `bool` | | The sites were asked for (a failure counts: the review then sends what the plan lists). |-| `include_passwords` / `includePasswords` | `bool` | | The saved passwords are ticked to send (off unless the user ticks them; never remembered). |-| `password_domains` / `passwordDomains` | `Vec<String>` | | The sites whose saved passwords to send (reading the app). |-| `password_items` / `passwordItems` | `Vec<String>` | | The saved passwords to send (ids, from the Keyvault). |-| `password_query` / `passwordQuery` | `String` | | The passwords list's search text. |-| `passwords_picked` / `passwordsPicked` | `bool` | | The password choice was made (the default is picked the first time the box is ticked). |--## `AppReviewDomain` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `domain` | `String` | | The site (`github.com`). |-| `counts` | `String` | | "12 cookies, 2 storage values". |-| `count` | `u32` | | Items the site holds. |-| `signin` | `bool` | | It looks like it keeps a sign-in. |-| `identity_provider` / `identityProvider` | `bool` | | An identity provider: its session unlocks other apps. |-| `selected` | `bool` | | Chosen to send. |-| `selectable` | `bool` | | Can be chosen: it holds something that can be sent. A site whose cookies are all unreadable is greyed out. |-| `unavailable` | `u32` | | Cookies that cannot be read, shown greyed with `unavailable_note`. |-| `unavailable_note` / `unavailableNote` | `String` | | "3 cookies cannot be sent: Chrome protects them with ...", or empty. |--## `AppReviewPassword` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | What picking it toggles: the site (reading the app) or the item id (from the Keyvault). |-| `site` | `String` | | The site (`github.com`), or "Saved password" when not known. |-| `username` | `String` | | The username, when known (a saved item). |-| `counts` | `String` | | "2 passwords" (a site of the browser); empty for one saved item. |-| `selected` | `bool` | | Chosen to send. |--## `AppReviewToggle` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `key` | `String` | | The consent item's key. |-| `label` | `String` | | Label. |-| `detail` | `String` | | Detail. |-| `bytes` | `u64` | | Bytes that leave. |-| `sensitive` | `bool` | | A secret. |-| `selected` | `bool` | | Sent (not turned off). |--## `AppConsentKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.install-.file-.folder-.state-.secret-```--</Tab>-<Tab value="Rust">--```rust-AppConsentKind::Install-AppConsentKind::File-AppConsentKind::Folder-AppConsentKind::State-AppConsentKind::Secret-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Install` | An install into the Space. |-| `File` | A file that leaves this machine. |-| `Folder` | A folder that leaves this machine. |-| `State` | App state that leaves this machine. |-| `Secret` | A secret that leaves this machine. |--## `app_review_remember`--`choices` with the sites just sent remembered for `key`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appReviewRemember(choices: [AppRememberedChoice], key: String, domains: [String]) -> [AppRememberedChoice]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_review_remember(choices: Vec<AppRememberedChoice>, key: String, domains: Vec<String>) -> Vec<AppRememberedChoice>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `choices` | [`Vec<AppRememberedChoice>`](#apprememberedchoice-record) | required |-| `key` | `String` | required |-| `domains` | `Vec<String>` | required |--**Returns** [`Vec<AppRememberedChoice>`](#apprememberedchoice-record)--## `app_review_remember_key`--The key a review's site choice is remembered under (`<app>|<space>`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appReviewRememberKey(app: String, space: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_review_remember_key(app: String, space: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app` | `String` | required |-| `space` | `String` | required |--**Returns** `String`--## `app_review_remembered`--What was picked last time for `key` (an app and a Space), if anything.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appReviewRemembered(choices: [AppRememberedChoice], key: String) -> [String]?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_review_remembered(choices: Vec<AppRememberedChoice>, key: String) -> Option<Vec<String>>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `choices` | [`Vec<AppRememberedChoice>`](#apprememberedchoice-record) | required |-| `key` | `String` | required |--**Returns** `Option<Vec<String>>`diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-run.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-run.mdxdeleted file mode 100644index ba38de806d..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-run.mdx+++ /dev/null@@ -1,279 +0,0 @@-----title: "Teleport plan and run"-description: "The teleport plan, its consent and capabilities, and the run's steps."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_teleport_plan` turns a `Teleport.plan` into the consent the user sees; `AppTeleportRunEvent` and `AppTeleportRunReport` follow the run.--## `AppTeleportConsent` record--Returned by [`app_picker_consent`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_consent).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `approved` | `bool` | | Confirmed. |-| `acknowledge_sensitive` / `acknowledgeSensitive` | `bool` | | Secrets acknowledged. |-| `save_to_keyvault` / `saveToKeyvault` | `bool` | | "Save to Keyvault" checked. |-| `acknowledge_relay_plaintext` / `acknowledgeRelayPlaintext` | `bool` | | `Plan.relay_unsealed`'s warning acknowledged (S1). |-| `cookie_domains` / `cookieDomains` | `Option<Vec<String>>` | | The sites whose cookies to send (the review's per-site choice); `None` when the review did not list sites. |-| `exclude` | `Vec<String>` | | Consent items (keys) the user turned off. |-| `from_vault` / `fromVault` | `Option<Vec<String>>` | | Send these saved Keyvault items instead of reading the live app. |-| `include_passwords` / `includePasswords` | `bool` | | Also send the saved passwords (ticked in the review). |-| `password_domains` / `passwordDomains` | `Option<Vec<String>>` | | Reading the app: the sites whose saved passwords to send (the review's per-site choice); `None` when no password is sent this way. |--## `AppTeleportPlan` record--Returned by [`app_teleport_plan`](#app_teleport_plan), [`app_teleport_plan_from_json`](#app_teleport_plan_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app` | [`AppCatalogEntry`](/cua-sdk/reference/spaces/app-core/teleport#appcatalogentry-record) | | The app. |-| `space_id` / `spaceId` | `String` | | Target Space. |-| `moves` | [`AppTeleportMove`](#appteleportmove-enum) | | What moves. |-| `steps` | [`Vec<AppPlanStepView>`](/cua-sdk/reference/spaces/app-core/teleport-review#appplanstepview-record) | | Steps. |-| `consent` | [`Vec<AppConsentItem>`](/cua-sdk/reference/spaces/app-core/teleport-review#appconsentitem-record) | | Consent lines. |-| `sensitive` | `bool` | | Any line is a secret. |-| `total_bytes` / `totalBytes` | `u64` | | Bytes that leave this machine. |-| `warnings` | `Vec<String>` | | Caveats. |-| `relay_unsealed` / `relayUnsealed` | `bool` | | This Space is reached through a relay connection that predates end-to-end sealing: a secret this plan sends would cross it in the clear (S1). Needs `acknowledgeRelayPlaintext` the same way a secret needs `acknowledgeSensitive`. Defaults to `false`: older fixtures and a plan from a relay that predates the capability both read as sealed (never retroactively flagged). |-| `json` | `String` | | The SDK's JSON for this plan. |--## `AppTeleportRunEvent` record--Returned by [`app_teleport_run_event`](#app_teleport_run_event).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | `u32` | | Step index. |-| `steps` | `u32` | | Steps. |-| `kind` | `String` | | Step kind. |-| `phase` | [`AppTeleportRunPhase`](#appteleportrunphase-enum) | | Phase. |-| `detail` | `String` | | Detail. |-| `done_bytes` / `doneBytes` | `u64` | | Bytes done. |-| `total_bytes` / `totalBytes` | `u64` | | Bytes total. |--## `AppTeleportRunReport` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app_id` / `appId` | `String` | | App id. |-| `installed` | `Vec<String>` | | Installed. |-| `sent` | `Vec<String>` | | Sent. |-| `imported` | `Vec<String>` | | Imported. |-| `skipped` | `Vec<String>` | | Skipped. |-| `launched` | `bool` | | Launched. |--## `AppTeleportCapability` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.full-.installOnly-.unsupported-```--</Tab>-<Tab value="Rust">--```rust-AppTeleportCapability::Full-AppTeleportCapability::InstallOnly-AppTeleportCapability::Unsupported-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Full` | App and signed-in state. |-| `InstallOnly` | App, empty or with files. |-| `Unsupported` | Not available. |--## `AppTeleportMove` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.appOnly-.appWithFiles-.appWithState-```--</Tab>-<Tab value="Rust">--```rust-AppTeleportMove::AppOnly-AppTeleportMove::AppWithFiles-AppTeleportMove::AppWithState-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `AppOnly` | Just the app. |-| `AppWithFiles` | The app with files or folders. |-| `AppWithState` | The app with its signed-in state. |--## `AppTeleportRunPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.started-.progress-.finished-.failed-.done-```--</Tab>-<Tab value="Rust">--```rust-AppTeleportRunPhase::Started-AppTeleportRunPhase::Progress-AppTeleportRunPhase::Finished-AppTeleportRunPhase::Failed-AppTeleportRunPhase::Done-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Started` | A step started. |-| `Progress` | Bytes moved. |-| `Finished` | A step finished. |-| `Failed` | A step failed. |-| `Done` | All done. |--## `app_teleport_plan`--A plan from `Teleport.plan`, as the review's plan.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTeleportPlan(plan: TeleportPlan) -> AppTeleportPlan-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_teleport_plan(plan: TeleportPlan) -> AppTeleportPlan-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `plan` | [`TeleportPlan`](/cua-sdk/reference/spaces/teleport-apps#teleportplan-record) | required |--**Returns** [`AppTeleportPlan`](#appteleportplan-record)--## `app_teleport_plan_from_json`--A teleport plan from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTeleportPlanFromJson(json: String) throws -> AppTeleportPlan-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_teleport_plan_from_json(json: String) -> Result<AppTeleportPlan, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppTeleportPlan`](#appteleportplan-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_teleport_run_event`--An SDK run event as the picker's (`AppPickerEvent.progress`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTeleportRunEvent(event: TeleportRunEvent) -> AppTeleportRunEvent-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_teleport_run_event(event: TeleportRunEvent) -> AppTeleportRunEvent-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `event` | [`TeleportRunEvent`](/cua-sdk/reference/spaces/teleport-apps#teleportrunevent-record) | required |--**Returns** [`AppTeleportRunEvent`](#appteleportrunevent-record)--## `app_teleport_run_status`--`app_picker_status` for a run's events as the SDK delivered them.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTeleportRunStatus(events: [TeleportRunEvent]) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_teleport_run_status(events: Vec<TeleportRunEvent>) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `events` | [`Vec<TeleportRunEvent>`](/cua-sdk/reference/spaces/teleport-apps#teleportrunevent-record) | required |--**Returns** `Option<String>`diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-transfer.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-transfer.mdxdeleted file mode 100644index 8cf6d2b87f..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-transfer.mdx+++ /dev/null@@ -1,271 +0,0 @@-----title: "Teleport transfer and drag"-description: "The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The transfer overlay follows a running teleport step by step; the drag overlay shows a file or app dragged onto a Space.--## `AppDragOverlayState` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | [`AppDragOverlayPhase`](#appdragoverlayphase-enum) | | Phase. |-| `window_id` / `windowId` | `Option<u32>` | | CoreGraphics id of the dragged window. |-| `app_name` / `appName` | `Option<String>` | | The dragged app's name. |-| `target_space_id` / `targetSpaceId` | `Option<String>` | | The tile under the cursor (selector only). |-| `ghost` | `Option<String>` | | The captured ghost (a data URL or a shell-local image key). |--## `AppDragOverlayTransition` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `state` | [`AppDragOverlayState`](#appdragoverlaystate-record) | | New state. |-| `effects` | [`Vec<AppDragOverlayEffect>`](#appdragoverlayeffect-enum) | | Effects. |--## `AppTransferOverlayState` record--Returned by [`app_transfer_reduce`](#app_transfer_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | [`AppTransferPhase`](#apptransferphase-enum) | | Phase. |-| `app_name` / `appName` | `String` | | App being teleported. |-| `message` | `Option<String>` | | Failure reason. |-| `sent_bytes` / `sentBytes` | `Option<f64>` | | Bytes sent. |-| `total_bytes` / `totalBytes` | `Option<f64>` | | Total bytes. |--## `AppTransferSignal` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `status` | [`AppTransferStatus`](#apptransferstatus-enum) | | Status. |-| `app_name` / `appName` | `Option<String>` | | App name. |-| `message` | `Option<String>` | | Message. |-| `sent_bytes` / `sentBytes` | `Option<f64>` | | Bytes sent. |-| `total_bytes` / `totalBytes` | `Option<f64>` | | Total bytes. |--## `AppDragOverlayEffect` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.capture(windowId: UInt32?)-.commit(spaceId: String)-```--</Tab>-<Tab value="Rust">--```rust-AppDragOverlayEffect::Capture { window_id: Option<u32> }-AppDragOverlayEffect::Commit { space_id: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Capture` | Capture the ghost (needs Screen Recording; none is fine). Fields: `window_id: Option<u32>` |-| `Commit` | Teleport to this Space. Fields: `space_id: String` |--## `AppDragOverlayEvent` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.start(windowId: UInt32?, appName: String?)-.enterNotch-.leaveNotch-.over(spaceId: String)-.out-.ghostReady(ghost: String?)-.drop(spaceId: String?)-.cancel-```--</Tab>-<Tab value="Rust">--```rust-AppDragOverlayEvent::Start { window_id: Option<u32>, app_name: Option<String> }-AppDragOverlayEvent::EnterNotch-AppDragOverlayEvent::LeaveNotch-AppDragOverlayEvent::Over { space_id: String }-AppDragOverlayEvent::Out-AppDragOverlayEvent::GhostReady { ghost: Option<String> }-AppDragOverlayEvent::Drop { space_id: Option<String> }-AppDragOverlayEvent::Cancel-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Start` | A supported window drag began. Fields: `window_id: Option<u32>`, `app_name: Option<String>` |-| `EnterNotch` | The cursor reached the notch box. |-| `LeaveNotch` | The cursor left the selector. |-| `Over` | Over a Space tile. Fields: `space_id: String` |-| `Out` | Off every tile. |-| `GhostReady` | The ghost capture finished. Fields: `ghost: Option<String>` |-| `Drop` | Released; the tile under the cursor, if any. Fields: `space_id: Option<String>` |-| `Cancel` | Abort. |--## `AppDragOverlayPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.idle-.prompt-.selector-```--</Tab>-<Tab value="Rust">--```rust-AppDragOverlayPhase::Idle-AppDragOverlayPhase::Prompt-AppDragOverlayPhase::Selector-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Idle` | Nothing showing. |-| `Prompt` | The "Teleport to Cua" box. |-| `Selector` | The Space tiles as drop targets. |--## `AppTransferPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.active-.error-```--</Tab>-<Tab value="Rust">--```rust-AppTransferPhase::Active-AppTransferPhase::Error-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Active` | Uploading. |-| `Error` | Failed. |--## `AppTransferStatus` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.start-.progress-.done-.error-```--</Tab>-<Tab value="Rust">--```rust-AppTransferStatus::Start-AppTransferStatus::Progress-AppTransferStatus::Done-AppTransferStatus::Error-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Start` | Began (or retried). |-| `Progress` | Bytes moved. |-| `Done` | Finished. |-| `Error` | Failed. |--## `app_transfer_reduce`--Advances the transfer overlay (`None` hides it).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTransferReduce(state: AppTransferOverlayState?, signal: AppTransferSignal) -> AppTransferOverlayState?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_transfer_reduce(state: Option<AppTransferOverlayState>, signal: AppTransferSignal) -> Option<AppTransferOverlayState>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`Option<AppTransferOverlayState>`](#apptransferoverlaystate-record) | required |-| `signal` | [`AppTransferSignal`](#apptransfersignal-record) | required |--**Returns** [`Option<AppTransferOverlayState>`](#apptransferoverlaystate-record)--## `app_transfer_title`--The transfer overlay's title.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appTransferTitle(state: AppTransferOverlayState) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_transfer_title(state: AppTransferOverlayState) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppTransferOverlayState`](#apptransferoverlaystate-record) | required |--**Returns** `String`diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdxdeleted file mode 100644index 9f11d05897..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdx+++ /dev/null@@ -1,685 +0,0 @@-----title: "Teleport picker"-description: "The teleport picker and its catalog."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The picker lists `Teleport.catalog` entries and drives the steps up to the review. The overlays that show a teleport in progress are on [Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer).--## `AppEntrySection` record--Returned by [`app_picker_sections`](#app_picker_sections).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Recent", "Apps", "Not available". |-| `entries` | [`Vec<AppCatalogEntry>`](#appcatalogentry-record) | | Entries. |--## `AppCatalogEntry` record--Returned by [`app_catalog_entries_from_json`](#app_catalog_entries_from_json), [`app_catalog_entry`](#app_catalog_entry).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Id. |-| `name` | `String` | | Name. |-| `host_path` / `hostPath` | `Option<String>` | | Bundle path. |-| `host_app_id` / `hostAppId` | `Option<String>` | | Bundle id. |-| `version` | `Option<String>` | | Version. |-| `capability` | [`AppTeleportCapability`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportcapability-enum) | | Capability. |-| `reason` | `Option<String>` | | Why unsupported, or a caveat. |-| `moves` | [`Vec<AppTeleportMove>`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportmove-enum) | | Offered moves, UI order. |-| `provider_id` / `providerId` | `Option<String>` | | Provider id. |-| `sensitive_groups` / `sensitiveGroups` | [`Vec<AppSensitiveGroup>`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitivegroup-enum) | | The opt-in groups the signed-in state move offers, UI order. |-| `install_source` / `installSource` | `Option<String>` | | `manifest`, `image`, `space`. |-| `install_id` / `installId` | `Option<String>` | | Installable id. |-| `install_version` / `installVersion` | `Option<String>` | | Installable version. |-| `launch_bin` / `launchBin` | `Option<String>` | | Binary. |-| `last_used_ms` / `lastUsedMs` | `Option<i64>` | | Last used (recents). |-| `json` | `String` | | The SDK's JSON for this entry. |--## `AppPickerPrimary` record--Returned by [`app_picker_primary`](#app_picker_primary).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | "Teleport" / "Stream". |-| `action` | [`AppPickerAction`](#apppickeraction-enum) | | Action. |-| `enabled` | `bool` | | Enabled. |--## `AppPickerState` record--Returned by [`app_picker_initial`](#app_picker_initial), [`app_picker_reduce`](#app_picker_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | [`AppPickerStep`](#apppickerstep-enum) | | Step. |-| `space_name` / `spaceName` | `String` | | The target Space's name. |-| `entries` | [`Option<Vec<AppCatalogEntry>>`](#appcatalogentry-record) | | The catalog, once loaded. |-| `query` | `String` | | Search. |-| `selected_id` / `selectedId` | `Option<String>` | | Highlighted app. |-| `entry` | [`Option<AppCatalogEntry>`](#appcatalogentry-record) | | The chosen app. |-| `moves` | [`Option<AppTeleportMove>`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportmove-enum) | | What moves. |-| `files` | `Vec<String>` | | Chosen files. |-| `sensitive` | [`Vec<AppSensitiveGroup>`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitivegroup-enum) | | The opt-in groups checked on the options step (only planned with the signed-in state move). Each group's items are secrets the review lists and asks to acknowledge. |-| `plan` | [`Option<AppTeleportPlan>`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportplan-record) | | The plan under review. |-| `acknowledged` | `bool` | | Secrets acknowledged. |-| `save_to_keyvault` / `saveToKeyvault` | `bool` | | "Save to Keyvault" checked: keep the captured session sealed in the Cua Keyvault after delivery, for reuse without asking again (shown alongside the acknowledgement, only when the plan is sensitive). |-| `acknowledged_relay_plaintext` / `acknowledgedRelayPlaintext` | `bool` | | `Plan.relay_unsealed`'s warning acknowledged (S1). |-| `choice` | [`AppReviewChoice`](/cua-sdk/reference/spaces/app-core/teleport-review#appreviewchoice-record) | | What the review sends: which sites, which items, from where. |-| `events` | [`Vec<AppTeleportRunEvent>`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportrunevent-record) | | Run events (last `MAX_EVENTS`). |-| `report` | [`Option<AppTeleportRunReport>`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportrunreport-record) | | The run's report. |-| `error` | `Option<String>` | | Error text. |-| `install_prompt` / `installPrompt` | [`Option<AppInstallCuaPrompt>`](/cua-sdk/reference/spaces/app-core/teleport-review#appinstallcuaprompt-record) | | The "needs the Cua app" prompt. |-| `error_back` / `errorBack` | [`AppPickerStep`](#apppickerstep-enum) | | Where Back from an error goes. |--## `AppPickerAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.teleport-.streamRemote-.streamLocalSoon-```--</Tab>-<Tab value="Rust">--```rust-AppPickerAction::Teleport-AppPickerAction::StreamRemote-AppPickerAction::StreamLocalSoon-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Teleport` | Teleport the app. |-| `StreamRemote` | Stream the remote window here. |-| `StreamLocalSoon` | Streaming a local window is not built yet: an honest notice. |--## `AppPickerEvent` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.loaded(entries: [AppCatalogEntry])-.failed(message: String, causeTexts: [String], causeInstalled: Bool)-.query(query: String)-.select(id: String)-.choose(id: String?)-.preselect(entry: AppCatalogEntry, files: [String])-.move(moves: AppTeleportMove)-.files(files: [String])-.removeFile(path: String)-.sensitive(group: AppSensitiveGroup, value: Bool)-.plan-.planned(plan: AppTeleportPlan)-.acknowledge(value: Bool)-.saveToKeyvault(value: Bool)-.acknowledgeRelayPlaintext(value: Bool)-.domainsLoaded(inventory: KvInventory, remembered: [String]?)-.domainsFailed-.toggleDomain(domain: String)-.selectShownDomains(value: Bool)-.domainQuery(text: String)-.toggleItem(key: String)-.sendFrom(source: AppSendSource)-.vaultItems(count: UInt32, newestMs: Int64, nowMs: Int64, selected: [String], passwordIds: [String], passwords: [AppVaultPassword], passwordPicks: Bool)-.togglePasswords(value: Bool)-.togglePassword(key: String)-.selectShownPasswords(value: Bool)-.passwordQuery(text: String)-.vaultSelection(selected: [String])-.confirm-.progress(event: AppTeleportRunEvent)-.finished(report: AppTeleportRunReport)-.back-```--</Tab>-<Tab value="Rust">--```rust-AppPickerEvent::Loaded { entries: Vec<AppCatalogEntry> }-AppPickerEvent::Failed { message: String, cause_texts: Vec<String>, cause_installed: bool }-AppPickerEvent::Query { query: String }-AppPickerEvent::Select { id: String }-AppPickerEvent::Choose { id: Option<String> }-AppPickerEvent::Preselect { entry: AppCatalogEntry, files: Vec<String> }-AppPickerEvent::Move { moves: AppTeleportMove }-AppPickerEvent::Files { files: Vec<String> }-AppPickerEvent::RemoveFile { path: String }-AppPickerEvent::Sensitive { group: AppSensitiveGroup, value: bool }-AppPickerEvent::Plan-AppPickerEvent::Planned { plan: AppTeleportPlan }-AppPickerEvent::Acknowledge { value: bool }-AppPickerEvent::SaveToKeyvault { value: bool }-AppPickerEvent::AcknowledgeRelayPlaintext { value: bool }-AppPickerEvent::DomainsLoaded { inventory: KvInventory, remembered: Option<Vec<String>> }-AppPickerEvent::DomainsFailed-AppPickerEvent::ToggleDomain { domain: String }-AppPickerEvent::SelectShownDomains { value: bool }-AppPickerEvent::DomainQuery { text: String }-AppPickerEvent::ToggleItem { key: String }-AppPickerEvent::SendFrom { source: AppSendSource }-AppPickerEvent::VaultItems { count: u32, newest_ms: i64, now_ms: i64, selected: Vec<String>, password_ids: Vec<String>, passwords: Vec<AppVaultPassword>, password_picks: bool }-AppPickerEvent::TogglePasswords { value: bool }-AppPickerEvent::TogglePassword { key: String }-AppPickerEvent::SelectShownPasswords { value: bool }-AppPickerEvent::PasswordQuery { text: String }-AppPickerEvent::VaultSelection { selected: Vec<String> }-AppPickerEvent::Confirm-AppPickerEvent::Progress { event: AppTeleportRunEvent }-AppPickerEvent::Finished { report: AppTeleportRunReport }-AppPickerEvent::Back-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Loaded` | The catalog arrived. Fields: `entries: Vec<AppCatalogEntry>` |-| `Failed` | Something failed. Fields: `message: String`, `cause_texts: Vec<String>`, `cause_installed: bool` |-| `Query` | Search. Fields: `query: String` |-| `Select` | Highlight. Fields: `id: String` |-| `Choose` | Open the options for the highlighted (or given) app. Fields: `id: Option<String>` |-| `Preselect` | Start on an app (a drop or a window drag). Fields: `entry: AppCatalogEntry`, `files: Vec<String>` |-| `Move` | What moves. Fields: `moves: AppTeleportMove` |-| `Files` | Add files. Fields: `files: Vec<String>` |-| `RemoveFile` | Remove a file. Fields: `path: String` |-| `Sensitive` | An opt-in checkbox ("Keep me signed in", "Saved passwords", ...). Fields: `group: AppSensitiveGroup`, `value: bool` |-| `Plan` | Plan. |-| `Planned` | The plan arrived. Fields: `plan: AppTeleportPlan` |-| `Acknowledge` | The secrets checkbox. Fields: `value: bool` |-| `SaveToKeyvault` | The "Save to Keyvault" checkbox. Fields: `value: bool` |-| `AcknowledgeRelayPlaintext` | The relay-plaintext warning's checkbox (S1). Fields: `value: bool` |-| `DomainsLoaded` | The browser's sites with counts arrived (and what was picked last time for this app and Space, if anything). Fields: `inventory: KvInventory`, `remembered: Option<Vec<String>>` |-| `DomainsFailed` | The inventory could not be read (the review then sends what the plan lists, as before). |-| `ToggleDomain` | Pick or drop one site. Fields: `domain: String` |-| `SelectShownDomains` | Pick or drop every site the search shows. Fields: `value: bool` |-| `DomainQuery` | The sites list's search text. Fields: `text: String` |-| `ToggleItem` | Turn a consent line on or off. Fields: `key: String` |-| `SendFrom` | Where to send from. Fields: `source: AppSendSource` |-| `VaultItems` | The app's saved Keyvault items (what the Keyvault holds for it). Fields: `count: u32`, `newest_ms: i64`, `now_ms: i64`, `selected: Vec<String>`, `password_ids: Vec<String>`, `passwords: Vec<AppVaultPassword>`, `password_picks: bool` |-| `TogglePasswords` | Tick or untick "Also send saved passwords". Fields: `value: bool` |-| `TogglePassword` | Pick or drop one saved password choice (a site, or a saved item's id: `ReviewPassword.key`). Fields: `key: String` |-| `SelectShownPasswords` | Pick or drop every saved password choice the search shows. Fields: `value: bool` |-| `PasswordQuery` | The passwords list's search text. Fields: `text: String` |-| `VaultSelection` | The chosen saved items changed. Fields: `selected: Vec<String>` |-| `Confirm` | Confirm the review. |-| `Progress` | A run event. Fields: `event: AppTeleportRunEvent` |-| `Finished` | The run finished. Fields: `report: AppTeleportRunReport` |-| `Back` | Back. |--## `AppPickerStep` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.loading-.pick-.options-.planning-.consent-.running-.done-.error-```--</Tab>-<Tab value="Rust">--```rust-AppPickerStep::Loading-AppPickerStep::Pick-AppPickerStep::Options-AppPickerStep::Planning-AppPickerStep::Consent-AppPickerStep::Running-AppPickerStep::Done-AppPickerStep::Error-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Loading` | Loading the catalog. |-| `Pick` | Choosing an app. |-| `Options` | Choosing what moves. |-| `Planning` | Planning. |-| `Consent` | Reviewing the consent list. |-| `Running` | Running. |-| `Done` | Done. |-| `Error` | Failed. |--## `AppPickerTab` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.space-.thisMac-```--</Tab>-<Tab value="Rust">--```rust-AppPickerTab::Space-AppPickerTab::ThisMac-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Space` | This machine's windows, teleported into the Space. |-| `ThisMac` | The Space's windows, streamed here. |--## `app_catalog_entries_from_json`--Picker catalog entries from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCatalogEntriesFromJson(json: String) throws -> [AppCatalogEntry]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_catalog_entries_from_json(json: String) -> Result<Vec<AppCatalogEntry>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppCatalogEntry>`](#appcatalogentry-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_catalog_entry`--A catalog row from `Teleport.catalog`, as the picker's entry.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appCatalogEntry(entry: TeleportCatalogEntry) -> AppCatalogEntry-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_catalog_entry(entry: TeleportCatalogEntry) -> AppCatalogEntry-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `entry` | [`TeleportCatalogEntry`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record) | required |--**Returns** [`AppCatalogEntry`](#appcatalogentry-record)--## `app_picker_can_plan`--Planning is possible.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerCanPlan(state: AppPickerState) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_can_plan(state: AppPickerState) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** `bool`--## `app_picker_consent`--The consent the confirmed review carries.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerConsent(state: AppPickerState) -> AppTeleportConsent-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_consent(state: AppPickerState) -> AppTeleportConsent-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** [`AppTeleportConsent`](/cua-sdk/reference/spaces/app-core/teleport-run#appteleportconsent-record)--## `app_picker_event_from_json`--A teleport picker event from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerEventFromJson(json: String) throws -> AppPickerEvent-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_event_from_json(json: String) -> Result<AppPickerEvent, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppPickerEvent`](#apppickerevent-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_picker_initial`--"Teleport an app..." first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerInitial(spaceName: String) -> AppPickerState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_initial(space_name: String) -> AppPickerState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space_name` | `String` | required |--**Returns** [`AppPickerState`](#apppickerstate-record)--## `app_picker_plan_sensitive`--The groups the plan asks for (`TeleportPlanOptions.sensitive_groups`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerPlanSensitive(state: AppPickerState) -> [AppSensitiveGroup]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_plan_sensitive(state: AppPickerState) -> Vec<AppSensitiveGroup>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** [`Vec<AppSensitiveGroup>`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitivegroup-enum)--## `app_picker_primary`--The primary button of the window picker.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerPrimary(tab: AppPickerTab, selectedSupported: Bool?) -> AppPickerPrimary-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_primary(tab: AppPickerTab, selected_supported: Option<bool>) -> AppPickerPrimary-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `tab` | [`AppPickerTab`](#apppickertab-enum) | required |-| `selected_supported` | `Option<bool>` | required |--**Returns** [`AppPickerPrimary`](#apppickerprimary-record)--## `app_picker_progress`--Run progress in `[0, 1]`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerProgress(state: AppPickerState) -> Double-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_progress(state: AppPickerState) -> f64-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** `f64`--## `app_picker_reduce`--Advances the picker.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerReduce(state: AppPickerState, event: AppPickerEvent) -> AppPickerState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_reduce(state: AppPickerState, event: AppPickerEvent) -> AppPickerState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |-| `event` | [`AppPickerEvent`](#apppickerevent-enum) | required |--**Returns** [`AppPickerState`](#apppickerstate-record)--## `app_picker_review`--The review screen, when a plan is under review.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerReview(state: AppPickerState) -> AppReviewView?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_review(state: AppPickerState) -> Option<AppReviewView>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** [`Option<AppReviewView>`](/cua-sdk/reference/spaces/app-core/teleport-review#appreviewview-record)--## `app_picker_sections`--The pick list's sections.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerSections(state: AppPickerState) -> [AppEntrySection]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_sections(state: AppPickerState) -> Vec<AppEntrySection>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** [`Vec<AppEntrySection>`](#appentrysection-record)--## `app_picker_sensitive_options`--The options step's opt-in checkboxes ("Keep me signed in", "Saved-passwords", "Browsing history"), with the signed-in state move chosen.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerSensitiveOptions(state: AppPickerState) -> [AppSensitiveOption]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_sensitive_options(state: AppPickerState) -> Vec<AppSensitiveOption>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** [`Vec<AppSensitiveOption>`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitiveoption-record)--## `app_picker_status`--What the run is doing, in words ("Packing profile", "Uploading 12 /-80 MB"), for the line under the progress bar; none unless running.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appPickerStatus(state: AppPickerState) -> String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_picker_status(state: AppPickerState) -> Option<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppPickerState`](#apppickerstate-record) | required |--**Returns** `Option<String>`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.mdxdeleted file mode 100644index eed279ea2a..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx+++ /dev/null@@ -1,909 +0,0 @@-----title: "This machine"-description: "The This machine roster entry, its page and the host setup form."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_with_this_machine` puts This machine first in the roster. `app_host_panel` derives its page from `app_host_state`; `app_host_form_reduce` and `app_host_form_view` drive the host setup form, whose `request` goes to `app_host_setup` (Swift: `host.setupRequest(...)`).--## `app_with_this_machine`--Adds the "This machine" entry to a roster, first.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appWithThisMachine(spaces: [AppSpace], status: AppHostSummaryInput?, nowMs: Int64) -> [AppSpace]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_with_this_machine(spaces: Vec<AppSpace>, status: Option<AppHostSummaryInput>, now_ms: i64) -> Vec<AppSpace>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |-| `status` | [`Option<AppHostSummaryInput>`](/cua-sdk/reference/spaces/app-core/spaces#apphostsummaryinput-record) | required |-| `now_ms` | `i64` | required |--**Returns** [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record)--## `AppPermissionRow` record--Returned by [`app_host_permission_rows`](#app_host_permission_rows).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Id. |-| `title` | `String` | | "Screen Recording". |-| `help` | `String` | | Tooltip (what to turn on). |-| `settings_url` / `settingsUrl` | `Option<String>` | | The pane (only a `x-apple.systempreferences:` URL is opened). |--## `AppHostAccess` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `at_ms` / `atMs` | `i64` | | Epoch ms. |-| `via` | `String` | | How the caller authenticated: `relay`, `viewer` or `token`. |-| `who` | `String` | | Who (a relay-verified account, a viewer, or the token holder). |-| `what` | `String` | | What they used (a service name such as `ProcessService`, or `MCP`). |--## `AppHostAccessRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `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 |-| --- | --- | --- | --- |-| `id` | [`AppHostActionId`](#apphostactionid-enum) | | What it does. |-| `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--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Account id. |-| `email` | `Option<String>` | | Email. |-| `name` | `Option<String>` | | Display name. |-| `streams` | `Option<u32>` | | Open streams. |--## `AppHostConfirm` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | The question. |-| `message` | `String` | | What happens. |-| `confirm_label` / `confirmLabel` | `String` | | The confirming button. |-| `cancel_label` / `cancelLabel` | `String` | | The other button. |--## `AppHostFormChoice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `desktop` or `spare`. |-| `label` | `String` | | Label. |--## `AppHostFormField` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `name`, `allow`, `direct`, `listen`, `relay`. |-| `label` | `String` | | Label. |-| `placeholder` | `Option<String>` | | Placeholder (text fields). |-| `value` | `String` | | Text. |-| `toggle` | `bool` | | The switch (`direct` only). |-| `on` | `bool` | | On (`direct` only). |-| `invalid` | `bool` | | Drawn as invalid. |-| `advanced` | `bool` | | Under Advanced. |-| `choices` | [`Vec<AppHostFormChoice>`](#apphostformchoice-record) | | A choice of one (`profile` only): `value` is the chosen id. |--## `AppHostFormState` record--Returned by [`app_host_form_initial`](#app_host_form_initial), [`app_host_form_reduce`](#app_host_form_reduce).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | Display name. |-| `allow` | `String` | | "Also allow" (relay). |-| `advanced` | `bool` | | Advanced is open. |-| `direct` | `bool` | | Direct instead of the relay (Advanced). |-| `listen` | `String` | | Direct listen address. |-| `relay_url` / `relayUrl` | `String` | | Relay URL (Advanced). |-| `busy` | `bool` | | Setup is running. |-| `error` | `Option<String>` | | The last failure. |-| `spare` | `bool` | | A spare machine: do not share its desktop, provide Spaces (relay only). |--## `AppHostFormView` record--Returned by [`app_host_form_view`](#app_host_form_view).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Set up this machine". |-| `lede` | `String` | | One line: what setting up does. |-| `fields` | [`Vec<AppHostFormField>`](#apphostformfield-record) | | Visible fields in order (Advanced ones only while it is open). |-| `advanced_label` / `advancedLabel` | `String` | | "Advanced". |-| `advanced_open` / `advancedOpen` | `bool` | | Advanced is open. |-| `back_label` / `backLabel` | `String` | | "Back". |-| `submit_label` / `submitLabel` | `String` | | "Set up for access" or "Setting up…". |-| `can_submit` / `canSubmit` | `bool` | | The submit button is enabled. |-| `busy` | `bool` | | Setup is running. |-| `error` | `Option<String>` | | The last failure, one line. |-| `request` | [`Option<AppHostSetupRequest>`](#apphostsetuprequest-record) | | What host setup receives (validated), when it can submit. |--## `AppHostLimit` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `resource` | `String` | | `spaces` (every Space it provides), `macos_vms` (macOS VMs on that Mac), or `HOST_SHARING_STOPPED` (not a limit: its owner stopped sharing it). |-| `used` | `u32` | | In use now. |-| `limit` | `u32` | | The limit (0: none). |-| `reason` | `String` | | Why the limit exists, for people ("Apple's macOS license allows two macOS VMs per Mac"). |--## `AppHostPanelView` record--Returned by [`app_host_panel`](#app_host_panel).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `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: 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{b7} 2 macOS VMs"), while providing Spaces. |-| `provided_title` / `providedTitle` | `Option<String>` | | "Spaces for your devices", while providing Spaces. |-| `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: 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. |-| `open_settings_label` / `openSettingsLabel` | `String` | | The permission rows' button. |-| `actions` | [`Vec<AppHostAction>`](#apphostaction-record) | | Buttons, primary first. |-| `intro` | `Option<String>` | | Before setup: what this machine is and why set it up. |-| `setup_choices` / `setupChoices` | [`Vec<AppHostSetupChoice>`](#apphostsetupchoice-record) | | Before setup: the ways to set it up, shown inline. |--## `AppHostPermissionInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `screen-recording`, `accessibility`. |-| `title` | `String` | | "Screen Recording". |-| `settings_url` / `settingsUrl` | `Option<String>` | | The pane to open. |-| `instructions` | `Option<String>` | | What to turn on there. |-| `granted` | `bool` | | Already granted. |--## `AppHostProvidedSpace` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `relay_machine` / `relayMachine` | `String` | | The relay machine it is reached as. |-| `local_space` / `localSpace` | `String` | | The Space on this machine (`local:<name>`). |-| `name` | `String` | | Display name. |-| `image` | `String` | | The image. |-| `os` | `String` | | `linux`, `macos`. |-| `kind` | `String` | | `container` or `vm`. |-| `created_by` / `createdBy` | `String` | | Who created it. |-| `created_at_ms` / `createdAtMs` | `i64` | | Epoch ms. |--## `AppHostSettingChange` record--Returned by [`app_host_setting_change`](#app_host_setting_change).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `share_desktop` / `shareDesktop` | `Option<bool>` | | Share this desktop. |-| `provide_spaces` / `provideSpaces` | `Option<bool>` | | Provide Spaces. |--## `AppHostSetupChoice` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The form's profile: `desktop` or `spare`. |-| `label` | `String` | | Label. |-| `button_label` / `buttonLabel` | `String` | | The button that opens the form with this choice. |--## `AppHostSetupRequest` record--Returned by [`app_host_validate_setup`](#app_host_validate_setup).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `mode` | `String` | | `relay` (default) or `direct`. |-| `relay_url` / `relayUrl` | `Option<String>` | | Relay URL; `None` uses the configured default (https://relay.cua.ai). |-| `direct` | `Option<String>` | | Direct `ip:port` (Advanced). |-| `name` | `Option<String>` | | Display name (default: the host name). |-| `allow` | `Option<Vec<String>>` | | Accounts (ids or emails) allowed besides the owner. |-| `profile` | `Option<String>` | | What the machine is for: `desktop` (share this desktop; the default) or `spare` (only run Spaces for your other devices). |-| `share_desktop` / `shareDesktop` | `Option<bool>` | | Share this machine's own desktop (overrides the profile). |-| `provide_spaces` / `provideSpaces` | `Option<bool>` | | Create Spaces for your other devices (overrides the profile). |--## `AppHostSpacesAudit` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `at_ms` / `atMs` | `i64` | | Epoch ms. |-| `action` | `String` | | `create`, `delete`, `refused`, `failed`, `config`. |-| `who` | `String` | | Who (an account, or `local`). |-| `space` | `String` | | The relay machine or Space. |-| `detail` | `String` | | Detail. |--## `AppHostState` record--Returned by [`app_host_state`](#app_host_state), [`app_host_state_from_json`](#app_host_state_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `configured` | `bool` | | Set up for access. |-| `mode` | `Option<String>` | | `relay` or `direct`. |-| `relay_url` / `relayUrl` | `Option<String>` | | Relay URL. |-| `direct_url` / `directUrl` | `Option<String>` | | Direct URL. |-| `name` | `Option<String>` | | Display name. |-| `sharing` | `bool` | | Accepting clients. |-| `service_installed` / `serviceInstalled` | `bool` | | Service installed. |-| `service_running` / `serviceRunning` | `bool` | | Service running. |-| `service_kind` / `serviceKind` | `String` | | `launchd`, `systemd`, `windows-task`, `process`. |-| `online` | `Option<bool>` | | Online at the relay. |-| `clients` | [`Vec<AppHostClient>`](#apphostclient-record) | | Connected now. |-| `permissions` | [`Vec<AppHostPermissionInput>`](#apphostpermissioninput-record) | | Panes to grant. |-| `error` | `Option<String>` | | Needs attention. |-| `recent_access` / `recentAccess` | [`Vec<AppHostAccess>`](#apphostaccess-record) | | Who reached this machine recently, newest first. |-| `access_log_error` / `accessLogError` | `Option<String>` | | Set when the access log does not verify (edited or truncated). |-| `share_desktop` / `shareDesktop` | `bool` | | This machine's own desktop is a Space. |-| `provide_spaces` / `provideSpaces` | `bool` | | This machine creates Spaces for your other devices. |-| `max_spaces` / `maxSpaces` | `u32` | | Provided Spaces at once (0: no limit). |-| `max_macos_vms` / `maxMacosVms` | `u32` | | macOS VMs at once (at most two; 0 off a Mac). |-| `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--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `desktop` or `spaces`. |-| `label` | `String` | | Label. |-| `help` | `String` | | One line under it. |-| `on` | `bool` | | On now. |-| `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>-<Tab value="Swift">--```swift-.setUp-.stopSharing-.resumeSharing-.remove-.shareDesktop-.hideDesktop-.provideSpaces-.stopProvidingSpaces-.signIn-```--</Tab>-<Tab value="Rust">--```rust-AppHostActionId::SetUp-AppHostActionId::StopSharing-AppHostActionId::ResumeSharing-AppHostActionId::Remove-AppHostActionId::ShareDesktop-AppHostActionId::HideDesktop-AppHostActionId::ProvideSpaces-AppHostActionId::StopProvidingSpaces-AppHostActionId::SignIn-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SetUp` | Open the host setup form. |-| `StopSharing` | Cut clients and refuse new ones. |-| `ResumeSharing` | Accept clients again. |-| `Remove` | Unregister and uninstall the service. |-| `ShareDesktop` | Share this machine's own desktop. |-| `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--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.setName(name: String)-.setAllow(allow: String)-.toggleAdvanced-.setDirect(on: Bool)-.setListen(listen: String)-.setRelayUrl(url: String)-.setProfile(profile: String)-.submit-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppHostFormAction::SetName { name: String }-AppHostFormAction::SetAllow { allow: String }-AppHostFormAction::ToggleAdvanced-AppHostFormAction::SetDirect { on: bool }-AppHostFormAction::SetListen { listen: String }-AppHostFormAction::SetRelayUrl { url: String }-AppHostFormAction::SetProfile { profile: String }-AppHostFormAction::Submit-AppHostFormAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SetName` | Name typed. Fields: `name: String` |-| `SetAllow` | "Also allow" typed. Fields: `allow: String` |-| `ToggleAdvanced` | Advanced opened or closed. |-| `SetDirect` | "Direct connection" switched. Fields: `on: bool` |-| `SetListen` | Listen address typed. Fields: `listen: String` |-| `SetRelayUrl` | Relay URL typed. Fields: `url: String` |-| `SetProfile` | What the machine is for: `desktop` or `spare`. Fields: `profile: 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-(`arm64`, `amd64`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostArch() -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_arch() -> String-```--</Tab>-</Tabs>--**Returns** `String`--## `app_host_form_action_from_json`--A host setup form action from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostFormActionFromJson(json: String) throws -> AppHostFormAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_form_action_from_json(json: String) -> Result<AppHostFormAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppHostFormAction`](#apphostformaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_host_form_initial`--The host setup form's first state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostFormInitial() -> AppHostFormState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_form_initial() -> AppHostFormState-```--</Tab>-</Tabs>--**Returns** [`AppHostFormState`](#apphostformstate-record)--## `app_host_form_reduce`--Advances the host setup form.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostFormReduce(state: AppHostFormState, action: AppHostFormAction) -> AppHostFormState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_form_reduce(state: AppHostFormState, action: AppHostFormAction) -> AppHostFormState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppHostFormState`](#apphostformstate-record) | required |-| `action` | [`AppHostFormAction`](#apphostformaction-enum) | required |--**Returns** [`AppHostFormState`](#apphostformstate-record)--## `app_host_form_view`--The host setup form as drawn (`identity`: the signed-in account).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostFormView(state: AppHostFormState, identity: String?) -> AppHostFormView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_form_view(state: AppHostFormState, identity: Option<String>) -> AppHostFormView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppHostFormState`](#apphostformstate-record) | required |-| `identity` | `Option<String>` | required |--**Returns** [`AppHostFormView`](#apphostformview-record)--## `app_host_looks_like_listen`--Whether a direct-mode address is `ip:port` or `host:port`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostLooksLikeListen(value: String) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_looks_like_listen(value: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `value` | `String` | required |--**Returns** `bool`--## `app_host_panel`--The "This machine" page (`None` while the host status loads).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostPanel(state: AppHostState?) -> AppHostPanelView-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_panel(state: Option<AppHostState>) -> AppHostPanelView-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`Option<AppHostState>`](#apphoststate-record) | required |--**Returns** [`AppHostPanelView`](#apphostpanelview-record)--## `app_host_parse_allow_list`--Comma or space separated accounts, as the host setup form's "Also allow".--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostParseAllowList(value: String) -> [String]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_parse_allow_list(value: String) -> Vec<String>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `value` | `String` | required |--**Returns** `Vec<String>`--## `app_host_permission_rows`--Permission panes still to grant, as rows.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostPermissionRows(permissions: [AppHostPermissionInput]) -> [AppPermissionRow]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_permission_rows(permissions: Vec<AppHostPermissionInput>) -> Vec<AppPermissionRow>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `permissions` | [`Vec<AppHostPermissionInput>`](#apphostpermissioninput-record) | required |--**Returns** [`Vec<AppPermissionRow>`](#apppermissionrow-record)--## `app_host_setting_change`--The settings change a host toggle action runs (`None` for the other-actions): pass it to `Host.configure`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostSettingChange(id: AppHostActionId) -> AppHostSettingChange?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_setting_change(id: AppHostActionId) -> Option<AppHostSettingChange>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | [`AppHostActionId`](#apphostactionid-enum) | required |--**Returns** [`Option<AppHostSettingChange>`](#apphostsettingchange-record)--## `app_host_setup`--Host setup from the first-run form, as both Spaces apps send it:-validated by the app core (`app_host_validate_setup`), then the SDK's-`Host.setup` (the Swift app calls it as `host.setupRequest(...)`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostSetup(host: Host, request: AppHostSetupRequest, accountToken: String?) async throws -> HostStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn app_host_setup(host: Arc<Host>, request: AppHostSetupRequest, account_token: Option<String>) -> Result<HostStatus, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `host` | [`Host`](/cua-sdk/reference/spaces/host#host) | required |-| `request` | [`AppHostSetupRequest`](#apphostsetuprequest-record) | required |-| `account_token` | `Option<String>` | required |--**Returns** [`HostStatus`](/cua-sdk/reference/spaces/host#hoststatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_host_state`--The cua SDK's host status as the app core reads it.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostState(status: HostStatus) -> AppHostState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_state(status: HostStatus) -> AppHostState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `status` | [`HostStatus`](/cua-sdk/reference/spaces/host#hoststatus-record) | required |--**Returns** [`AppHostState`](#apphoststate-record)--## `app_host_state_from_json`--A host state from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostStateFromJson(json: String) throws -> AppHostState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_state_from_json(json: String) -> Result<AppHostState, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppHostState`](#apphoststate-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_host_summary_input`--What the sidebar row's summary reads from a host state.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostSummaryInput(state: AppHostState) -> AppHostSummaryInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_summary_input(state: AppHostState) -> AppHostSummaryInput-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppHostState`](#apphoststate-record) | required |--**Returns** [`AppHostSummaryInput`](/cua-sdk/reference/spaces/app-core/spaces#apphostsummaryinput-record)--## `app_host_validate_setup`--Normalises and checks a host setup request (the Tauri app's-`host_setup` runs the same check before any service is touched).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appHostValidateSetup(request: AppHostSetupRequest) throws -> AppHostSetupRequest-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_host_validate_setup(request: AppHostSetupRequest) -> Result<AppHostSetupRequest, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `request` | [`AppHostSetupRequest`](#apphostsetuprequest-record) | required |--**Returns** [`AppHostSetupRequest`](#apphostsetuprequest-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdxdeleted file mode 100644index 2757a1b162..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdx+++ /dev/null@@ -1,969 +0,0 @@-----title: "Window, menu bar and Settings"-description: "The window chrome, a Space's toolbar and sections, the menu bar menu and Settings."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_main_chrome`, `app_menu_bar` and `app_settings_page` give the window chrome, the menu bar menu and the Settings page. `app_space_detail_copy` holds the words of a Space's sections. The coding agents' rows of Settings are on [Settings, Agents](/cua-sdk/reference/spaces/app-core/agent-keys). `app_login_item_launch_plan` decides when the apps turn on launch at login by themselves.--## `app_display_name`--A Space name as shown: as typed, trimmed.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDisplayName(name: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_display_name(name: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `name` | `String` | required |--**Returns** `String`--## `app_display_path`--Home-relative path (`~/x`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDisplayPath(path: String, home: String?) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_display_path(path: String, home: Option<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `path` | `String` | required |-| `home` | `Option<String>` | required |--**Returns** `String`--## `app_format_bytes`--"12 MB".--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appFormatBytes(bytes: UInt64) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_format_bytes(bytes: u64) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `bytes` | `u64` | required |--**Returns** `String`--## `AppFact` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | Label. |-| `value` | `String` | | Value. |-| `copy` | [`Option<AppFactCopy>`](#appfactcopy-record) | | A copy button after the value (the Space's identifier and image). |-| `help` | `Option<String>` | | The tooltip: the full value (and an image's digest). |-| `warning` | [`Option<AppFactWarning>`](/cua-sdk/reference/spaces/app-core/spaces#appfactwarning-record) | | A warning symbol after the value, with its tooltip: a local Space emulating another architecture. |--## `AppFactCopy` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `text` | `String` | | What is copied (the full value). |-| `symbol` | `String` | | SF Symbol (`doc.on.doc`). |-| `help` | `String` | | Tooltip and accessibility label ("Copy"). |-| `done_symbol` / `doneSymbol` | `String` | | The symbol while confirming (`checkmark`). |-| `done_help` / `doneHelp` | `String` | | The tooltip while confirming ("Copied"). |-| `confirm_ms` / `confirmMs` | `u32` | | How long the confirmation shows, in milliseconds. |--## `app_delete_failed_text`--The banner when Delete fails.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDeleteFailedText(name: String, error: String) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_delete_failed_text(name: String, error: String) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `name` | `String` | required |-| `error` | `String` | required |--**Returns** `String`--## `AppDetailCopy` record--Returned by [`app_space_detail_copy`](#app_space_detail_copy).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `stream_loading` / `streamLoading` | `String` | | "Looking for this Space's windows…" |-| `stream_empty` / `streamEmpty` | `String` | | "No open windows in this Space yet." |-| `stream_failed` / `streamFailed` | `String` | | When the window list could not be read. |-| `stream_no_match` / `streamNoMatch` | `String` | | When a filter hides every window. |-| `agents_loading` / `agentsLoading` | `String` | | "Looking for this Space's agents…" |-| `agents_empty` / `agentsEmpty` | `String` | | "No agents have been started in this Space." |-| `agents_failed` / `agentsFailed` | `String` | | When the runs could not be read (not the same as none). |-| `agents_no_match` / `agentsNoMatch` | `String` | | When a filter hides every run. |-| `drop_caption` / `dropCaption` | `String` | | The drop well's caption. |-| `send_file` / `sendFile` | `String` | | "Send file…" |-| `teleport_app` / `teleportApp` | `String` | | "Teleport an app…" |-| `teleport_symbol` / `teleportSymbol` | `String` | | The teleport icon (`TELEPORT_SYMBOL`). |-| `teleport_symbol_active` / `teleportSymbolActive` | `String` | | The teleport icon while a drag is over a drop target. |--## `app_space_detail_copy`--The words of a Space's sections (Stream, Agents, Teleport).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSpaceDetailCopy() -> AppDetailCopy-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_space_detail_copy() -> AppDetailCopy-```--</Tab>-</Tabs>--**Returns** [`AppDetailCopy`](#appdetailcopy-record)--## `AppDetailAction` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | [`AppDetailActionId`](#appdetailactionid-enum) | | What it does. |-| `label` | `String` | | Label. |-| `symbol` | `Option<String>` | | SF Symbol (icon buttons). |-| `help` | `String` | | Tooltip. |-| `enabled` | `bool` | | Enabled. |-| `destructive` | `bool` | | Drawn as destructive. |-| `primary` | `bool` | | The prominent one. |-| `busy` | `bool` | | Its action runs: a spinner in place of the icon. |--## `AppDetailActionId` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.teleport-.pip-.share-.power-.delete-.open-.cancel-```--</Tab>-<Tab value="Rust">--```rust-AppDetailActionId::Teleport-AppDetailActionId::Pip-AppDetailActionId::Share-AppDetailActionId::Power-AppDetailActionId::Delete-AppDetailActionId::Open-AppDetailActionId::Cancel-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Teleport` | "Teleport an app…" into the Space. |-| `Pip` | The desktop in a picture-in-picture panel. |-| `Share` | "Share": let another cua.ai account watch or edit the Space. |-| `Power` | Turn it off or on (the power button, next to Delete). |-| `Delete` | Delete (or remove from the list). |-| `Open` | The desktop in its own window. |-| `Cancel` | Stop a create that is still running and remove what it made. |--## `AppDeleteConfirm` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Delete Brave Otter?" |-| `message` | `String` | | What it means, one line. |-| `confirm_label` / `confirmLabel` | `String` | | The destructive button. |-| `confirm_enabled` / `confirmEnabled` | `bool` | | The destructive button can be pressed (a Space in your cloud that another device created cannot be deleted from here). |-| `disabled_reason` / `disabledReason` | `Option<String>` | | Why not, beside the disabled button. |-| `remove_label` / `removeLabel` | `Option<String>` | | For a Space in your cloud: "Remove from List", which forgets it and keeps it running there (`remove_space`). |-| `cancel_label` / `cancelLabel` | `String` | | "Keep" (or "Cancel" beside Remove from List). |--## `AppSentFileInfo` record--Returned by [`app_sent_file`](#app_sent_file), [`app_sent_files_from_json`](#app_sent_files_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | File name. |-| `dest` | `String` | | Where it landed in the Space. |-| `bytes` | `u64` | | Bytes. |--## `app_sent_file`--A `send_file` report as the files the drop well names.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSentFile(report: SpaceSendFileReport) -> AppSentFileInfo-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_sent_file(report: SpaceSendFileReport) -> AppSentFileInfo-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `report` | [`SpaceSendFileReport`](/cua-sdk/reference/spaces/space#spacesendfilereport-record) | required |--**Returns** [`AppSentFileInfo`](#appsentfileinfo-record)--## `app_sent_files_from_json`--Sent files from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSentFilesFromJson(json: String) throws -> [AppSentFileInfo]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_sent_files_from_json(json: String) -> Result<Vec<AppSentFileInfo>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`Vec<AppSentFileInfo>`](#appsentfileinfo-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_drop_sending_text`--The drop well's line while files go.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDropSendingText(paths: [String]) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drop_sending_text(paths: Vec<String>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `paths` | `Vec<String>` | required |--**Returns** `String`--## `app_drop_sent_text`--The drop well's line once they landed.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDropSentText(files: [AppSentFileInfo]) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drop_sent_text(files: Vec<AppSentFileInfo>) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `files` | [`Vec<AppSentFileInfo>`](#appsentfileinfo-record) | required |--**Returns** `String`--## `AppSignInPhase` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.idle-.starting-.waiting(userCode: String?)-.failed(message: String)-```--</Tab>-<Tab value="Rust">--```rust-AppSignInPhase::Idle-AppSignInPhase::Starting-AppSignInPhase::Waiting { user_code: Option<String> }-AppSignInPhase::Failed { message: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Idle` | Nothing started. |-| `Starting` | Asking for a code. |-| `Waiting` | The browser is open. Fields: `user_code: Option<String>` |-| `Failed` | It failed. Fields: `message: String` |--## `AppTelemetryInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `enabled` | `bool` | | Usage data is shared. |-| `locked_by` / `lockedBy` | `Option<String>` | | The environment decides (`DO_NOT_TRACK`, `CUA_TELEMETRY`, CI): who. |-| `notice_shown` / `noticeShown` | `bool` | | The first-run usage notice was already shown on this machine (by `cua`, or an earlier run of the app): events may be sent before Welcome is left. |--## `app_menu`--The menu bar item's menu: the Spaces the user can open (the notch's-count), Cua Volume's sync state next to it and its conflicts, then the-actions.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMenu(input: AppMenuInput) -> [AppMenuItem]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_menu(input: AppMenuInput) -> Vec<AppMenuItem>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppMenuInput`](#appmenuinput-record) | required |--**Returns** [`Vec<AppMenuItem>`](#appmenuitem-record)--## `AppMenuInput` record--Returned by [`app_menu_input_from_json`](#app_menu_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | | The roster (with "This machine"). |-| `keyvault` | `Option<String>` | | Live Keyvault sign-ins (`crate.keyvault.view.sharing_label`). |-| `sync` | [`Option<AppDriveSyncInput>`](/cua-sdk/reference/spaces/volume-app-core#appdrivesyncinput-record) | | Cua Volume's `volume_sync_status`, when read. |-| `now_ms` / `nowMs` | `u64` | | Now (Unix ms): a feed that has not answered for `OFFLINE_AFTER_MS` is offline. |-| `backend` | `Option<String>` | | `volume_storage`'s backend (`fs`, `s3`), when read: this machine's store with no other device has nothing to sync. |-| `experiments` | [`Option<AppExperiments>`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments: Cua Volume's sync state and conflicts only with Cua Volume on (none: shown, for callers that predate experiments). Off hides them; the volume keeps syncing. |--## `app_menu_input_from_json`--The menu bar item's menu input from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMenuInputFromJson(json: String) throws -> AppMenuInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppMenuInput`](#appmenuinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_openable_count`--The Spaces the user can open (the notch tab and the menu bar item).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appOpenableCount(spaces: [AppSpace]) -> UInt32-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_openable_count(spaces: Vec<AppSpace>) -> u32-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |--**Returns** `u32`--## `AppChromeInput` record--Returned by [`app_chrome_input_from_json`](#app_chrome_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `identity` | `Option<String>` | | The signed-in account. |-| `cloud_configured` / `cloudConfigured` | `bool` | | Cua Cloud works (signed in, or client credentials). |-| `can_sign_in` / `canSignIn` | `bool` | | Signing in is possible here (the native shell). |-| `experiments` | [`Option<AppExperiments>`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments: the Volume page only with Cua Volume on (none: every page, for callers that predate experiments). |--## `AppLoginItemInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `status` | [`AppLoginItemStatus`](#apploginitemstatus-enum) | | What the system reports. |-| `busy` | `bool` | | A change is running. |-| `error` | `Option<String>` | | Why the last change failed. |-| `provides_spaces` / `providesSpaces` | `bool` | | This machine provides Spaces to your other devices (host setup's "A spare machine for Spaces"). |-| `runs_agents` / `runsAgents` | `bool` | | This machine runs persistent agents. |--## `AppLoginItemPlan` record--Returned by [`app_login_item_launch_plan`](#app_login_item_launch_plan).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `register` | `bool` | | Register the app as a login item now. |-| `record` | `Option<bool>` | | Save this as the user's choice (`AppSettings::launch_at_login`). |--## `AppMainChrome` record--Returned by [`app_main_chrome`](#app_main_chrome).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | Window title when nothing is selected. |-| `new_space_label` / `newSpaceLabel` | `String` | | "New Space". |-| `new_space_shortcut` / `newSpaceShortcut` | `String` | | "⌘N". |-| `search_placeholder` / `searchPlaceholder` | `String` | | The sidebar search's placeholder. |-| `keyvault_title` / `keyvaultTitle` | `String` | | The Keyvault section's title. |-| `account` | `String` | | The account line: the identity, "API key" or "Not signed in". |-| `sign_in_label` / `signInLabel` | `Option<String>` | | "Sign in", when signing in is offered. |-| `settings_label` / `settingsLabel` | `String` | | "Settings". |-| `settings_shortcut` / `settingsShortcut` | `String` | | "⌘,". |-| `empty_title` / `emptyTitle` | `String` | | With no Spaces: the heading. |-| `empty_action` / `emptyAction` | `String` | | With no Spaces: the default Linux Space's tile. |-| `empty_linux_detail` / `emptyLinuxDetail` | `String` | | Under it: the time and disk. |-| `empty_detail` / `emptyDetail` | `String` | | With no Spaces: the line under the heading. |-| `empty_macos_action` / `emptyMacosAction` | `String` | | With no Spaces: the default macOS Space's tile. |-| `empty_macos_detail` / `emptyMacosDetail` | `String` | | Under it: the download size. |-| `volume_label` / `volumeLabel` | `Option<String>` | | The sidebar's Volume page entry ("Volume"); none while the Cua Volume experiment is off (the page and its route are hidden; a mounted volume stays mounted). |--## `AppMenuItem` record--Returned by [`app_menu`](#app_menu), [`app_menu_bar`](#app_menu_bar), [`app_menu_bar_with_keyvault`](#app_menu_bar_with_keyvault).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | [`AppMenuItemId`](#appmenuitemid-enum) | | What it does. |-| `label` | `String` | | Label (empty for a separator). |-| `shortcut` | `Option<String>` | | "⌘,", "⌘Q". |-| `enabled` | `bool` | | Enabled. |--## `AppSettingsInput` record--Returned by [`app_settings_input_from_json`](#app_settings_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `identity` | `Option<String>` | | The signed-in account. |-| `api_key_client` / `apiKeyClient` | `Option<String>` | | Cua Cloud through client credentials (an API key): its client id. |-| `sign_in` / `signIn` | [`AppSignInPhase`](#appsigninphase-enum) | | The sign-in in progress. |-| `can_sign_out` / `canSignOut` | `bool` | | Signing out is possible (a user session). |-| `menu_bar` / `menuBar` | `bool` | | The Spaces tab is hidden from the notch (the menu bar item is the entry point). |-| `default_location` / `defaultLocation` | [`AppLocation`](/cua-sdk/reference/spaces/app-core/new-space#applocation-enum) | | Where New Space starts. |-| `location_locked_by` / `locationLockedBy` | `Option<String>` | | The environment sets the default location: which variable. |-| `telemetry` | [`Option<AppTelemetryInput>`](#apptelemetryinput-record) | | The telemetry switch (none until read). |-| `agents` | [`Option<Vec<AppAgentSettingsRow>>`](/cua-sdk/reference/spaces/app-core/agent-keys#appagentsettingsrow-record) | | Coding agents (none while detecting). |-| `agents_busy` / `agentsBusy` | `bool` | | "Configure all" is running. |-| `agents_pending` / `agentsPending` | `Vec<String>` | | Agents with an action running. |-| `teams` | [`Option<AppTeamsInput>`](/cua-sdk/reference/spaces/account-app-core#appteamsinput-record) | | Teams from the Spaces API (the host reads them), with the account app's URL. None: the Teams section shows the production account app's links only. |-| `billing` | [`Option<AppBillingStatus>`](/cua-sdk/reference/spaces/account-app-core#appbillingstatus-record) | | The account's Cua Cloud billing, once read (signed in). |-| `login_item` / `loginItem` | [`Option<AppLoginItemInput>`](#apploginiteminput-record) | | Launch at login, once the system was asked (none: no rows). |-| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments (what the page mentions follows them). |-| `keyvault_auto_wipe` / `keyvaultAutoWipe` | `Option<bool>` | | The Keyvault's auto-wipe, once the broker told it (none: no Keyvault section). |-| `keyvault_unlock_prompt` / `keyvaultUnlockPrompt` | `Option<bool>` | | The unlock prompt shows (false once the user chose "Never ask again"); none until the broker told it. |-| `keyvault_site_icons` / `keyvaultSiteIcons` | `bool` | | Load site icons from Google when the browser had none (`AppSettings.keyvault_site_icons`). |-| `keyvault_protection` / `keyvaultProtection` | [`Vec<AppFact>`](#appfact-record) | | The Keyvault's protection facts (Touch ID, the daemon's signature), shown in the section. |-| `auto_connect` / `autoConnect` | `Option<bool>` | | "Connect to the desktop automatically" (none: no row; a shell without the preview cover leaves it out). |-| `lume_source` / `lumeSource` | `Option<String>` | | Which Lume macOS Spaces run on (`runtime.lume`: `auto`, `builtin`, `system`); none: no Runtimes section. |-| `linux_source` / `linuxSource` | `Option<String>` | | Which engine local Linux Spaces run on (`runtime.linux`: `auto`, `builtin`, `system`); none: no Linux row. |--## `AppSettingsOption` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `show`, `hide`, `local`, `cloud`, `on`, `off`. |-| `label` | `String` | | Label. |-| `active` | `bool` | | Chosen. |--## `AppSettingsPage` record--Returned by [`app_experiments_page`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_page), [`app_settings_page`](#app_settings_page), [`app_settings_with_storage`](/cua-sdk/reference/spaces/app-core/experiments#app_settings_with_storage).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `title` | `String` | | "Settings". |-| `sections` | [`Vec<AppSettingsSection>`](#appsettingssection-record) | | Account, General, Privacy (once read), AI agents. |--## `AppSettingsRow` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Stable id (`account`, `sign-in`, `notch`, `agent:codex`, ...). |-| `kind` | [`AppSettingsRowKind`](#appsettingsrowkind-enum) | | How it draws. |-| `label` | `String` | | Label (or the note's text). |-| `value` | `Option<String>` | | Muted value. |-| `button` | `Option<String>` | | A button's label. |-| `options` | [`Vec<AppSettingsOption>`](#appsettingsoption-record) | | A choice's options. |-| `enabled` | `bool` | | The button or choice can be used. |-| `help` | `Option<String>` | | Tooltip. |-| `link_label` / `linkLabel` | `Option<String>` | | A note's link: label. |-| `link_url` / `linkUrl` | `Option<String>` | | A note's link: URL (or what a Text row's button opens). |-| `placeholder` | `Option<String>` | | A field's placeholder. |--## `AppSettingsSection` record--Returned by [`app_storage_section`](/cua-sdk/reference/spaces/volume-app-core#app_storage_section).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `account`, `general`, `privacy`, `agents`. |-| `title` | `String` | | "Account", "General", "Privacy", "AI agents". |-| `button` | `Option<String>` | | A button in the header. |-| `button_enabled` / `buttonEnabled` | `bool` | | That button can be used. |-| `button_help` / `buttonHelp` | `Option<String>` | | Its tooltip. |-| `rows` | [`Vec<AppSettingsRow>`](#appsettingsrow-record) | | Rows. |--## `AppLoginItemStatus` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.enabled-.notRegistered-.requiresApproval-.notFound-```--</Tab>-<Tab value="Rust">--```rust-AppLoginItemStatus::Enabled-AppLoginItemStatus::NotRegistered-AppLoginItemStatus::RequiresApproval-AppLoginItemStatus::NotFound-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Enabled` | Registered and allowed: the app opens at login. |-| `NotRegistered` | Not registered. |-| `RequiresApproval` | Registered, waiting for the user to allow it in System Settings, Login Items. |-| `NotFound` | The system cannot find the app as a login item. |--## `AppMenuItemId` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.status-.separator-.open-.newSpace-.settings-.quit-.volumeConflicts-```--</Tab>-<Tab value="Rust">--```rust-AppMenuItemId::Status-AppMenuItemId::Separator-AppMenuItemId::Open-AppMenuItemId::NewSpace-AppMenuItemId::Settings-AppMenuItemId::Quit-AppMenuItemId::VolumeConflicts-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Status` | The status line (disabled). |-| `Separator` | A separator. |-| `Open` | Show the main window. |-| `NewSpace` | The New Space sheet. |-| `Settings` | Settings. |-| `Quit` | Quit. |-| `VolumeConflicts` | Cua Volume's conflicts: opens the Volume page. |--## `AppSettingsRowKind` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.text-.choice-.note-.error-.field-.secret-.prompt-.link-.toggle-```--</Tab>-<Tab value="Rust">--```rust-AppSettingsRowKind::Text-AppSettingsRowKind::Choice-AppSettingsRowKind::Note-AppSettingsRowKind::Error-AppSettingsRowKind::Field-AppSettingsRowKind::Secret-AppSettingsRowKind::Prompt-AppSettingsRowKind::Link-AppSettingsRowKind::Toggle-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Text` | Label, value and an optional button. |-| `Choice` | Label and a segmented choice. |-| `Note` | A muted line (with an optional link). |-| `Error` | An error line. |-| `Field` | Label and a text field (`value` is its text). |-| `Secret` | Label and a secure text field (`value` is its text). |-| `Prompt` | A label over read-only text to copy (`value`), with a Copy button. |-| `Link` | A small link-style button (the label). |-| `Toggle` | Label and a switch: `options` are `on` and `off`, the active one is its state (a choice drawn as a switch). |--## `app_chrome_input_from_json`--The chrome's input from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appChromeInputFromJson(json: String) throws -> AppChromeInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_chrome_input_from_json(json: String) -> Result<AppChromeInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppChromeInput`](#appchromeinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_login_item_launch_plan`--What the app does about launch at login at launch (the user's choice,-whether the first run finished, whether this machine provides Spaces or-runs persistent agents, and what the system reports).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appLoginItemLaunchPlan(choice: Bool?, onboarded: Bool, serves: Bool, status: AppLoginItemStatus) -> AppLoginItemPlan-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_login_item_launch_plan(choice: Option<bool>, onboarded: bool, serves: bool, status: AppLoginItemStatus) -> AppLoginItemPlan-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `choice` | `Option<bool>` | required |-| `onboarded` | `bool` | required |-| `serves` | `bool` | required |-| `status` | [`AppLoginItemStatus`](#apploginitemstatus-enum) | required |--**Returns** [`AppLoginItemPlan`](#apploginitemplan-record)--## `app_main_chrome`--The main window's chrome (account line, New Space, empty state).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMainChrome(input: AppChromeInput) -> AppMainChrome-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_main_chrome(input: AppChromeInput) -> AppMainChrome-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppChromeInput`](#appchromeinput-record) | required |--**Returns** [`AppMainChrome`](#appmainchrome-record)--## `app_menu_bar`--The menu bar item's menu.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMenuBar(spaces: UInt32) -> [AppMenuItem]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_menu_bar(spaces: u32) -> Vec<AppMenuItem>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | `u32` | required |--**Returns** [`Vec<AppMenuItem>`](#appmenuitem-record)--## `app_menu_bar_with_keyvault`--The menu bar item's menu with the live Keyvault sharing line-(`kv_sharing_label`) when there is one.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMenuBarWithKeyvault(spaces: UInt32, keyvault: String?) -> [AppMenuItem]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_menu_bar_with_keyvault(spaces: u32, keyvault: Option<String>) -> Vec<AppMenuItem>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `spaces` | `u32` | required |-| `keyvault` | `Option<String>` | required |--**Returns** [`Vec<AppMenuItem>`](#appmenuitem-record)--## `app_settings_input_from_json`--The Settings page's input from JSON (parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsInputFromJson(json: String) throws -> AppSettingsInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_input_from_json(json: String) -> Result<AppSettingsInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppSettingsInput`](#appsettingsinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_settings_page`--The Settings page.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appSettingsPage(input: AppSettingsInput) -> AppSettingsPage-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_settings_page(input: AppSettingsInput) -> AppSettingsPage-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppSettingsInput`](#appsettingsinput-record) | required |--**Returns** [`AppSettingsPage`](#appsettingspage-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/cloud.mdx b/docs/content/docs/cua-sdk/reference/spaces/cloud.mdxdeleted file mode 100644index f9944ed633..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/cloud.mdx+++ /dev/null@@ -1,431 +0,0 @@-----title: "Your cloud"-description: "Sandboxes and Spaces in your own AWS, Google Cloud or Modal account: connect, check, and sweep what Cua created there."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--Create a sandbox or Space with `on="aws"`, `"gcp"` or `"modal"` once the cloud is connected. Each cloud uses its own CLI sign-in; Cua stores only the profile, region, project or environment names. The guest dials out to the cua.ai relay, so nothing listens on the internet. `cloud_test` creates nothing; `cloud_sweep` deletes only what Cua tagged and recorded.--## Your cloud--Methods of [`Spaces`](/cua-sdk/reference/spaces#spaces).--### `Spaces.cloud_status`--Your clouds: found credentials, the connected account and region,-what each can run at what hourly cost, and what Cua created there.-`provider` narrows it to one cloud.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def cloud_status(self, provider: Optional[str]) -> CloudStatus-```--</Tab>-<Tab value="TypeScript">--```ts-cloudStatus(provider: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<CloudStatus>-```--</Tab>-<Tab value="Swift">--```swift-func cloudStatus(provider: String?) async throws -> CloudStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun cloudStatus(provider: String?): CloudStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn cloud_status(&self, provider: Option<String>) -> Result<CloudStatus, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `provider` | `Option<String>` | required |--**Returns** [`CloudStatus`](#cloudstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.cloud_connect`--Connects a cloud account (after the checks `cloud_test` runs). With-`make_default`, Spaces are created there when no location is given.-`ttl_hours` (default 8, 0: never) deletes each Space there after-that long.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def cloud_connect(self, target: CloudTarget, make_default: bool, ttl_hours: Optional[int]) -> CloudConnected-```--</Tab>-<Tab value="TypeScript">--```ts-cloudConnect(target: CloudTarget, makeDefault: boolean, ttlHours: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<CloudConnected>-```--</Tab>-<Tab value="Swift">--```swift-func cloudConnect(target: CloudTarget, makeDefault: Bool, ttlHours: UInt32?) async throws -> CloudConnected-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun cloudConnect(target: CloudTarget, makeDefault: Boolean, ttlHours: UInt?): CloudConnected-```--</Tab>-<Tab value="Rust">--```rust-pub async fn cloud_connect(&self, target: CloudTarget, make_default: bool, ttl_hours: Option<u32>) -> Result<CloudConnected, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `target` | [`CloudTarget`](#cloudtarget-record) | required |-| `make_default` | `bool` | required |-| `ttl_hours` | `Option<u32>` | required |--**Returns** [`CloudConnected`](#cloudconnected-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.cloud_test`--Checks a cloud account without creating anything.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def cloud_test(self, target: CloudTarget) -> CloudTestReport-```--</Tab>-<Tab value="TypeScript">--```ts-cloudTest(target: CloudTarget, asyncOpts_?: { signal: AbortSignal }): Promise<CloudTestReport>-```--</Tab>-<Tab value="Swift">--```swift-func cloudTest(target: CloudTarget) async throws -> CloudTestReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun cloudTest(target: CloudTarget): CloudTestReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn cloud_test(&self, target: CloudTarget) -> Result<CloudTestReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `target` | [`CloudTarget`](#cloudtarget-record) | required |--**Returns** [`CloudTestReport`](#cloudtestreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.cloud_disconnect`--Forgets a connected cloud (nothing in it is deleted).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def cloud_disconnect(self, provider: str) -> CloudDisconnected-```--</Tab>-<Tab value="TypeScript">--```ts-cloudDisconnect(provider: string, asyncOpts_?: { signal: AbortSignal }): Promise<CloudDisconnected>-```--</Tab>-<Tab value="Swift">--```swift-func cloudDisconnect(provider: String) async throws -> CloudDisconnected-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun cloudDisconnect(provider: String): CloudDisconnected-```--</Tab>-<Tab value="Rust">--```rust-pub async fn cloud_disconnect(&self, provider: String) -> Result<CloudDisconnected, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `provider` | `String` | required |--**Returns** [`CloudDisconnected`](#clouddisconnected-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.cloud_sweep`--What Cua left in your clouds (expired Spaces, resources whose Space-is gone; with `all`, everything Cua created there). Deletes it-unless `dry_run`. Only resources tagged and recorded as Cua's are-ever touched.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def cloud_sweep(self, provider: Optional[str], dry_run: bool, all: bool) -> CloudSweepReport-```--</Tab>-<Tab value="TypeScript">--```ts-cloudSweep(provider: string | undefined, dryRun: boolean, all: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<CloudSweepReport>-```--</Tab>-<Tab value="Swift">--```swift-func cloudSweep(provider: String?, dryRun: Bool, all: Bool) async throws -> CloudSweepReport-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun cloudSweep(provider: String?, dryRun: Boolean, all: Boolean): CloudSweepReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn cloud_sweep(&self, provider: Option<String>, dry_run: bool, all: bool) -> Result<CloudSweepReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `provider` | `Option<String>` | required |-| `dry_run` | `bool` | required |-| `all` | `bool` | required |--**Returns** [`CloudSweepReport`](#cloudsweepreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `CloudTarget` record--Where in a cloud account Spaces go. Credentials are never here: each-cloud uses its own CLI sign-in.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | `aws`, `gcp` or `modal`. |-| `profile` | `Option<String>` | `None` | AWS or Modal profile. |-| `region` | `Option<String>` | `None` | AWS or GCP region. |-| `zone` | `Option<String>` | `None` | GCP zone. |-| `project` | `Option<String>` | `None` | GCP project. |-| `environment` | `Option<String>` | `None` | Modal environment. |--## `CloudStatus` record--`cloud_status`.--Returned by [`Spaces.cloud_status`](#spacescloud_status).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `default_on` / `defaultOn` | `String` | | `default.on`, for example `aws`. |-| `providers` | [`Vec<CloudProvider>`](#cloudprovider-record) | | |-| `resources` | [`Vec<CloudResource>`](#cloudresource-record) | | |--## `CloudProvider` record--One cloud as `cloud_status` lists it.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | `aws`, `gcp`, `modal`. |-| `title` | `String` | | `AWS`, `Google Cloud`, `Modal`. |-| `tier` | `String` | | `vm` or `sandbox`. |-| `connected` | `bool` | | |-| `default` | `bool` | | Whether it is the default location (`default.on`). |-| `credentials` | [`CloudCredentials`](#cloudcredentials-record) | | |-| `account` | `String` | | The account, project or workspace (after a test or connect). |-| `profile` | `String` | | |-| `region` | `String` | | |-| `zone` | `String` | | |-| `project` | `String` | | |-| `environment` | `String` | | |-| `label` | `String` | | "AWS · us-west-2". |-| `ttl_hours` / `ttlHours` | `u32` | | Hours after which a Space there deletes itself (0: never). |-| `kinds` | [`Vec<CloudKind>`](#cloudkind-record) | | |--## `CloudKind` record--What a cloud can run for one image family, and the estimated cost.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image` | `String` | | `linux`, `linux-slim`, `windows`, `omarchy`, `macos`. |-| `kind` | `String` | | `container` or `vm`. |-| `supported` | `bool` | | |-| `reason` | `String` | | Why not, or how it runs (one line). |-| `machine_type` / `machineType` | `String` | | The machine type Cua picks (`t3.medium`, `e2-medium`). |-| `usd_per_hour` / `usdPerHour` | `f64` | | Estimated on-demand US dollars per hour while it runs. |--## `CloudCredentials` record--Where a cloud's credentials were found on this machine (never a-secret).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `found` | `bool` | | |-| `source` | `String` | | "~/.aws profile default", "gcloud account [email protected]". |--## `CloudResource` record--One thing Cua created in a cloud.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | |-| `id` | `String` | | The cloud's id. |-| `resource_type` / `resourceType` | `String` | | `instance`, `security_group`, `firewall`, `sandbox`, ... |-| `sandbox` | `String` | | The sandbox it belongs to (`aws:<name>`), empty for shared resources. |-| `machine` | `String` | | The relay machine the sandbox joined as (its Space is `relay:<machine>`). |-| `region` | `String` | | |-| `state` | `String` | | |-| `created` | `String` | | RFC 3339. |-| `expires` | `String` | | RFC 3339, empty: never. |-| `expired` | `bool` | | |--## `CloudConnected` record--`cloud_connect`: the connected cloud and the checks it passed.--Returned by [`Spaces.cloud_connect`](#spacescloud_connect).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | [`CloudProvider`](#cloudprovider-record) | | |-| `checks` | [`Vec<CloudCheck>`](#cloudcheck-record) | | |--## `CloudCheck` record--One check `cloud_test` ran.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `String` | | |-| `ok` | `bool` | | |-| `detail` | `String` | | |--## `CloudTestReport` record--`cloud_test`.--Returned by [`Spaces.cloud_test`](#spacescloud_test).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | |-| `ok` | `bool` | | |-| `account` | `String` | | |-| `checks` | [`Vec<CloudCheck>`](#cloudcheck-record) | | |--## `CloudDisconnected` record--`cloud_disconnect`.--Returned by [`Spaces.cloud_disconnect`](#spacescloud_disconnect).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `String` | | |-| `disconnected` | `bool` | | |-| `left` | [`Vec<CloudResource>`](#cloudresource-record) | | Resources Cua still records there. |--## `CloudSweepReport` record--`cloud_sweep`.--Returned by [`Spaces.cloud_sweep`](#spacescloud_sweep).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `dry_run` / `dryRun` | `bool` | | |-| `resources` | [`Vec<CloudSweepItem>`](#cloudsweepitem-record) | | |--## `CloudSweepItem` record--One row of `cloud_sweep`.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `resource` | [`CloudResource`](#cloudresource-record) | | |-| `action` | `String` | | `delete` (dry run), `deleted`, `keep` or `failed`. |-| `reason` | `String` | | |diff --git a/docs/content/docs/cua-sdk/reference/spaces/create.mdx b/docs/content/docs/cua-sdk/reference/spaces/create.mdxdeleted file mode 100644index e0ec08ffb9..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/create.mdx+++ /dev/null@@ -1,166 +0,0 @@-----title: "Create options"-description: "What `Spaces.create` takes and reports: options, progress, cancel and GPU acceleration."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--`Spaces.create` takes `SpaceCreateOptions` and returns a `SpaceCreateResult`. A `SpaceCreateListener` receives `SpaceCreateProgress` while it runs; `Spaces.cancel_create` stops it. `GpuSupport` says whether a location offers GPU acceleration.--## `SpaceCreateOptions` record--Options for `Spaces.create`: the same location / kind / runtime model-as sandboxes.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image` | `Option<String>` | `None` | Image (default: the canonical Linux image). |-| `on` | `Option<String>` | `None` | Where: `local` (free) or `cloud` (metered). `None`: the user default (`default.on`, `CUA_DEFAULT_ON`, else `local`). |-| `kind` | `Option<String>` | `None` | `auto` (default), `container` or `vm`. |-| `runtime` | `Option<String>` | `None` | `auto` (default) or an engine the location offers for the kind. |-| `name` | `Option<String>` | `None` | Name (default `space-<hex>`). |-| `cpus` | `Option<u32>` | `None` | vCPUs. Local default 2. |-| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory in MiB. Local default 4096. |-| `disk_gb` / `diskGb` | `Option<u32>` | `None` | Grow the VM's disk to this many GiB (local VMs; default: the image's size, never smaller). Lume grows the macOS APFS container before the first boot; Linux images grow their root partition at boot. Containers and cloud Spaces refuse it. |-| `timeout_ms` / `timeoutMs` | `Option<u64>` | `None` | Readiness budget (local; default 600 s). |-| `wait` | `Option<bool>` | `None` | Wait until ready (default true). |-| `reuse` | `bool` | `false` | Return a reachable registered Space in the same location with the requested services instead of creating one. |-| `command` | `Option<Vec<String>>` | `None` | Entrypoint override. |-| `env` | `HashMap<String, String>` | `[:]` | Guest environment. |-| `services` | `HashMap<String, u16>` | `[:]` | Named services (name → guest port), for example `{"mcp": 8765}`. |-| `spacesd` | `Option<bool>` | `None` | Whether the image runs cua-spacesd (default: yes for the canonical images, no for any other image). |-| `gpu` | `Option<String>` | `None` | A GPU option of the runtime the Space runs on (`Spaces.gpu_support`): `paravirtual` for a macOS VM on Lume (GPU acceleration, experimental), `virgl` (QEMU on Linux), `nvidia` (a runc container on Linux); `auto` picks the runtime's own. `None` (the default): no GPU. Kept with the Space. |-| `create_id` / `createId` | `Option<String>` | `None` | Your own key for this create (an app's pending row), for `Spaces.cancel_create` before the Space's id is known. |--## `SpaceCreateResult` record--Result of `Spaces.create`.--Returned by [`Spaces.create`](/cua-sdk/reference/spaces#spacescreate), [`Spaces.create_with_progress`](/cua-sdk/reference/spaces#spacescreate_with_progress).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | [`Option<SpaceInfo>`](/cua-sdk/reference/spaces#spaceinfo-record) | | The Space, once ready. |-| `pending_id` / `pendingId` | `Option<String>` | | With `wait = false`: the id the Space will have. |-| `reused` | `bool` | | `reuse` returned an existing Space. |--## `SpaceCreateProgress` record--What a Space create is doing (see `Spaces.create_with_progress`).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | `String` | | `preparing`, `pulling`, `creating`, `booting`, `waiting_for_services`, `connecting` or `ready`, in that order. |-| `fraction` | `Option<f64>` | | How far through the phase, 0.0 to 1.0, when its size is known (an image pull). |-| `detail` | `String` | | One short line, for example the image being pulled. |-| `bytes_done` / `bytesDone` | `Option<u64>` | `None` | Bytes downloaded so far, when the step counts them (an image pull). |-| `bytes_total` / `bytesTotal` | `Option<u64>` | `None` | Bytes the download has in all. |-| `bytes_per_second` / `bytesPerSecond` | `Option<f64>` | `None` | Smoothed download rate, bytes per second (time left: the bytes to go over it). |-| `space` | `String` | `""` | The id the Space will have (`local:<name>`), for `Spaces.cancel_create`. |--## `SpaceCreateListener`--Receives `SpaceCreateProgress` while `Spaces.create_with_progress`-runs, in order, ending with `ready`. Called on an SDK worker thread;-return quickly.--<Callout>-You implement `SpaceCreateListener` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `SpaceCreateListener` protocol in Swift, the interface in Kotlin and the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_progress`](#spacecreatelisteneron_progress) | The create moved on. |--### `SpaceCreateListener.on_progress`--The create moved on.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def on_progress(self, progress: SpaceCreateProgress) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-onProgress(progress: SpaceCreateProgress): void-```--</Tab>-<Tab value="Swift">--```swift-func onProgress(progress: SpaceCreateProgress)-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun onProgress(progress: SpaceCreateProgress)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_progress(&self, progress: SpaceCreateProgress)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `progress` | [`SpaceCreateProgress`](#spacecreateprogress-record) | required |--## `SpaceCancelOutcome` record--What `Spaces.cancel_create` did.--Returned by [`Spaces.cancel_create`](/cua-sdk/reference/spaces#spacescancel_create).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The Space id the create had (`local:<name>`), when known. |-| `state` | `String` | | `cancelled`, `not_creating` (nothing by that key is running) or `already_created` (it finished: delete it instead). |-| `message` | `String` | | What was removed and what stays, for people. |--## `GpuSupport` record--The GPU options of one runtime: empty, with the reason, when it has-none.--Returned by [`Spaces.gpu_support`](/cua-sdk/reference/spaces#spacesgpu_support).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `runtime` | `String` | | `lume`, `qemu`, `container`, `gvisor`, a provider's name. |-| `options` | [`Vec<GpuOption>`](#gpuoption-record) | | Its options. |-| `reason` | `String` | | Why it has none. |--## `GpuOption` record--One GPU option of a runtime (see `Spaces.gpu_support`).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | What to pass as `gpu`. |-| `label` | `String` | | How a person names it ("GPU acceleration"). |-| `experimental` | `bool` | | Experimental. |-| `supported` | `bool` | | Works on this host now. |-| `reason` | `String` | | Why not, one short line (empty when supported). |-| `learn_more` / `learnMore` | `Option<String>` | | A page that explains it. |-| `usd_per_hour` / `usdPerHour` | `Option<f64>` | | Estimated cost per hour while it runs (cloud GPU types). |diff --git a/docs/content/docs/cua-sdk/reference/spaces/decoded-media.mdx b/docs/content/docs/cua-sdk/reference/spaces/decoded-media.mdxdeleted file mode 100644index f4c27e3d9e..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/decoded-media.mdx+++ /dev/null@@ -1,222 +0,0 @@-----title: "Decoded media"-description: "Media sessions that deliver decoded BGRA frames and PCM audio."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--The streaming decoder ships with Cua Spaces. `spacesd_open_media_decoded` opens a media session on a `SpacesdClient` and delivers decoded video (packed BGRA; VideoToolbox on macOS, OpenH264 elsewhere) to a `DecodedFrameSink`, requesting a keyframe whenever a reference is lost (Swift: `client.openMediaDecoded(...)`). The open source SDK delivers the encoded frames: see [Media](/cua-sdk/reference/spacesd/media).--## `spacesd_open_media_decoded`--Opens a media session on `client` and delivers *decoded* video (packed-BGRA) and control events to `frames`. Lost references trigger a keyframe-request automatically. (Swift: `client.openMediaDecoded(...)`.)--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func spacesdOpenMediaDecoded(client: SpacesdClient, options: MediaOpenOptions, frames: DecodedFrameSink) async throws -> MediaSession-```--</Tab>-<Tab value="Rust">--```rust-pub async fn spacesd_open_media_decoded(client: Arc<SpacesdClient>, options: MediaOpenOptions, frames: Arc<dyn DecodedFrameSink>) -> Result<Arc<MediaSession>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `client` | [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient) | required |-| `options` | [`MediaOpenOptions`](/cua-sdk/reference/spacesd/media#mediaopenoptions-record) | required |-| `frames` | [`DecodedFrameSink`](#decodedframesink) | required |--**Returns** [`MediaSession`](/cua-sdk/reference/spacesd/media#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `spacesd_open_media_decoded_with_audio`--`spacesd_open_media_decoded` that also delivers decoded PCM audio to-`pcm` (set `options.audio` to negotiate audio tracks).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func spacesdOpenMediaDecodedWithAudio(client: SpacesdClient, options: MediaOpenOptions, frames: DecodedFrameSink, pcm: PcmSink) async throws -> MediaSession-```--</Tab>-<Tab value="Rust">--```rust-pub async fn spacesd_open_media_decoded_with_audio(client: Arc<SpacesdClient>, options: MediaOpenOptions, frames: Arc<dyn DecodedFrameSink>, pcm: Arc<dyn PcmSink>) -> Result<Arc<MediaSession>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `client` | [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient) | required |-| `options` | [`MediaOpenOptions`](/cua-sdk/reference/spacesd/media#mediaopenoptions-record) | required |-| `frames` | [`DecodedFrameSink`](#decodedframesink) | required |-| `pcm` | [`PcmSink`](#pcmsink) | required |--**Returns** [`MediaSession`](/cua-sdk/reference/spacesd/media#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `DecodedVideoFrame` record--One decoded video frame : packed top-down BGRA.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `sequence` | `u64` | | Per-target frame sequence. |-| `width` | `u32` | | Width in pixels. |-| `height` | `u32` | | Height in pixels. |-| `stride` | `u32` | | Bytes per row (`width * 4`). |-| `format` | `String` | | Pixel format; always `bgra`. |-| `capture_timestamp_us` / `captureTimestampUs` | `u64` | | Media-clock capture time (µs). |-| `codec_epoch` / `codecEpoch` | `u64` | | Decoder configuration generation of the source frame. |-| `geometry_epoch` / `geometryEpoch` | `u64` | | Coordinate generation. |-| `keyframe` | `bool` | | The source access unit was a keyframe. |-| `encoded_size` / `encodedSize` | `u64` | | Bytes of the source (encoded) access unit. |-| `received_at_us` / `receivedAtUs` | `u64` | | When the encoded frame reached the decoder (Unix µs, this host). |-| `decode_duration_us` / `decodeDurationUs` | `u64` | | Time spent decoding and converting it (µs). |-| `data` | `Vec<u8>` | | Pixels. |--## `PcmAudio` record--Decoded audio : interleaved signed 16-bit PCM.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `track_id` / `trackId` | `u16` | | Track id from `NegotiatedAudio`. |-| `sample_rate` / `sampleRate` | `u32` | | Samples per second per channel. |-| `channels` | `u16` | | Interleaved channels. |-| `pts_us` / `ptsUs` | `u64` | | Media-clock time of the first sample (µs). |-| `concealed` | `bool` | | Synthesized by packet-loss concealment for a lost packet. |-| `sequence` | `u32` | | RAU2 sequence of the packet this frame was decoded from (the packet that revealed the loss, for concealed frames). |-| `config_epoch` / `configEpoch` | `u8` | | RAU2 config epoch (the audio codec generation). |-| `encoded_size` / `encodedSize` | `u64` | | Bytes of the encoded packet (0 for concealed frames). |-| `received_at_us` / `receivedAtUs` | `u64` | | When the packet reached the decoder (Unix µs, this host). |-| `decode_duration_us` / `decodeDurationUs` | `u64` | | Time spent decoding the packet (µs). |-| `samples` | `Vec<i16>` | | Interleaved samples. |--## `DecodedFrameSink`--Receives decoded video frames and control events. The SDK decodes on-the session's delivery thread (VideoToolbox on macOS, OpenH264-elsewhere); implementations must return quickly.--<Callout>-You implement `DecodedFrameSink` and pass it to the SDK (a callback interface): implement the `DecodedFrameSink` protocol in Swift or the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_decoded_frame`](#decodedframesinkon_decoded_frame) | A decoded frame. |-| [`on_event`](#decodedframesinkon_event) | A control message, a `decode_error`, or the socket close. |--### `DecodedFrameSink.on_decoded_frame`--A decoded frame.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func onDecodedFrame(frame: DecodedVideoFrame)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_decoded_frame(&self, frame: DecodedVideoFrame)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `frame` | [`DecodedVideoFrame`](#decodedvideoframe-record) | required |--### `DecodedFrameSink.on_event`--A control message, a `decode_error`, or the socket close.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func onEvent(event: MediaEvent)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_event(&self, event: MediaEvent)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `event` | [`MediaEvent`](/cua-sdk/reference/spacesd/media#mediaevent-record) | required |--## `PcmSink`--Receives decoded audio. Must return quickly.--<Callout>-You implement `PcmSink` and pass it to the SDK (a callback interface): implement the `PcmSink` protocol in Swift or the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_pcm`](#pcmsinkon_pcm) | One decoded (or concealed) audio frame. |--### `PcmSink.on_pcm`--One decoded (or concealed) audio frame.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func onPcm(audio: PcmAudio)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_pcm(&self, audio: PcmAudio)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `audio` | [`PcmAudio`](#pcmaudio-record) | required |diff --git a/docs/content/docs/cua-sdk/reference/spaces/devices.mdx b/docs/content/docs/cua-sdk/reference/spaces/devices.mdxdeleted file mode 100644index e79aba0bb4..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/devices.mdx+++ /dev/null@@ -1,637 +0,0 @@-----title: "Devices"-description: "This device as a client of the account on the relay: enroll, approve, rename, revoke and the audit log."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--`auth.devices(relay_url, name)` returns this device on the relay, its key in the session's credential store (shared with the `cua` CLI and daemon). A device lists and reaches the account's machines once enrolled: right after a fresh sign-in (a sign-in through `Auth.begin_login` re-registers a device that already has a key), or by a one-time code approved from an enrolled device (`cua devices approve`). A new key of the same machine replaces its old record. Enrollment lasts 30 days, then one approval or a fresh sign-in re-verifies it. Nothing here prompts; gate `approve` behind presence in your UI.--## `Devices`--This device as a client of the signed-in account on a relay: its-enrollment, the account's other devices and its audit log. The device-key lives in the session's vault (shared with the `cua` CLI and daemon).-Nothing here prompts: approving is the caller's to gate behind presence.--Returned by [`Auth.devices`](/cua-sdk/reference/auth#authdevices).--| Method | Description |-| --- | --- |-| [`approve`](#devicesapprove) | Approves the device showing `code`, or re-verifies `device_id`, from this enrolled device. |-| [`check_enrolled`](#devicescheck_enrolled) | Whether the relay lets this device open a session now (enrolled), asked afresh. |-| [`confirm_machine`](#devicesconfirm_machine) | Vouches for `machine_id`, a machine that registered without an enrolled device's signature or MFA (from this enrolled device) (S5). |-| [`create_pairing_code`](#devicescreate_pairing_code) | Makes a one-time code (link, QR, install commands) that adds another computer to the account, or to `team` (from this enrolled device). |-| [`device_id`](#devicesdevice_id) | This device's id, when it has a key (no network). |-| [`enroll`](#devicesenroll) | Registers this device (creating its key on first use). |-| [`pairing_codes`](#devicespairing_codes) | The account's pairing codes, newest first (without the codes). |-| [`rename`](#devicesrename) | Renames a device (from this enrolled device). |-| [`revoke`](#devicesrevoke) | Revokes a device (from this enrolled device). |-| [`revoke_pairing_code`](#devicesrevoke_pairing_code) | Revokes an unused pairing code (`pc_…`). |-| [`snapshot`](#devicessnapshot) | The account's devices, the grace period, the newest `audit_limit` audit events and the machines' names. |--| Accessor | Returns | Description |-| --- | --- | --- |-| `relay_url()` | `String` | The relay base URL. |--### `Devices.approve`--Approves the device showing `code`, or re-verifies `device_id`,-from this enrolled device.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def approve(self, code: Optional[str], device_id: Optional[str]) -> RelayDevice-```--</Tab>-<Tab value="TypeScript">--```ts-approve(code: string | undefined, deviceId: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RelayDevice>-```--</Tab>-<Tab value="Swift">--```swift-func approve(code: String?, deviceId: String?) async throws -> RelayDevice-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun approve(code: String?, deviceId: String?): RelayDevice-```--</Tab>-<Tab value="Rust">--```rust-pub async fn approve(&self, code: Option<String>, device_id: Option<String>) -> Result<RelayDevice, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `code` | `Option<String>` | required |-| `device_id` | `Option<String>` | required |--**Returns** [`RelayDevice`](#relaydevice-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.check_enrolled`--Whether the relay lets this device open a session now (enrolled),-asked afresh. Polled while waiting for an approval.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def check_enrolled(self) -> bool-```--</Tab>-<Tab value="TypeScript">--```ts-checkEnrolled(asyncOpts_?: { signal: AbortSignal }): Promise<boolean>-```--</Tab>-<Tab value="Swift">--```swift-func checkEnrolled() async -> Bool-```--</Tab>-<Tab value="Kotlin">--```kotlin-suspend fun checkEnrolled(): Boolean-```--</Tab>-<Tab value="Rust">--```rust-pub async fn check_enrolled(&self) -> bool-```--</Tab>-</Tabs>--**Returns** `bool` · **Async**--### `Devices.confirm_machine`--Vouches for `machine_id`, a machine that registered without an-enrolled device's signature or MFA (from this enrolled device) (S5).-Clears `RelayMachine.confirmed`'s "new" flag for every account-member, not just this device.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def confirm_machine(self, machine_id: str) -> RelayMachine-```--</Tab>-<Tab value="TypeScript">--```ts-confirmMachine(machineId: string, asyncOpts_?: { signal: AbortSignal }): Promise<RelayMachine>-```--</Tab>-<Tab value="Swift">--```swift-func confirmMachine(machineId: String) async throws -> RelayMachine-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun confirmMachine(machineId: String): RelayMachine-```--</Tab>-<Tab value="Rust">--```rust-pub async fn confirm_machine(&self, machine_id: String) -> Result<RelayMachine, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `machine_id` | `String` | required |--**Returns** [`RelayMachine`](/cua-sdk/reference/spaces/host#relaymachine-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.create_pairing_code`--Makes a one-time code (link, QR, install commands) that adds another-computer to the account, or to `team` (from this enrolled device).-It expires after `ttl_secs` (30 minutes when `None`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def create_pairing_code(self, team: Optional[str], ttl_secs: Optional[int]) -> PairingCode-```--</Tab>-<Tab value="TypeScript">--```ts-createPairingCode(team: string | undefined, ttlSecs: bigint | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<PairingCode>-```--</Tab>-<Tab value="Swift">--```swift-func createPairingCode(team: String?, ttlSecs: UInt64?) async throws -> PairingCode-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun createPairingCode(team: String?, ttlSecs: ULong?): PairingCode-```--</Tab>-<Tab value="Rust">--```rust-pub async fn create_pairing_code(&self, team: Option<String>, ttl_secs: Option<u64>) -> Result<PairingCode, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `team` | `Option<String>` | required |-| `ttl_secs` | `Option<u64>` | required |--**Returns** [`PairingCode`](/cua-sdk/reference/spaces/host#pairingcode-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.device_id`--This device's id, when it has a key (no network).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def device_id(self) -> Optional[str]-```--</Tab>-<Tab value="TypeScript">--```ts-deviceId(): string | undefined-```--</Tab>-<Tab value="Swift">--```swift-func deviceId() throws -> String?-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun deviceId(): String?-```--</Tab>-<Tab value="Rust">--```rust-pub fn device_id(&self) -> Result<Option<String>, CuaError>-```--</Tab>-</Tabs>--**Returns** `Option<String>` · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.enroll`--Registers this device (creating its key on first use). Right after-a fresh sign-in it is enrolled at once (replacing this machine's-older device key, if any); otherwise the result carries a one-time-code to approve from an enrolled device.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def enroll(self) -> DeviceEnrollment-```--</Tab>-<Tab value="TypeScript">--```ts-enroll(asyncOpts_?: { signal: AbortSignal }): Promise<DeviceEnrollment>-```--</Tab>-<Tab value="Swift">--```swift-func enroll() async throws -> DeviceEnrollment-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun enroll(): DeviceEnrollment-```--</Tab>-<Tab value="Rust">--```rust-pub async fn enroll(&self) -> Result<DeviceEnrollment, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DeviceEnrollment`](#deviceenrollment-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.pairing_codes`--The account's pairing codes, newest first (without the codes).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def pairing_codes(self) -> List[PairingCode]-```--</Tab>-<Tab value="TypeScript">--```ts-pairingCodes(asyncOpts_?: { signal: AbortSignal }): Promise<Array<PairingCode>>-```--</Tab>-<Tab value="Swift">--```swift-func pairingCodes() async throws -> [PairingCode]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun pairingCodes(): List<PairingCode>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn pairing_codes(&self) -> Result<Vec<PairingCode>, CuaError>-```--</Tab>-</Tabs>--**Returns** [`Vec<PairingCode>`](/cua-sdk/reference/spaces/host#pairingcode-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.rename`--Renames a device (from this enrolled device).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def rename(self, id: str, name: str) -> RelayDevice-```--</Tab>-<Tab value="TypeScript">--```ts-rename(id: string, name: string, asyncOpts_?: { signal: AbortSignal }): Promise<RelayDevice>-```--</Tab>-<Tab value="Swift">--```swift-func rename(id: String, name: String) async throws -> RelayDevice-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun rename(id: String, name: String): RelayDevice-```--</Tab>-<Tab value="Rust">--```rust-pub async fn rename(&self, id: String, name: String) -> Result<RelayDevice, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |-| `name` | `String` | required |--**Returns** [`RelayDevice`](#relaydevice-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.revoke`--Revokes a device (from this enrolled device). Revoking this device-also deletes its key.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def revoke(self, id: str) -> RelayDevice-```--</Tab>-<Tab value="TypeScript">--```ts-revoke(id: string, asyncOpts_?: { signal: AbortSignal }): Promise<RelayDevice>-```--</Tab>-<Tab value="Swift">--```swift-func revoke(id: String) async throws -> RelayDevice-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun revoke(id: String): RelayDevice-```--</Tab>-<Tab value="Rust">--```rust-pub async fn revoke(&self, id: String) -> Result<RelayDevice, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |--**Returns** [`RelayDevice`](#relaydevice-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.revoke_pairing_code`--Revokes an unused pairing code (`pc_…`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def revoke_pairing_code(self, id: str) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-revokePairingCode(id: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func revokePairingCode(id: String) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun revokePairingCode(id: String)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn revoke_pairing_code(&self, id: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Devices.snapshot`--The account's devices, the grace period, the newest `audit_limit`-audit events and the machines' names. Only the device list must-succeed; the rest is empty when the relay refuses it.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def snapshot(self, audit_limit: int) -> DevicesSnapshot-```--</Tab>-<Tab value="TypeScript">--```ts-snapshot(auditLimit: number, asyncOpts_?: { signal: AbortSignal }): Promise<DevicesSnapshot>-```--</Tab>-<Tab value="Swift">--```swift-func snapshot(auditLimit: UInt32) async throws -> DevicesSnapshot-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun snapshot(auditLimit: UInt): DevicesSnapshot-```--</Tab>-<Tab value="Rust">--```rust-pub async fn snapshot(&self, audit_limit: u32) -> Result<DevicesSnapshot, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `audit_limit` | `u32` | required |--**Returns** [`DevicesSnapshot`](#devicessnapshot-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `DevicesSnapshot` record--Everything the Devices page reads, in one call.--Returned by [`Devices.snapshot`](#devicessnapshot).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `local_device_id` / `localDeviceId` | `Option<String>` | | This device's id, when it has a key. |-| `devices` | [`Vec<RelayDevice>`](#relaydevice-record) | | The account's devices (this one marked `current` once enrolled). |-| `enforce_after` / `enforceAfter` | `Option<u64>` | | End of the relay's grace period for unenrolled devices. |-| `audit` | [`Vec<RelayAuditEvent>`](#relayauditevent-record) | | The account's audit log, newest last (empty when the relay refuses). |-| `machine_names` / `machineNames` | `HashMap<String, String>` | | Machine ids to names (empty when this device cannot list them). |-| `machines` | [`Vec<RelayMachine>`](/cua-sdk/reference/spaces/host#relaymachine-record) | | The account's relay machines, `RelayMachine.confirmed` included (S5; empty when this device cannot list them, same as `machine_names`). |--## `RelayDevice` record--A client device of the account, as the relay lists it.--Returned by [`Devices.approve`](#devicesapprove), [`Devices.rename`](#devicesrename), [`Devices.revoke`](#devicesrevoke).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `dev_…`. |-| `name` | `String` | | Display name. |-| `state` | `String` | | `pending`, `enrolled`, `expired` or `revoked`. |-| `platform` | `String` | | Operating system it reported (`macos`, `windows`, `linux`); empty when unknown. |-| `created_at` / `createdAt` | `u64` | | Registered at (Unix seconds). |-| `enrolled_until` / `enrolledUntil` | `Option<u64>` | | Re-verification due at (Unix seconds). |-| `last_seen` / `lastSeen` | `Option<u64>` | | Last session (Unix seconds). |-| `current` | `bool` | | This device. |--## `RelayAuditEvent` record--One event of the account's audit log.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ts` | `u64` | | Unix seconds. |-| `kind` | `String` | | Kind (`machine_access`, `device_enrolled`, `share_added`, ...). |-| `device` | `Option<String>` | | Acting device. |-| `machine` | `Option<String>` | | Machine id. |-| `subject` | `Option<String>` | | Other party. |-| `detail` | `Option<String>` | | Detail. |--## `DeviceEnrollment` record--`Devices.enroll`'s result.--Returned by [`Devices.enroll`](#devicesenroll).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `device` | [`RelayDevice`](#relaydevice-record) | | This device. |-| `enrolled` | `bool` | | Enrolled now (right after a fresh sign-in). |-| `code` | `Option<String>` | | The one-time code to approve from an enrolled device otherwise. |diff --git a/docs/content/docs/cua-sdk/reference/spaces/host.mdx b/docs/content/docs/cua-sdk/reference/spaces/host.mdxindex bc9a72320c..bdba7fc3e7 100644--- a/docs/content/docs/cua-sdk/reference/spaces/host.mdx+++ b/docs/content/docs/cua-sdk/reference/spaces/host.mdx@@ -1,6 +1,6 @@----title: "Host and relay"-description: "Unattended host setup and the cua-relay directory client."+title: "Host, relay and devices"+description: "Unattended host setup, the cua-relay directory client, and this device's enrollment on the relay."---{/*@@ -889,7 +889,7 @@ Returned by [`Host.configure`](#hostconfigure), [`Host.pause_signed_out`](#hostpA one-time code that adds a machine to the account ("Add a machine"by link or QR code).-Returned by [`Devices.create_pairing_code`](/cua-sdk/reference/spaces/devices#devicescreate_pairing_code), [`Devices.pairing_codes`](/cua-sdk/reference/spaces/devices#devicespairing_codes).+Returned by [`Devices.create_pairing_code`](#devicescreate_pairing_code), [`Devices.pairing_codes`](#devicespairing_codes).| Field | Type | Default | Description || --- | --- | --- | --- |@@ -921,7 +921,7 @@ Somebody connected to a machine through the relay.A machine of the account's relay directory (`relay:<id>`).-Returned by [`Devices.confirm_machine`](/cua-sdk/reference/spaces/devices#devicesconfirm_machine), [`Relay.machine`](#relaymachine), [`Relay.machines`](#relaymachines), [`Relay.start_sharing`](#relaystart_sharing), [`Relay.stop_sharing`](#relaystop_sharing).+Returned by [`Devices.confirm_machine`](#devicesconfirm_machine), [`Relay.machine`](#relaymachine), [`Relay.machines`](#relaymachines), [`Relay.start_sharing`](#relaystart_sharing), [`Relay.stop_sharing`](#relaystop_sharing).| Field | Type | Default | Description || --- | --- | --- | --- |@@ -938,3 +938,629 @@ Returned by [`Devices.confirm_machine`](/cua-sdk/reference/spaces/devices#device| `allow` | `Vec<String>` | | Allowlist (owner view only). || `clients` | [`Vec<RelayClientInfo>`](#relayclientinfo-record) | | Connected clients. || `confirmed` | `bool` | | Registered with an enrolled device's signature or MFA, or confirmed since from one; `true` for anything a relay registered before this check existed. `false` shows the machine as "new" until an enrolled device confirms it (`Devices.confirm_machine`) (S5). |++## This device on the relay++`auth.devices(relay_url, name)` returns this device on the relay, its key in the session's credential store (shared with the `cua` CLI and daemon). A device lists and reaches the account's machines once enrolled: right after a fresh sign-in (a sign-in through `Auth.begin_login` re-registers a device that already has a key), or by a one-time code approved from an enrolled device (`cua devices approve`). A new key of the same machine replaces its old record. Enrollment lasts 30 days, then one approval or a fresh sign-in re-verifies it. Nothing here prompts; gate `approve` behind presence in your UI.++## `Devices`++This device as a client of the signed-in account on a relay: its+enrollment, the account's other devices and its audit log. The device+key lives in the session's vault (shared with the `cua` CLI and daemon).+Nothing here prompts: approving is the caller's to gate behind presence.++Returned by [`Auth.devices`](/cua-sdk/reference/auth#authdevices).++| Method | Description |+| --- | --- |+| [`approve`](#devicesapprove) | Approves the device showing `code`, or re-verifies `device_id`, from this enrolled device. |+| [`check_enrolled`](#devicescheck_enrolled) | Whether the relay lets this device open a session now (enrolled), asked afresh. |+| [`confirm_machine`](#devicesconfirm_machine) | Vouches for `machine_id`, a machine that registered without an enrolled device's signature or MFA (from this enrolled device) (S5). |+| [`create_pairing_code`](#devicescreate_pairing_code) | Makes a one-time code (link, QR, install commands) that adds another computer to the account, or to `team` (from this enrolled device). |+| [`device_id`](#devicesdevice_id) | This device's id, when it has a key (no network). |+| [`enroll`](#devicesenroll) | Registers this device (creating its key on first use). |+| [`pairing_codes`](#devicespairing_codes) | The account's pairing codes, newest first (without the codes). |+| [`rename`](#devicesrename) | Renames a device (from this enrolled device). |+| [`revoke`](#devicesrevoke) | Revokes a device (from this enrolled device). |+| [`revoke_pairing_code`](#devicesrevoke_pairing_code) | Revokes an unused pairing code (`pc_…`). |+| [`snapshot`](#devicessnapshot) | The account's devices, the grace period, the newest `audit_limit` audit events and the machines' names. |++| Accessor | Returns | Description |+| --- | --- | --- |+| `relay_url()` | `String` | The relay base URL. |++### `Devices.approve`++Approves the device showing `code`, or re-verifies `device_id`,+from this enrolled device.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def approve(self, code: Optional[str], device_id: Optional[str]) -> RelayDevice+```++</Tab>+<Tab value="TypeScript">++```ts+approve(code: string | undefined, deviceId: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RelayDevice>+```++</Tab>+<Tab value="Swift">++```swift+func approve(code: String?, deviceId: String?) async throws -> RelayDevice+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun approve(code: String?, deviceId: String?): RelayDevice+```++</Tab>+<Tab value="Rust">++```rust+pub async fn approve(&self, code: Option<String>, device_id: Option<String>) -> Result<RelayDevice, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `code` | `Option<String>` | required |+| `device_id` | `Option<String>` | required |++**Returns** [`RelayDevice`](#relaydevice-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.check_enrolled`++Whether the relay lets this device open a session now (enrolled),+asked afresh. Polled while waiting for an approval.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def check_enrolled(self) -> bool+```++</Tab>+<Tab value="TypeScript">++```ts+checkEnrolled(asyncOpts_?: { signal: AbortSignal }): Promise<boolean>+```++</Tab>+<Tab value="Swift">++```swift+func checkEnrolled() async -> Bool+```++</Tab>+<Tab value="Kotlin">++```kotlin+suspend fun checkEnrolled(): Boolean+```++</Tab>+<Tab value="Rust">++```rust+pub async fn check_enrolled(&self) -> bool+```++</Tab>+</Tabs>++**Returns** `bool` · **Async**++### `Devices.confirm_machine`++Vouches for `machine_id`, a machine that registered without an+enrolled device's signature or MFA (from this enrolled device) (S5).+Clears `RelayMachine.confirmed`'s "new" flag for every account+member, not just this device.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def confirm_machine(self, machine_id: str) -> RelayMachine+```++</Tab>+<Tab value="TypeScript">++```ts+confirmMachine(machineId: string, asyncOpts_?: { signal: AbortSignal }): Promise<RelayMachine>+```++</Tab>+<Tab value="Swift">++```swift+func confirmMachine(machineId: String) async throws -> RelayMachine+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun confirmMachine(machineId: String): RelayMachine+```++</Tab>+<Tab value="Rust">++```rust+pub async fn confirm_machine(&self, machine_id: String) -> Result<RelayMachine, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `machine_id` | `String` | required |++**Returns** [`RelayMachine`](#relaymachine-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.create_pairing_code`++Makes a one-time code (link, QR, install commands) that adds another+computer to the account, or to `team` (from this enrolled device).+It expires after `ttl_secs` (30 minutes when `None`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def create_pairing_code(self, team: Optional[str], ttl_secs: Optional[int]) -> PairingCode+```++</Tab>+<Tab value="TypeScript">++```ts+createPairingCode(team: string | undefined, ttlSecs: bigint | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<PairingCode>+```++</Tab>+<Tab value="Swift">++```swift+func createPairingCode(team: String?, ttlSecs: UInt64?) async throws -> PairingCode+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun createPairingCode(team: String?, ttlSecs: ULong?): PairingCode+```++</Tab>+<Tab value="Rust">++```rust+pub async fn create_pairing_code(&self, team: Option<String>, ttl_secs: Option<u64>) -> Result<PairingCode, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `team` | `Option<String>` | required |+| `ttl_secs` | `Option<u64>` | required |++**Returns** [`PairingCode`](#pairingcode-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.device_id`++This device's id, when it has a key (no network).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def device_id(self) -> Optional[str]+```++</Tab>+<Tab value="TypeScript">++```ts+deviceId(): string | undefined+```++</Tab>+<Tab value="Swift">++```swift+func deviceId() throws -> String?+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun deviceId(): String?+```++</Tab>+<Tab value="Rust">++```rust+pub fn device_id(&self) -> Result<Option<String>, CuaError>+```++</Tab>+</Tabs>++**Returns** `Option<String>` · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.enroll`++Registers this device (creating its key on first use). Right after+a fresh sign-in it is enrolled at once (replacing this machine's+older device key, if any); otherwise the result carries a one-time+code to approve from an enrolled device.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def enroll(self) -> DeviceEnrollment+```++</Tab>+<Tab value="TypeScript">++```ts+enroll(asyncOpts_?: { signal: AbortSignal }): Promise<DeviceEnrollment>+```++</Tab>+<Tab value="Swift">++```swift+func enroll() async throws -> DeviceEnrollment+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun enroll(): DeviceEnrollment+```++</Tab>+<Tab value="Rust">++```rust+pub async fn enroll(&self) -> Result<DeviceEnrollment, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DeviceEnrollment`](#deviceenrollment-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.pairing_codes`++The account's pairing codes, newest first (without the codes).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def pairing_codes(self) -> List[PairingCode]+```++</Tab>+<Tab value="TypeScript">++```ts+pairingCodes(asyncOpts_?: { signal: AbortSignal }): Promise<Array<PairingCode>>+```++</Tab>+<Tab value="Swift">++```swift+func pairingCodes() async throws -> [PairingCode]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun pairingCodes(): List<PairingCode>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn pairing_codes(&self) -> Result<Vec<PairingCode>, CuaError>+```++</Tab>+</Tabs>++**Returns** [`Vec<PairingCode>`](#pairingcode-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.rename`++Renames a device (from this enrolled device).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def rename(self, id: str, name: str) -> RelayDevice+```++</Tab>+<Tab value="TypeScript">++```ts+rename(id: string, name: string, asyncOpts_?: { signal: AbortSignal }): Promise<RelayDevice>+```++</Tab>+<Tab value="Swift">++```swift+func rename(id: String, name: String) async throws -> RelayDevice+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun rename(id: String, name: String): RelayDevice+```++</Tab>+<Tab value="Rust">++```rust+pub async fn rename(&self, id: String, name: String) -> Result<RelayDevice, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `id` | `String` | required |+| `name` | `String` | required |++**Returns** [`RelayDevice`](#relaydevice-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.revoke`++Revokes a device (from this enrolled device). Revoking this device+also deletes its key.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def revoke(self, id: str) -> RelayDevice+```++</Tab>+<Tab value="TypeScript">++```ts+revoke(id: string, asyncOpts_?: { signal: AbortSignal }): Promise<RelayDevice>+```++</Tab>+<Tab value="Swift">++```swift+func revoke(id: String) async throws -> RelayDevice+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun revoke(id: String): RelayDevice+```++</Tab>+<Tab value="Rust">++```rust+pub async fn revoke(&self, id: String) -> Result<RelayDevice, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `id` | `String` | required |++**Returns** [`RelayDevice`](#relaydevice-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.revoke_pairing_code`++Revokes an unused pairing code (`pc_…`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def revoke_pairing_code(self, id: str) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+revokePairingCode(id: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func revokePairingCode(id: String) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun revokePairingCode(id: String)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn revoke_pairing_code(&self, id: String) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `id` | `String` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Devices.snapshot`++The account's devices, the grace period, the newest `audit_limit`+audit events and the machines' names. Only the device list must+succeed; the rest is empty when the relay refuses it.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def snapshot(self, audit_limit: int) -> DevicesSnapshot+```++</Tab>+<Tab value="TypeScript">++```ts+snapshot(auditLimit: number, asyncOpts_?: { signal: AbortSignal }): Promise<DevicesSnapshot>+```++</Tab>+<Tab value="Swift">++```swift+func snapshot(auditLimit: UInt32) async throws -> DevicesSnapshot+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun snapshot(auditLimit: UInt): DevicesSnapshot+```++</Tab>+<Tab value="Rust">++```rust+pub async fn snapshot(&self, audit_limit: u32) -> Result<DevicesSnapshot, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `audit_limit` | `u32` | required |++**Returns** [`DevicesSnapshot`](#devicessnapshot-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `DevicesSnapshot` record++Everything the Devices page reads, in one call.++Returned by [`Devices.snapshot`](#devicessnapshot).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `local_device_id` / `localDeviceId` | `Option<String>` | | This device's id, when it has a key. |+| `devices` | [`Vec<RelayDevice>`](#relaydevice-record) | | The account's devices (this one marked `current` once enrolled). |+| `enforce_after` / `enforceAfter` | `Option<u64>` | | End of the relay's grace period for unenrolled devices. |+| `audit` | [`Vec<RelayAuditEvent>`](#relayauditevent-record) | | The account's audit log, newest last (empty when the relay refuses). |+| `machine_names` / `machineNames` | `HashMap<String, String>` | | Machine ids to names (empty when this device cannot list them). |+| `machines` | [`Vec<RelayMachine>`](#relaymachine-record) | | The account's relay machines, `RelayMachine.confirmed` included (S5; empty when this device cannot list them, same as `machine_names`). |++## `RelayDevice` record++A client device of the account, as the relay lists it.++Returned by [`Devices.approve`](#devicesapprove), [`Devices.rename`](#devicesrename), [`Devices.revoke`](#devicesrevoke).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `String` | | `dev_…`. |+| `name` | `String` | | Display name. |+| `state` | `String` | | `pending`, `enrolled`, `expired` or `revoked`. |+| `platform` | `String` | | Operating system it reported (`macos`, `windows`, `linux`); empty when unknown. |+| `created_at` / `createdAt` | `u64` | | Registered at (Unix seconds). |+| `enrolled_until` / `enrolledUntil` | `Option<u64>` | | Re-verification due at (Unix seconds). |+| `last_seen` / `lastSeen` | `Option<u64>` | | Last session (Unix seconds). |+| `current` | `bool` | | This device. |++## `RelayAuditEvent` record++One event of the account's audit log.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `ts` | `u64` | | Unix seconds. |+| `kind` | `String` | | Kind (`machine_access`, `device_enrolled`, `share_added`, ...). |+| `device` | `Option<String>` | | Acting device. |+| `machine` | `Option<String>` | | Machine id. |+| `subject` | `Option<String>` | | Other party. |+| `detail` | `Option<String>` | | Detail. |++## `DeviceEnrollment` record++`Devices.enroll`'s result.++Returned by [`Devices.enroll`](#devicesenroll).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `device` | [`RelayDevice`](#relaydevice-record) | | This device. |+| `enrolled` | `bool` | | Enrolled now (right after a fresh sign-in). |+| `code` | `Option<String>` | | The one-time code to approve from an enrolled device otherwise. |diff --git a/docs/content/docs/cua-sdk/reference/spaces/index.mdx b/docs/content/docs/cua-sdk/reference/spaces/index.mdxindex 635eb4c4c8..fc66e8630c 100644--- a/docs/content/docs/cua-sdk/reference/spaces/index.mdx+++ b/docs/content/docs/cua-sdk/reference/spaces/index.mdx@@ -1,6 +1,6 @@---title: "Spaces"-description: "The Spaces registry: create, add, resolve, delete and remove Spaces."+description: "The Spaces registry: create, add, resolve, delete and remove Spaces, their create options, and agent runs in a Space."---{/*@@ -10,6 +10,7 @@ description: "The Spaces registry: create, add, resolve, delete and remove SpaceVersion: 0.5.0*/}+import { Callout } from 'fumadocs-ui/components/callout';import { Tab, Tabs } from 'fumadocs-ui/components/tabs';`cua.spaces()` returns the `Spaces` registry. Create a Space where `on` says (local or cloud), or add an existing machine by URL, then open a [`Space`](/cua-sdk/reference/spaces/space).@@ -41,14 +42,14 @@ Returned by [`Cua.spaces`](/cua-sdk/reference/cua#cua).| [`space`](#spacesspace) | A connected handle to a registered Space. || [`start`](#spacesstart) | Turns a Space on again: resumes a suspended one, boots a stopped one (a Space one of your machines provides joins the relay again), and leaves a running one as it is. || [`stop`](#spacesstop) | Turns a Space off the way its provider can (`SpaceInfo.power`): suspends it, keeping its memory (a local container or QEMU VM), or stops it, keeping its disk (a local Lume VM; a Space one of your machines provides, which that machine stops). |-| [`agent_capabilities`](/cua-sdk/reference/spaces/agents#spacesagent_capabilities) | What every agent harness is and cannot do (`agent_capabilities`), as JSON. |+| [`agent_capabilities`](/cua-sdk/reference/spaces#spacesagent_capabilities) | What every agent harness is and cannot do (`agent_capabilities`), as JSON. || [`agent_pause`](/cua-sdk/reference/spaces/persistent-agents#spacesagent_pause) | Pauses a persistent agent: run, routines and (local) Space. || [`agent_resume`](/cua-sdk/reference/spaces/persistent-agents#spacesagent_resume) | Resumes a paused persistent agent; with `prompt`, starts a run. |-| [`cloud_connect`](/cua-sdk/reference/spaces/cloud#spacescloud_connect) | Connects a cloud account (after the checks `cloud_test` runs). |-| [`cloud_disconnect`](/cua-sdk/reference/spaces/cloud#spacescloud_disconnect) | Forgets a connected cloud (nothing in it is deleted). |-| [`cloud_status`](/cua-sdk/reference/spaces/cloud#spacescloud_status) | Your clouds: found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. |-| [`cloud_sweep`](/cua-sdk/reference/spaces/cloud#spacescloud_sweep) | What Cua left in your clouds (expired Spaces, resources whose Space is gone; with `all`, everything Cua created there). |-| [`cloud_test`](/cua-sdk/reference/spaces/cloud#spacescloud_test) | Checks a cloud account without creating anything. |+| [`cloud_connect`](/cua-sdk/reference/spaces/persistent-agents#spacescloud_connect) | Connects a cloud account (after the checks `cloud_test` runs). |+| [`cloud_disconnect`](/cua-sdk/reference/spaces/persistent-agents#spacescloud_disconnect) | Forgets a connected cloud (nothing in it is deleted). |+| [`cloud_status`](/cua-sdk/reference/spaces/persistent-agents#spacescloud_status) | Your clouds: found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. |+| [`cloud_sweep`](/cua-sdk/reference/spaces/persistent-agents#spacescloud_sweep) | What Cua left in your clouds (expired Spaces, resources whose Space is gone; with `all`, everything Cua created there). |+| [`cloud_test`](/cua-sdk/reference/spaces/persistent-agents#spacescloud_test) | Checks a cloud account without creating anything. || [`computer_access`](/cua-sdk/reference/spaces/persistent-agents#spacescomputer_access) | Per-agent computer grants (of one agent, or all). || [`computer_access_grant`](/cua-sdk/reference/spaces/persistent-agents#spacescomputer_access_grant) | Lets one persistent agent use one of the user's computers (asks for presence). || [`computer_access_revoke`](/cua-sdk/reference/spaces/persistent-agents#spacescomputer_access_revoke) | Takes a persistent agent's computer access back (every machine when `machine` is empty). |@@ -66,28 +67,28 @@ Returned by [`Cua.spaces`](/cua-sdk/reference/cua#cua).| [`routines`](/cua-sdk/reference/spaces/persistent-agents#spacesroutines) | Routines (of one agent, or all). || [`volume_approve`](/cua-sdk/reference/spaces/volume#spacesvolume_approve) | `volume_approve`: the request becomes a grant (with presence). || [`volume_audit`](/cua-sdk/reference/spaces/volume#spacesvolume_audit) | `volume_audit`: the newest events (default 50) and whether the log verified. |-| [`volume_cache_clear`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_cache_clear) | `volume_cache_clear`: drops every cached block. |-| [`volume_cache_set`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_cache_set) | `volume_cache_set`: the cache's size cap (at least 256 MiB). |-| [`volume_cache_stats`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_cache_stats) | `volume_cache_stats`: the block cache's size, cap and hit rate. |+| [`volume_cache_clear`](/cua-sdk/reference/spaces/volume#spacesvolume_cache_clear) | `volume_cache_clear`: drops every cached block. |+| [`volume_cache_set`](/cua-sdk/reference/spaces/volume#spacesvolume_cache_set) | `volume_cache_set`: the cache's size cap (at least 256 MiB). |+| [`volume_cache_stats`](/cua-sdk/reference/spaces/volume#spacesvolume_cache_stats) | `volume_cache_stats`: the block cache's size, cap and hit rate. || [`volume_delete`](/cua-sdk/reference/spaces/volume#spacesvolume_delete) | `volume_delete`: a delete marker (history stays). || [`volume_deny`](/cua-sdk/reference/spaces/volume#spacesvolume_deny) | `volume_deny`. || [`volume_grant`](/cua-sdk/reference/spaces/volume#spacesvolume_grant) | `volume_grant`: widens `principal`'s access (`agent:<name>` or `space:<id>`, mode `r` or `rw`). || [`volume_grants`](/cua-sdk/reference/spaces/volume#spacesvolume_grants) | `volume_grants`: live grants (every grant with `all`). || [`volume_history`](/cua-sdk/reference/spaces/volume#spacesvolume_history) | `volume_history`: a file's versions, newest first. || [`volume_ls`](/cua-sdk/reference/spaces/volume#spacesvolume_ls) | `volume_ls`: a folder's immediate children (default the root). |-| [`volume_mount`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_mount) | `volume_mount`: turns the mount on (kept across restarts) and mounts. |-| [`volume_mount_status`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_mount_status) | `volume_mount_status`: whether the drive is mounted as a volume. |+| [`volume_mount`](/cua-sdk/reference/spaces/volume#spacesvolume_mount) | `volume_mount`: turns the mount on (kept across restarts) and mounts. |+| [`volume_mount_status`](/cua-sdk/reference/spaces/volume#spacesvolume_mount_status) | `volume_mount_status`: whether the drive is mounted as a volume. || [`volume_read`](/cua-sdk/reference/spaces/volume#spacesvolume_read) | `volume_read`: a file (or one of its versions). || [`volume_request_access`](/cua-sdk/reference/spaces/volume#spacesvolume_request_access) | `volume_request_access`: `agent` asks the user for more access. || [`volume_requests`](/cua-sdk/reference/spaces/volume#spacesvolume_requests) | `volume_requests`: requests waiting for the user. || [`volume_restore`](/cua-sdk/reference/spaces/volume#spacesvolume_restore) | `volume_restore`: makes an old version current again. || [`volume_revoke`](/cua-sdk/reference/spaces/volume#spacesvolume_revoke) | `volume_revoke`. |-| [`volume_storage`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_storage) | `volume_storage`: where the drive keeps its bytes. |-| [`volume_storage_set`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_storage_set) | `volume_storage_set`: tests, and unless `dry_run` saves and switches to, a storage backend (live, no restart). |-| [`volume_sync_events`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_sync_events) | `volume_sync_events`: events after `since_seq`, waiting up to `wait_ms` (at most 30000) for one. |-| [`volume_sync_resolve`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_sync_resolve) | `volume_sync_resolve`: clears a conflict from the list (files stay). |-| [`volume_sync_status`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_sync_status) | `volume_sync_status`: devices, pending uploads and conflicts. |-| [`volume_unmount`](/cua-sdk/reference/spaces/volume-sync#spacesvolume_unmount) | `volume_unmount`: turns the mount off; pending uploads land first. |+| [`volume_storage`](/cua-sdk/reference/spaces/volume#spacesvolume_storage) | `volume_storage`: where the drive keeps its bytes. |+| [`volume_storage_set`](/cua-sdk/reference/spaces/volume#spacesvolume_storage_set) | `volume_storage_set`: tests, and unless `dry_run` saves and switches to, a storage backend (live, no restart). |+| [`volume_sync_events`](/cua-sdk/reference/spaces/volume#spacesvolume_sync_events) | `volume_sync_events`: events after `since_seq`, waiting up to `wait_ms` (at most 30000) for one. |+| [`volume_sync_resolve`](/cua-sdk/reference/spaces/volume#spacesvolume_sync_resolve) | `volume_sync_resolve`: clears a conflict from the list (files stay). |+| [`volume_sync_status`](/cua-sdk/reference/spaces/volume#spacesvolume_sync_status) | `volume_sync_status`: devices, pending uploads and conflicts. |+| [`volume_unmount`](/cua-sdk/reference/spaces/volume#spacesvolume_unmount) | `volume_unmount`: turns the mount off; pending uploads land first. || [`volume_write`](/cua-sdk/reference/spaces/volume#spacesvolume_write) | `volume_write`: a new version of a file. |### `Spaces.add`@@ -356,7 +357,7 @@ pub async fn cancel_create(&self, space: String) -> Result<SpaceCancelOutcome, C| --- | --- | --- || `space` | `String` | required |-**Returns** [`SpaceCancelOutcome`](/cua-sdk/reference/spaces/create#spacecanceloutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`Cancelled`](/cua-sdk/reference/errors#cancelled))+**Returns** [`SpaceCancelOutcome`](#spacecanceloutcome-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`Cancelled`](/cua-sdk/reference/errors#cancelled))### `Spaces.create`@@ -405,9 +406,9 @@ pub async fn create(&self, options: SpaceCreateOptions) -> Result<SpaceCreateRes| Parameter | Type | Default || --- | --- | --- |-| `options` | [`SpaceCreateOptions`](/cua-sdk/reference/spaces/create#spacecreateoptions-record) | required |+| `options` | [`SpaceCreateOptions`](#spacecreateoptions-record) | required |-**Returns** [`SpaceCreateResult`](/cua-sdk/reference/spaces/create#spacecreateresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)+**Returns** [`SpaceCreateResult`](#spacecreateresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)### `Spaces.create_with_progress`@@ -457,10 +458,10 @@ pub async fn create_with_progress(&self, options: SpaceCreateOptions, listener:| Parameter | Type | Default || --- | --- | --- |-| `options` | [`SpaceCreateOptions`](/cua-sdk/reference/spaces/create#spacecreateoptions-record) | required |-| `listener` | [`SpaceCreateListener`](/cua-sdk/reference/spaces/create#spacecreatelistener) | required |+| `options` | [`SpaceCreateOptions`](#spacecreateoptions-record) | required |+| `listener` | [`SpaceCreateListener`](#spacecreatelistener) | required |-**Returns** [`SpaceCreateResult`](/cua-sdk/reference/spaces/create#spacecreateresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)+**Returns** [`SpaceCreateResult`](#spacecreateresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)### `Spaces.delete`@@ -562,7 +563,7 @@ pub async fn gpu_support(&self, on: Option<String>) -> Result<Vec<GpuSupport>, C| --- | --- | --- || `on` | `Option<String>` | required |-**Returns** [`Vec<GpuSupport>`](/cua-sdk/reference/spaces/create#gpusupport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)+**Returns** [`Vec<GpuSupport>`](#gpusupport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)### `Spaces.hosts`@@ -1155,3 +1156,626 @@ Returned by [`spaces_tool_methods`](#spaces_tool_methods).| --- | --- | --- | --- || `tool` | `String` | | Contract tool name. || `method` | `String` | | `Class.method` (Rust / Python spelling; camelCase in TS, Swift and Kotlin). |++## Create options++`Spaces.create` takes `SpaceCreateOptions` and returns a `SpaceCreateResult`. A `SpaceCreateListener` receives `SpaceCreateProgress` while it runs; `Spaces.cancel_create` stops it. `GpuSupport` says whether a location offers GPU acceleration.++## `SpaceCreateOptions` record++Options for `Spaces.create`: the same location / kind / runtime model+as sandboxes.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `image` | `Option<String>` | `None` | Image (default: the canonical Linux image). |+| `on` | `Option<String>` | `None` | Where: `local` (free) or `cloud` (metered). `None`: the user default (`default.on`, `CUA_DEFAULT_ON`, else `local`). |+| `kind` | `Option<String>` | `None` | `auto` (default), `container` or `vm`. |+| `runtime` | `Option<String>` | `None` | `auto` (default) or an engine the location offers for the kind. |+| `name` | `Option<String>` | `None` | Name (default `space-<hex>`). |+| `cpus` | `Option<u32>` | `None` | vCPUs. Local default 2. |+| `memory_mb` / `memoryMb` | `Option<u64>` | `None` | Memory in MiB. Local default 4096. |+| `disk_gb` / `diskGb` | `Option<u32>` | `None` | Grow the VM's disk to this many GiB (local VMs; default: the image's size, never smaller). Lume grows the macOS APFS container before the first boot; Linux images grow their root partition at boot. Containers and cloud Spaces refuse it. |+| `timeout_ms` / `timeoutMs` | `Option<u64>` | `None` | Readiness budget (local; default 600 s). |+| `wait` | `Option<bool>` | `None` | Wait until ready (default true). |+| `reuse` | `bool` | `false` | Return a reachable registered Space in the same location with the requested services instead of creating one. |+| `command` | `Option<Vec<String>>` | `None` | Entrypoint override. |+| `env` | `HashMap<String, String>` | `[:]` | Guest environment. |+| `services` | `HashMap<String, u16>` | `[:]` | Named services (name → guest port), for example `{"mcp": 8765}`. |+| `spacesd` | `Option<bool>` | `None` | Whether the image runs cua-spacesd (default: yes for the canonical images, no for any other image). |+| `gpu` | `Option<String>` | `None` | A GPU option of the runtime the Space runs on (`Spaces.gpu_support`): `paravirtual` for a macOS VM on Lume (GPU acceleration, experimental), `virgl` (QEMU on Linux), `nvidia` (a runc container on Linux); `auto` picks the runtime's own. `None` (the default): no GPU. Kept with the Space. |+| `create_id` / `createId` | `Option<String>` | `None` | Your own key for this create (an app's pending row), for `Spaces.cancel_create` before the Space's id is known. |++## `SpaceCreateResult` record++Result of `Spaces.create`.++Returned by [`Spaces.create`](#spacescreate), [`Spaces.create_with_progress`](#spacescreate_with_progress).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | [`Option<SpaceInfo>`](#spaceinfo-record) | | The Space, once ready. |+| `pending_id` / `pendingId` | `Option<String>` | | With `wait = false`: the id the Space will have. |+| `reused` | `bool` | | `reuse` returned an existing Space. |++## `SpaceCreateProgress` record++What a Space create is doing (see `Spaces.create_with_progress`).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `phase` | `String` | | `preparing`, `pulling`, `creating`, `booting`, `waiting_for_services`, `connecting` or `ready`, in that order. |+| `fraction` | `Option<f64>` | | How far through the phase, 0.0 to 1.0, when its size is known (an image pull). |+| `detail` | `String` | | One short line, for example the image being pulled. |+| `bytes_done` / `bytesDone` | `Option<u64>` | `None` | Bytes downloaded so far, when the step counts them (an image pull). |+| `bytes_total` / `bytesTotal` | `Option<u64>` | `None` | Bytes the download has in all. |+| `bytes_per_second` / `bytesPerSecond` | `Option<f64>` | `None` | Smoothed download rate, bytes per second (time left: the bytes to go over it). |+| `space` | `String` | `""` | The id the Space will have (`local:<name>`), for `Spaces.cancel_create`. |++## `SpaceCreateListener`++Receives `SpaceCreateProgress` while `Spaces.create_with_progress`+runs, in order, ending with `ready`. Called on an SDK worker thread;+return quickly.++<Callout>+You implement `SpaceCreateListener` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `SpaceCreateListener` protocol in Swift, the interface in Kotlin and the trait in Rust.+</Callout>++| Method | Description |+| --- | --- |+| [`on_progress`](#spacecreatelisteneron_progress) | The create moved on. |++### `SpaceCreateListener.on_progress`++The create moved on.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def on_progress(self, progress: SpaceCreateProgress) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+onProgress(progress: SpaceCreateProgress): void+```++</Tab>+<Tab value="Swift">++```swift+func onProgress(progress: SpaceCreateProgress)+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun onProgress(progress: SpaceCreateProgress)+```++</Tab>+<Tab value="Rust">++```rust+pub fn on_progress(&self, progress: SpaceCreateProgress)+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `progress` | [`SpaceCreateProgress`](#spacecreateprogress-record) | required |++## `SpaceCancelOutcome` record++What `Spaces.cancel_create` did.++Returned by [`Spaces.cancel_create`](#spacescancel_create).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `String` | | The Space id the create had (`local:<name>`), when known. |+| `state` | `String` | | `cancelled`, `not_creating` (nothing by that key is running) or `already_created` (it finished: delete it instead). |+| `message` | `String` | | What was removed and what stays, for people. |++## `GpuSupport` record++The GPU options of one runtime: empty, with the reason, when it has+none.++Returned by [`Spaces.gpu_support`](#spacesgpu_support).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `runtime` | `String` | | `lume`, `qemu`, `container`, `gvisor`, a provider's name. |+| `options` | [`Vec<GpuOption>`](#gpuoption-record) | | Its options. |+| `reason` | `String` | | Why it has none. |++## `GpuOption` record++One GPU option of a runtime (see `Spaces.gpu_support`).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `String` | | What to pass as `gpu`. |+| `label` | `String` | | How a person names it ("GPU acceleration"). |+| `experimental` | `bool` | | Experimental. |+| `supported` | `bool` | | Works on this host now. |+| `reason` | `String` | | Why not, one short line (empty when supported). |+| `learn_more` / `learnMore` | `Option<String>` | | A page that explains it. |+| `usd_per_hour` / `usdPerHour` | `Option<f64>` | | Estimated cost per hour while it runs (cloud GPU types). |++## Agents in a Space++An agent run is a coding-agent CLI started in the Space with a prompt, detached from the call that started it.++## Agent runs++Methods of [`Space`](/cua-sdk/reference/spaces/space#space).++### `Space.agent_start`++Starts an agent CLI (`claude-code`, `openai-codex`, ...) with a+prompt, as a detached spacesd process.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_start(self, agent: str, prompt: str, show: Optional[bool], options: Optional[SpaceAgentOptions]) -> AgentStartReport+```++</Tab>+<Tab value="TypeScript">++```ts+agentStart(agent: string, prompt: string, show: boolean | undefined, options: SpaceAgentOptions | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<AgentStartReport>+```++</Tab>+<Tab value="Swift">++```swift+func agentStart(agent: String, prompt: String, show: Bool?, options: SpaceAgentOptions?) async throws -> AgentStartReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentStart(agent: String, prompt: String, show: Boolean?, options: SpaceAgentOptions?): AgentStartReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_start(&self, agent: String, prompt: String, show: Option<bool>, options: Option<SpaceAgentOptions>) -> Result<AgentStartReport, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `agent` | `String` | required |+| `prompt` | `String` | required |+| `show` | `Option<bool>` | required |+| `options` | [`Option<SpaceAgentOptions>`](#spaceagentoptions-record) | required |++**Returns** [`AgentStartReport`](#agentstartreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.agent_status`++A run's status with the last `tail` lines of output.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_status(self, run_id: str, tail: Optional[int]) -> AgentRunStatus+```++</Tab>+<Tab value="TypeScript">++```ts+agentStatus(runId: string, tail: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<AgentRunStatus>+```++</Tab>+<Tab value="Swift">++```swift+func agentStatus(runId: String, tail: UInt32?) async throws -> AgentRunStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentStatus(runId: String, tail: UInt?): AgentRunStatus+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_status(&self, run_id: String, tail: Option<u32>) -> Result<AgentRunStatus, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `run_id` | `String` | required |+| `tail` | `Option<u32>` | required |++**Returns** [`AgentRunStatus`](#agentrunstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.agent_events`++Normalized events after `cursor` (0: the start), as the+`agent_events` JSON (`events`, `cursor`, `caught_up`, `status`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_events(self, run_id: str, cursor: Optional[int], max: Optional[int]) -> str+```++</Tab>+<Tab value="TypeScript">++```ts+agentEvents(runId: string, cursor: bigint | undefined, max: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<string>+```++</Tab>+<Tab value="Swift">++```swift+func agentEvents(runId: String, cursor: UInt64?, max: UInt32?) async throws -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentEvents(runId: String, cursor: ULong?, max: UInt?): String+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_events(&self, run_id: String, cursor: Option<u64>, max: Option<u32>) -> Result<String, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `run_id` | `String` | required |+| `cursor` | `Option<u64>` | required |+| `max` | `Option<u32>` | required |++**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.agent_message`++Sends a follow-up message to a run.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_message(self, run_id: str, text: str, force: Optional[bool]) -> AgentActionReport+```++</Tab>+<Tab value="TypeScript">++```ts+agentMessage(runId: string, text: string, force: boolean | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<AgentActionReport>+```++</Tab>+<Tab value="Swift">++```swift+func agentMessage(runId: String, text: String, force: Bool?) async throws -> AgentActionReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentMessage(runId: String, text: String, force: Boolean?): AgentActionReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_message(&self, run_id: String, text: String, force: Option<bool>) -> Result<AgentActionReport, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `run_id` | `String` | required |+| `text` | `String` | required |+| `force` | `Option<bool>` | required |++**Returns** [`AgentActionReport`](#agentactionreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.agent_interrupt`++Cancels the run's turn in flight; the session stays open.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_interrupt(self, run_id: str) -> AgentActionReport+```++</Tab>+<Tab value="TypeScript">++```ts+agentInterrupt(runId: string, asyncOpts_?: { signal: AbortSignal }): Promise<AgentActionReport>+```++</Tab>+<Tab value="Swift">++```swift+func agentInterrupt(runId: String) async throws -> AgentActionReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentInterrupt(runId: String): AgentActionReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_interrupt(&self, run_id: String) -> Result<AgentActionReport, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `run_id` | `String` | required |++**Returns** [`AgentActionReport`](#agentactionreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.agent_list`++Every agent run in this Space.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_list(self) -> List[AgentRunStatus]+```++</Tab>+<Tab value="TypeScript">++```ts+agentList(asyncOpts_?: { signal: AbortSignal }): Promise<Array<AgentRunStatus>>+```++</Tab>+<Tab value="Swift">++```swift+func agentList() async throws -> [AgentRunStatus]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentList(): List<AgentRunStatus>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_list(&self) -> Result<Vec<AgentRunStatus>, CuaError>+```++</Tab>+</Tabs>++**Returns** [`Vec<AgentRunStatus>`](#agentrunstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.agent_stop`++Stops a run.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_stop(self, run_id: str) -> AgentActionReport+```++</Tab>+<Tab value="TypeScript">++```ts+agentStop(runId: string, asyncOpts_?: { signal: AbortSignal }): Promise<AgentActionReport>+```++</Tab>+<Tab value="Swift">++```swift+func agentStop(runId: String) async throws -> AgentActionReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentStop(runId: String): AgentActionReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_stop(&self, run_id: String) -> Result<AgentActionReport, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `run_id` | `String` | required |++**Returns** [`AgentActionReport`](#agentactionreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## Harnesses++Methods of [`Spaces`](#spaces).++### `Spaces.agent_capabilities`++What every agent harness is and cannot do (`agent_capabilities`),+as JSON.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def agent_capabilities(self) -> str+```++</Tab>+<Tab value="TypeScript">++```ts+agentCapabilities(asyncOpts_?: { signal: AbortSignal }): Promise<string>+```++</Tab>+<Tab value="Swift">++```swift+func agentCapabilities() async throws -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun agentCapabilities(): String+```++</Tab>+<Tab value="Rust">++```rust+pub async fn agent_capabilities(&self) -> Result<String, CuaError>+```++</Tab>+</Tabs>++**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `AgentStartReport` record++Result of `Space.agent_start`.++Returned by [`Space.agent_start`](#spaceagent_start).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `run_id` / `runId` | `String` | | Run id. |+| `agent` | `String` | | Agent. |+| `space` | `String` | | Space. |+| `process_tag` / `processTag` | `String` | | spacesd process tag of the first turn. |+| `notes` | `Vec<String>` | | Preparation steps that could not be completed. |+| `json` | `String` | | The whole report as JSON. |++## `AgentRunStatus` record++One agent run's status.++Returned by [`Space.agent_list`](#spaceagent_list), [`Space.agent_status`](#spaceagent_status).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `run_id` / `runId` | `String` | | Run id. |+| `agent` | `Option<String>` | | Agent. |+| `status` | `String` | | Status (`running`, `done`, `failed`, ...). |+| `reason` | `String` | | Why. |+| `phase` | `String` | | Finer grain: `installing`, `working`, `waiting`, `exited`, ... |+| `result_text` / `resultText` | `Option<String>` | | The last turn's final text (`agent_status` only). |+| `accepts_message` / `acceptsMessage` | `bool` | | A follow-up sent now starts the next turn (the server's rule: idle, or a crashed or failed run it restarts; not mid-turn). Read this, never derive it from `status`. |+| `output_tail` / `outputTail` | `Option<String>` | | Output tail. |+| `json` | `String` | | The whole status as JSON. |++## `AgentActionReport` record++Result of `Space.agent_message` / `Space.agent_stop`.++Returned by [`Space.agent_interrupt`](#spaceagent_interrupt), [`Space.agent_message`](#spaceagent_message), [`Space.agent_stop`](#spaceagent_stop).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `run_id` / `runId` | `String` | | Run id. |+| `ok` | `bool` | | Delivered (message) or stopped (stop). |+| `reason` | `String` | | Why. |+| `json` | `String` | | The whole report as JSON. |++## `SpaceAgentOptions` record++Options for `Space.agent_start` beyond the harness and prompt.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `env_from_host` / `envFromHost` | `Vec<String>` | `[]` | Provider key variables forwarded from the Spaces host's environment. |+| `env` | `HashMap<String, String>` | `[:]` | More environment for the agent, for example `HERMES_HOME` (stored 0600 in the run, redacted from its output; not for provider keys). |+| `repo` | `Option<String>` | `None` | |+| `branch` | `Option<String>` | `None` | |+| `cwd` | `Option<String>` | `None` | |+| `model` | `Option<String>` | `None` | |+| `base_url` / `baseUrl` | `Option<String>` | `None` | A custom model endpoint. |+| `exit_when_idle` / `exitWhenIdle` | `Option<bool>` | `None` | Stop (resumably) once the prompt is answered. |+| `home` | `Option<String>` | `None` | Run as this persistent agent: its home in the Cua Volume is restored first and saved after every turn (see `Spaces.persistent_agent_send`). |diff --git a/docs/content/docs/cua-sdk/reference/spaces/machines-app-core.mdx b/docs/content/docs/cua-sdk/reference/spaces/machines-app-core.mdxdeleted file mode 100644index 744ca7c84d..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/machines-app-core.mdx+++ /dev/null@@ -1,120 +0,0 @@-----title: "Machines page"-description: "The Machines page's rows: this machine, your machines and your devices, each computer once."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_machines_page_rows` builds the Machines page from what an app has: the Spaces list (a machine sharing its own desktop, one that provides Spaces), what the relay says of each machine, and the account's devices (`AppDeviceIn`). A machine and the device on it are one row; a device that is none of the machines is listed on its own (`device_only`) and is never a Run on choice. Every Spaces UI lists these rows.--## `AppDeviceIn` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | `dev_…`. |-| `name` | `String` | | Its name (by default its hostname). |-| `platform` | `String` | | `macos`, `windows`, `linux` (any case), or empty. |-| `last_seen` / `lastSeen` | `Option<u64>` | | Last session (Unix seconds). |-| `current` | `bool` | | This device. |-| `state` | `String` | | `pending`, `enrolled`, `expired`, `revoked`, or empty. |--## `AppMachinePageRow` record--Returned by [`app_machines_page_rows`](#app_machines_page_rows).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | The machine's id (`this-mac`, a relay machine id), or the device's id for a device of its own. |-| `name` | `String` | | What the page calls it. |-| `online` | `bool` | | Reached, connected to the relay, or (a device of its own) in a session in the last `DEVICE_ONLINE_SECS`. |-| `os` | `String` | | `macos`, `linux`, `windows`, or empty when unknown. |-| `via` | `String` | | `local` (this machine) or `relay`. |-| `current` | `bool` | | The machine this app runs on. |-| `device` | `Option<String>` | | The device listed in this row, if any. |-| `device_only` / `deviceOnly` | `bool` | | A device that is none of the machines: listed, never a "Run on" choice, and it has no Spaces or desktop of its own here. |-| `space_id` / `spaceId` | `Option<String>` | | The Spaces list's row that is this machine's own desktop (`this-mac`, `relay:<machine>`), when there is one: the classic UI's detail for it. |-| `stopped_sharing` / `stoppedSharing` | `bool` | | Online, but its owner stopped sharing it. |-| `last_seen` / `lastSeen` | `Option<u64>` | | The device's last session (Unix seconds), when it has a device. |-| `status` | `String` | | The row's status word, the same in every UI (`status_word`): "Online", "Not sharing" or "Offline". |-| `spaces` | `u32` | | The Spaces it runs that the Spaces list shows: this machine's local Spaces, or the Spaces another machine provides (`host`). |-| `spaces_label` / `spacesLabel` | `String` | | "1 Space", "3 Spaces", "No Spaces" (`spaces_label`); empty for a device of its own, which runs no Spaces. |--## `AppMachinesPageInput` record--Returned by [`app_machines_page_input_from_json`](#app_machines_page_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `host_os` / `hostOs` | [`AppSpaceOs`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | The system this app runs on (names the first row "This Mac"). |-| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | | The Spaces list as the shell has it (registry rows as Spaces). |-| `devices` | [`Vec<AppDeviceIn>`](#appdevicein-record) | | The account's devices (none while signed out). |-| `hostnames` | `HashMap<String, String>` | | The hostname each machine's cua-spacesd reported, by machine id. |-| `presence` | `HashMap<String, bool>` | | Whether the relay sees each machine connected now, by machine id. |-| `now` | `u64` | | Unix seconds. |--## `app_machines_page_input_from_json`--Machines page input from JSON (fixtures, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMachinesPageInputFromJson(json: String) throws -> AppMachinesPageInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_machines_page_input_from_json(json: String) -> Result<AppMachinesPageInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppMachinesPageInput`](#appmachinespageinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_machines_page_rows`--The Machines page's rows: this machine, your machines, your devices of-their own, each computer once.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appMachinesPageRows(input: AppMachinesPageInput) -> [AppMachinePageRow]-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_machines_page_rows(input: AppMachinesPageInput) -> Vec<AppMachinePageRow>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppMachinesPageInput`](#appmachinespageinput-record) | required |--**Returns** [`Vec<AppMachinePageRow>`](#appmachinepagerow-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/meta.json b/docs/content/docs/cua-sdk/reference/spaces/meta.jsonindex 104de1f93d..41c5f58f80 100644--- a/docs/content/docs/cua-sdk/reference/spaces/meta.json+++ b/docs/content/docs/cua-sdk/reference/spaces/meta.json@@ -1,26 +1,10 @@{"title": "Spaces","pages": [- "create","space","volume",- "volume-sync","streams",- "windows",- "agents","persistent-agents",- "cloud",- "teleport",- "decoded-media",- "teleport-host",- "teleport-apps",- "app-core",- "volume-app-core",- "agents-app-core",- "account-app-core",- "machines-app-core",- "app-checklist-palette",- "devices","host"]}diff --git a/docs/content/docs/cua-sdk/reference/spaces/persistent-agents.mdx b/docs/content/docs/cua-sdk/reference/spaces/persistent-agents.mdxindex 6b7f406287..d272fadd07 100644--- a/docs/content/docs/cua-sdk/reference/spaces/persistent-agents.mdx+++ b/docs/content/docs/cua-sdk/reference/spaces/persistent-agents.mdx@@ -1,6 +1,6 @@----title: "Persistent agents"-description: "Named agents whose memory outlives their Space: homes in the Cua Volume, routines, notifications, pause and resume, access to your computers."+title: "Persistent agents and your cloud"+description: "Named agents whose memory outlives their Space: homes in the Cua Volume, routines, notifications, pause and resume, access to your computers, and Spaces in your own AWS, Google Cloud or Modal account."---{/*@@ -1019,3 +1019,421 @@ Returned by [`Spaces.computer_access`](#spacescomputer_access), [`Spaces.compute| `created_ms` / `createdMs` | `u64` | | || `expires_ms` / `expiresMs` | `Option<u64>` | | || `revoked` | `bool` | | |++## Your cloud++Create a sandbox or Space with `on="aws"`, `"gcp"` or `"modal"` once the cloud is connected. Each cloud uses its own CLI sign-in; Cua stores only the profile, region, project or environment names. The guest dials out to the cua.ai relay, so nothing listens on the internet. `cloud_test` creates nothing; `cloud_sweep` deletes only what Cua tagged and recorded.++Methods of [`Spaces`](/cua-sdk/reference/spaces#spaces).++### `Spaces.cloud_status`++Your clouds: found credentials, the connected account and region,+what each can run at what hourly cost, and what Cua created there.+`provider` narrows it to one cloud.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def cloud_status(self, provider: Optional[str]) -> CloudStatus+```++</Tab>+<Tab value="TypeScript">++```ts+cloudStatus(provider: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<CloudStatus>+```++</Tab>+<Tab value="Swift">++```swift+func cloudStatus(provider: String?) async throws -> CloudStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun cloudStatus(provider: String?): CloudStatus+```++</Tab>+<Tab value="Rust">++```rust+pub async fn cloud_status(&self, provider: Option<String>) -> Result<CloudStatus, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `provider` | `Option<String>` | required |++**Returns** [`CloudStatus`](#cloudstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.cloud_connect`++Connects a cloud account (after the checks `cloud_test` runs). With+`make_default`, Spaces are created there when no location is given.+`ttl_hours` (default 8, 0: never) deletes each Space there after+that long.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def cloud_connect(self, target: CloudTarget, make_default: bool, ttl_hours: Optional[int]) -> CloudConnected+```++</Tab>+<Tab value="TypeScript">++```ts+cloudConnect(target: CloudTarget, makeDefault: boolean, ttlHours: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<CloudConnected>+```++</Tab>+<Tab value="Swift">++```swift+func cloudConnect(target: CloudTarget, makeDefault: Bool, ttlHours: UInt32?) async throws -> CloudConnected+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun cloudConnect(target: CloudTarget, makeDefault: Boolean, ttlHours: UInt?): CloudConnected+```++</Tab>+<Tab value="Rust">++```rust+pub async fn cloud_connect(&self, target: CloudTarget, make_default: bool, ttl_hours: Option<u32>) -> Result<CloudConnected, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `target` | [`CloudTarget`](#cloudtarget-record) | required |+| `make_default` | `bool` | required |+| `ttl_hours` | `Option<u32>` | required |++**Returns** [`CloudConnected`](#cloudconnected-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.cloud_test`++Checks a cloud account without creating anything.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def cloud_test(self, target: CloudTarget) -> CloudTestReport+```++</Tab>+<Tab value="TypeScript">++```ts+cloudTest(target: CloudTarget, asyncOpts_?: { signal: AbortSignal }): Promise<CloudTestReport>+```++</Tab>+<Tab value="Swift">++```swift+func cloudTest(target: CloudTarget) async throws -> CloudTestReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun cloudTest(target: CloudTarget): CloudTestReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn cloud_test(&self, target: CloudTarget) -> Result<CloudTestReport, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `target` | [`CloudTarget`](#cloudtarget-record) | required |++**Returns** [`CloudTestReport`](#cloudtestreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.cloud_disconnect`++Forgets a connected cloud (nothing in it is deleted).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def cloud_disconnect(self, provider: str) -> CloudDisconnected+```++</Tab>+<Tab value="TypeScript">++```ts+cloudDisconnect(provider: string, asyncOpts_?: { signal: AbortSignal }): Promise<CloudDisconnected>+```++</Tab>+<Tab value="Swift">++```swift+func cloudDisconnect(provider: String) async throws -> CloudDisconnected+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun cloudDisconnect(provider: String): CloudDisconnected+```++</Tab>+<Tab value="Rust">++```rust+pub async fn cloud_disconnect(&self, provider: String) -> Result<CloudDisconnected, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `provider` | `String` | required |++**Returns** [`CloudDisconnected`](#clouddisconnected-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.cloud_sweep`++What Cua left in your clouds (expired Spaces, resources whose Space+is gone; with `all`, everything Cua created there). Deletes it+unless `dry_run`. Only resources tagged and recorded as Cua's are+ever touched.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def cloud_sweep(self, provider: Optional[str], dry_run: bool, all: bool) -> CloudSweepReport+```++</Tab>+<Tab value="TypeScript">++```ts+cloudSweep(provider: string | undefined, dryRun: boolean, all: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<CloudSweepReport>+```++</Tab>+<Tab value="Swift">++```swift+func cloudSweep(provider: String?, dryRun: Bool, all: Bool) async throws -> CloudSweepReport+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun cloudSweep(provider: String?, dryRun: Boolean, all: Boolean): CloudSweepReport+```++</Tab>+<Tab value="Rust">++```rust+pub async fn cloud_sweep(&self, provider: Option<String>, dry_run: bool, all: bool) -> Result<CloudSweepReport, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `provider` | `Option<String>` | required |+| `dry_run` | `bool` | required |+| `all` | `bool` | required |++**Returns** [`CloudSweepReport`](#cloudsweepreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `CloudTarget` record++Where in a cloud account Spaces go. Credentials are never here: each+cloud uses its own CLI sign-in.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | `String` | | `aws`, `gcp` or `modal`. |+| `profile` | `Option<String>` | `None` | AWS or Modal profile. |+| `region` | `Option<String>` | `None` | AWS or GCP region. |+| `zone` | `Option<String>` | `None` | GCP zone. |+| `project` | `Option<String>` | `None` | GCP project. |+| `environment` | `Option<String>` | `None` | Modal environment. |++## `CloudStatus` record++`cloud_status`.++Returned by [`Spaces.cloud_status`](#spacescloud_status).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `default_on` / `defaultOn` | `String` | | `default.on`, for example `aws`. |+| `providers` | [`Vec<CloudProvider>`](#cloudprovider-record) | | |+| `resources` | [`Vec<CloudResource>`](#cloudresource-record) | | |++## `CloudProvider` record++One cloud as `cloud_status` lists it.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `String` | | `aws`, `gcp`, `modal`. |+| `title` | `String` | | `AWS`, `Google Cloud`, `Modal`. |+| `tier` | `String` | | `vm` or `sandbox`. |+| `connected` | `bool` | | |+| `default` | `bool` | | Whether it is the default location (`default.on`). |+| `credentials` | [`CloudCredentials`](#cloudcredentials-record) | | |+| `account` | `String` | | The account, project or workspace (after a test or connect). |+| `profile` | `String` | | |+| `region` | `String` | | |+| `zone` | `String` | | |+| `project` | `String` | | |+| `environment` | `String` | | |+| `label` | `String` | | "AWS · us-west-2". |+| `ttl_hours` / `ttlHours` | `u32` | | Hours after which a Space there deletes itself (0: never). |+| `kinds` | [`Vec<CloudKind>`](#cloudkind-record) | | |++## `CloudKind` record++What a cloud can run for one image family, and the estimated cost.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `image` | `String` | | `linux`, `linux-slim`, `windows`, `omarchy`, `macos`. |+| `kind` | `String` | | `container` or `vm`. |+| `supported` | `bool` | | |+| `reason` | `String` | | Why not, or how it runs (one line). |+| `machine_type` / `machineType` | `String` | | The machine type Cua picks (`t3.medium`, `e2-medium`). |+| `usd_per_hour` / `usdPerHour` | `f64` | | Estimated on-demand US dollars per hour while it runs. |++## `CloudCredentials` record++Where a cloud's credentials were found on this machine (never a+secret).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `found` | `bool` | | |+| `source` | `String` | | "~/.aws profile default", "gcloud account [email protected]". |++## `CloudResource` record++One thing Cua created in a cloud.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | `String` | | |+| `id` | `String` | | The cloud's id. |+| `resource_type` / `resourceType` | `String` | | `instance`, `security_group`, `firewall`, `sandbox`, ... |+| `sandbox` | `String` | | The sandbox it belongs to (`aws:<name>`), empty for shared resources. |+| `machine` | `String` | | The relay machine the sandbox joined as (its Space is `relay:<machine>`). |+| `region` | `String` | | |+| `state` | `String` | | |+| `created` | `String` | | RFC 3339. |+| `expires` | `String` | | RFC 3339, empty: never. |+| `expired` | `bool` | | |++## `CloudConnected` record++`cloud_connect`: the connected cloud and the checks it passed.++Returned by [`Spaces.cloud_connect`](#spacescloud_connect).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | [`CloudProvider`](#cloudprovider-record) | | |+| `checks` | [`Vec<CloudCheck>`](#cloudcheck-record) | | |++## `CloudCheck` record++One check `cloud_test` ran.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `String` | | |+| `ok` | `bool` | | |+| `detail` | `String` | | |++## `CloudTestReport` record++`cloud_test`.++Returned by [`Spaces.cloud_test`](#spacescloud_test).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | `String` | | |+| `ok` | `bool` | | |+| `account` | `String` | | |+| `checks` | [`Vec<CloudCheck>`](#cloudcheck-record) | | |++## `CloudDisconnected` record++`cloud_disconnect`.++Returned by [`Spaces.cloud_disconnect`](#spacescloud_disconnect).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | `String` | | |+| `disconnected` | `bool` | | |+| `left` | [`Vec<CloudResource>`](#cloudresource-record) | | Resources Cua still records there. |++## `CloudSweepReport` record++`cloud_sweep`.++Returned by [`Spaces.cloud_sweep`](#spacescloud_sweep).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `dry_run` / `dryRun` | `bool` | | |+| `resources` | [`Vec<CloudSweepItem>`](#cloudsweepitem-record) | | |++## `CloudSweepItem` record++One row of `cloud_sweep`.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `resource` | [`CloudResource`](#cloudresource-record) | | |+| `action` | `String` | | `delete` (dry run), `deleted`, `keep` or `failed`. |+| `reason` | `String` | | |diff --git a/docs/content/docs/cua-sdk/reference/spaces/space.mdx b/docs/content/docs/cua-sdk/reference/spaces/space.mdxindex c481e007e7..0070763a57 100644--- a/docs/content/docs/cua-sdk/reference/spaces/space.mdx+++ b/docs/content/docs/cua-sdk/reference/spaces/space.mdx@@ -1,6 +1,6 @@---title: "Space"-description: "A connected Space: shell, files, tools, windows and the hotspot."+description: "A connected Space: shell, files, tools, windows, icons, displays, the hotspot and teleport."---{/*@@ -10,6 +10,7 @@ description: "A connected Space: shell, files, tools, windows and the hotspot."Version: 0.5.0*/}+import { Callout } from 'fumadocs-ui/components/callout';import { Tab, Tabs } from 'fumadocs-ui/components/tabs';Connected machine primitives; missing spacesd features return `CapabilityMissing`.@@ -42,28 +43,28 @@ Returned by [`Spaces.space`](/cua-sdk/reference/spaces#spacesspace).| [`unshare`](#spaceunshare) | Stops sharing this Space with `who` at once, or with everyone when `who` is `None`. || [`upload`](#spaceupload) | Copies a host file or folder to `dest` in the Space (default: the home directory). || [`write`](#spacewrite) | Writes bytes to a guest path (parents created, verified by SHA-256). |-| [`agent_events`](/cua-sdk/reference/spaces/agents#spaceagent_events) | Normalized events after `cursor` (0: the start), as the `agent_events` JSON (`events`, `cursor`, `caught_up`, `status`). |-| [`agent_interrupt`](/cua-sdk/reference/spaces/agents#spaceagent_interrupt) | Cancels the run's turn in flight; the session stays open. |-| [`agent_list`](/cua-sdk/reference/spaces/agents#spaceagent_list) | Every agent run in this Space. |-| [`agent_message`](/cua-sdk/reference/spaces/agents#spaceagent_message) | Sends a follow-up message to a run. |-| [`agent_start`](/cua-sdk/reference/spaces/agents#spaceagent_start) | Starts an agent CLI (`claude-code`, `openai-codex`, ...) with a prompt, as a detached spacesd process. |-| [`agent_status`](/cua-sdk/reference/spaces/agents#spaceagent_status) | A run's status with the last `tail` lines of output. |-| [`agent_stop`](/cua-sdk/reference/spaces/agents#spaceagent_stop) | Stops a run. |-| [`app_icon`](/cua-sdk/reference/spaces/windows#spaceapp_icon) | The icon the guest desktop shows for a window's app (pass the window's `app_name`, `app_id` and `pid`), or `None` when the Space has none: show no icon then, not a placeholder. |-| [`app_icons`](/cua-sdk/reference/spaces/windows#spaceapp_icons) | Icons for many windows' apps at once, in request order (`None`: the Space has no icon for that app; show none). |+| [`agent_events`](/cua-sdk/reference/spaces#spaceagent_events) | Normalized events after `cursor` (0: the start), as the `agent_events` JSON (`events`, `cursor`, `caught_up`, `status`). |+| [`agent_interrupt`](/cua-sdk/reference/spaces#spaceagent_interrupt) | Cancels the run's turn in flight; the session stays open. |+| [`agent_list`](/cua-sdk/reference/spaces#spaceagent_list) | Every agent run in this Space. |+| [`agent_message`](/cua-sdk/reference/spaces#spaceagent_message) | Sends a follow-up message to a run. |+| [`agent_start`](/cua-sdk/reference/spaces#spaceagent_start) | Starts an agent CLI (`claude-code`, `openai-codex`, ...) with a prompt, as a detached spacesd process. |+| [`agent_status`](/cua-sdk/reference/spaces#spaceagent_status) | A run's status with the last `tail` lines of output. |+| [`agent_stop`](/cua-sdk/reference/spaces#spaceagent_stop) | Stops a run. |+| [`app_icon`](/cua-sdk/reference/spaces/space#spaceapp_icon) | The icon the guest desktop shows for a window's app (pass the window's `app_name`, `app_id` and `pid`), or `None` when the Space has none: show no icon then, not a placeholder. |+| [`app_icons`](/cua-sdk/reference/spaces/space#spaceapp_icons) | Icons for many windows' apps at once, in request order (`None`: the Space has no icon for that app; show none). || [`attach_stream`](/cua-sdk/reference/spaces/streams#spaceattach_stream) | Attaches to a ticket from `Self.open_stream` and delivers the media socket's encoded frames and audio packets to the sinks as they arrive. || [`close_stream`](/cua-sdk/reference/spaces/streams#spaceclose_stream) | Closes a media session opened with `Space.open_stream`. |-| [`displays`](/cua-sdk/reference/spaces/windows#spacedisplays) | The Space's displays, primary first, with their resolution in physical pixels. |+| [`displays`](/cua-sdk/reference/spaces/space#spacedisplays) | The Space's displays, primary first, with their resolution in physical pixels. || [`join_presence`](/cua-sdk/reference/spaces/streams#spacejoin_presence) | Joins presence. || [`open_stream`](/cua-sdk/reference/spaces/streams#spaceopen_stream) | Mints a media session (ticket + WebSocket URL) for another client to attach to. || [`spacesd`](/cua-sdk/reference/spacesd#spacespacesd) | The cua-spacesd client over the connection this Space authenticated. || [`stream_session`](/cua-sdk/reference/spaces/streams#spacestream_session) | Opens a media session and delivers keyframe-gated encoded frames and audio to the sinks (one delivery thread; decoding stays with the caller). |-| [`teleport`](/cua-sdk/reference/spaces/teleport#spaceteleport) | Teleports `app`'s session into this Space. |-| [`teleport_manifest`](/cua-sdk/reference/spaces/teleport#spaceteleport_manifest) | What teleporting `app` (`full` or `tabs`) would move from this host. |-| [`thumbnail`](/cua-sdk/reference/spaces/windows#spacethumbnail) | The Space's latest thumbnail (a small JPEG of its primary display) from the cache every client on this machine shares: returned at once when it is younger than `max_age_ms` (unset: any age), else captured fresh through cua-spacesd and kept for the next caller. |-| [`usage`](/cua-sdk/reference/spaces/windows#spaceusage) | Memory and storage use now (cheap: poll it at a low rate while a detail is visible). |+| [`teleport`](/cua-sdk/reference/spaces/space#spaceteleport) | Teleports `app`'s session into this Space. |+| [`teleport_manifest`](/cua-sdk/reference/spaces/space#spaceteleport_manifest) | What teleporting `app` (`full` or `tabs`) would move from this host. |+| [`thumbnail`](/cua-sdk/reference/spaces/space#spacethumbnail) | The Space's latest thumbnail (a small JPEG of its primary display) from the cache every client on this machine shares: returned at once when it is younger than `max_age_ms` (unset: any age), else captured fresh through cua-spacesd and kept for the next caller. |+| [`usage`](/cua-sdk/reference/spaces/space#spaceusage) | Memory and storage use now (cheap: poll it at a low rate while a detail is visible). || [`websocket_headers`](/cua-sdk/reference/spaces/streams#spacewebsocket_headers) | Headers a media WebSocket to this Space needs besides its ticket. |-| [`window_thumbnail`](/cua-sdk/reference/spaces/windows#spacewindow_thumbnail) | A small JPEG preview of one of the Space's windows (`window_id` and `epoch` from `windows`), at most `max_dimension` px, reused for a few seconds (the SDK's preview cache); `None` when the guest captured nothing. |+| [`window_thumbnail`](/cua-sdk/reference/spaces/space#spacewindow_thumbnail) | A small JPEG preview of one of the Space's windows (`window_id` and `epoch` from `windows`), at most `max_dimension` px, reused for a few seconds (the SDK's preview cache); `None` when the guest captured nothing. || [`windows`](/cua-sdk/reference/spaces/streams#spacewindows) | Streamable windows, optionally of one app. || Accessor | Returns | Description |@@ -1259,3 +1260,641 @@ One limit of a host that provides Spaces and how much of it is used.| `used` | `u32` | | In use now. || `limit` | `u32` | | The limit (0: none). || `reason` | `String` | | Why the limit exists, for people. |++## Windows, icons and displays++`app_icons` answers a whole window list in one call: cached icons come from memory or `$CUA_HOME/cache/icons`, and every miss costs one guest round trip. `thumbnail` is the Space's latest small preview from the cache every client on the machine shares (`$CUA_HOME/cache/thumbnails`, kept fresh by the daemon while someone asks). `window_thumbnail` previews one window, reused for a few seconds. `displays` lists the displays with their resolution and `usage` the memory and storage use.++Methods of [`Space`](#space).++### `Space.app_icons`++Icons for many windows' apps at once, in request order (`None`: the+Space has no icon for that app; show none). Answered by the SDK's+one icon cache (memory, then `$CUA_HOME/cache/icons`, keyed by the+app and the Space's image, never the pid); every miss costs one+guest round trip for the whole batch. macOS renders the app bundle+of the pid; Linux reads the `.desktop` entry's `Icon=` from the icon+theme; Windows has none.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def app_icons(self, requests: List[SpaceAppIconRequest]) -> List[Optional[SpaceAppIcon]]+```++</Tab>+<Tab value="TypeScript">++```ts+appIcons(requests: Array<SpaceAppIconRequest>, asyncOpts_?: { signal: AbortSignal }): Promise<Array<SpaceAppIcon | undefined>>+```++</Tab>+<Tab value="Swift">++```swift+func appIcons(requests: [SpaceAppIconRequest]) async throws -> [SpaceAppIcon?]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun appIcons(requests: List<SpaceAppIconRequest>): List<SpaceAppIcon?>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn app_icons(&self, requests: Vec<SpaceAppIconRequest>) -> Result<Vec<Option<SpaceAppIcon>>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `requests` | [`Vec<SpaceAppIconRequest>`](#spaceappiconrequest-record) | required |++**Returns** [`Vec<Option<SpaceAppIcon>>`](#spaceappicon-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.app_icon`++The icon the guest desktop shows for a window's app (pass the+window's `app_name`, `app_id` and `pid`), or `None` when the Space+has none: show no icon then, not a placeholder. A window list should+ask `Space.app_icons` once for all its windows instead.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def app_icon(self, app_name: str, app_id: str, pid: int) -> Optional[SpaceAppIcon]+```++</Tab>+<Tab value="TypeScript">++```ts+appIcon(appName: string, appId: string, pid: number, asyncOpts_?: { signal: AbortSignal }): Promise<SpaceAppIcon | undefined>+```++</Tab>+<Tab value="Swift">++```swift+func appIcon(appName: String, appId: String, pid: UInt32) async throws -> SpaceAppIcon?+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun appIcon(appName: String, appId: String, pid: UInt): SpaceAppIcon?+```++</Tab>+<Tab value="Rust">++```rust+pub async fn app_icon(&self, app_name: String, app_id: String, pid: u32) -> Result<Option<SpaceAppIcon>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `app_name` | `String` | required |+| `app_id` | `String` | required |+| `pid` | `u32` | required |++**Returns** [`Option<SpaceAppIcon>`](#spaceappicon-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.thumbnail`++The Space's latest thumbnail (a small JPEG of its primary display)+from the cache every client on this machine shares: returned at+once when it is younger than `max_age_ms` (unset: any age), else+captured fresh through cua-spacesd and kept for the next caller.+When that capture fails, the older one comes back (`captured_at_ms`+says how old). Asking keeps the daemon refreshing running Spaces'+thumbnails in the background for a while (about every 90 s).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def thumbnail(self, max_age_ms: Optional[int]) -> SpaceThumbnail+```++</Tab>+<Tab value="TypeScript">++```ts+thumbnail(maxAgeMs: bigint | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<SpaceThumbnail>+```++</Tab>+<Tab value="Swift">++```swift+func thumbnail(maxAgeMs: UInt64?) async throws -> SpaceThumbnail+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun thumbnail(maxAgeMs: ULong?): SpaceThumbnail+```++</Tab>+<Tab value="Rust">++```rust+pub async fn thumbnail(&self, max_age_ms: Option<u64>) -> Result<SpaceThumbnail, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `max_age_ms` | `Option<u64>` | required |++**Returns** [`SpaceThumbnail`](#spacethumbnail-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.window_thumbnail`++A small JPEG preview of one of the Space's windows (`window_id` and+`epoch` from `windows`), at most `max_dimension` px, reused for a+few seconds (the SDK's preview cache); `None` when the guest+captured nothing.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def window_thumbnail(self, window_id: str, epoch: int, max_dimension: int) -> Optional[bytes]+```++</Tab>+<Tab value="TypeScript">++```ts+windowThumbnail(windowId: string, epoch: bigint, maxDimension: number, asyncOpts_?: { signal: AbortSignal }): Promise<ArrayBuffer | undefined>+```++</Tab>+<Tab value="Swift">++```swift+func windowThumbnail(windowId: String, epoch: UInt64, maxDimension: UInt32) async throws -> Data?+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun windowThumbnail(windowId: String, epoch: ULong, maxDimension: UInt): ByteArray?+```++</Tab>+<Tab value="Rust">++```rust+pub async fn window_thumbnail(&self, window_id: String, epoch: u64, max_dimension: u32) -> Result<Option<Vec<u8>>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `window_id` | `String` | required |+| `epoch` | `u64` | required |+| `max_dimension` | `u32` | required |++**Returns** `Option<Vec<u8>>` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.displays`++The Space's displays, primary first, with their resolution in+physical pixels.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def displays(self) -> List[SpaceDisplay]+```++</Tab>+<Tab value="TypeScript">++```ts+displays(asyncOpts_?: { signal: AbortSignal }): Promise<Array<SpaceDisplay>>+```++</Tab>+<Tab value="Swift">++```swift+func displays() async throws -> [SpaceDisplay]+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun displays(): List<SpaceDisplay>+```++</Tab>+<Tab value="Rust">++```rust+pub async fn displays(&self) -> Result<Vec<SpaceDisplay>, CuaError>+```++</Tab>+</Tabs>++**Returns** [`Vec<SpaceDisplay>`](#spacedisplay-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Space.usage`++Memory and storage use now (cheap: poll it at a low rate while a+detail is visible).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def usage(self) -> SpaceUsage+```++</Tab>+<Tab value="TypeScript">++```ts+usage(asyncOpts_?: { signal: AbortSignal }): Promise<SpaceUsage>+```++</Tab>+<Tab value="Swift">++```swift+func usage() async throws -> SpaceUsage+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun usage(): SpaceUsage+```++</Tab>+<Tab value="Rust">++```rust+pub async fn usage(&self) -> Result<SpaceUsage, CuaError>+```++</Tab>+</Tabs>++**Returns** [`SpaceUsage`](#spaceusage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `SpaceAppIcon` record++An app icon from `Space.app_icons`: the icon the guest desktop uses,+normalized by the SDK's icon cache.++Returned by [`Space.app_icon`](#spaceapp_icon), [`Space.app_icons`](#spaceapp_icons).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `bytes` | `Vec<u8>` | | The 64 px PNG (2x), or an SVG the guest could not rasterize. |+| `content_type` / `contentType` | `String` | | `image/png` or `image/svg+xml`. |+| `bytes_1x` / `bytes1x` | `Vec<u8>` | | The 32 px PNG (1x); empty for an SVG. |++## `SpaceAppIconRequest` record++One window's app, for `Space.app_icons`.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `app_name` / `appName` | `String` | | App name, as the window list reports it. |+| `app_id` / `appId` | `String` | `""` | App id (bundle id, `.desktop` id). |+| `pid` | `u32` | `0` | A process of the app (0 when unknown). |++## `SpaceDisplay` record++One of a Space's displays (`Space.displays`).++Returned by [`Space.displays`](#spacedisplays).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `String` | | Display id. |+| `name` | `String` | | Name ("XVFB-0", "Built-in Retina Display"). |+| `primary` | `bool` | | The primary display. |+| `width_px` / `widthPx` | `u32` | | Framebuffer width in physical pixels. |+| `height_px` / `heightPx` | `u32` | | Framebuffer height in physical pixels. |+| `scale_factor` / `scaleFactor` | `f64` | | Physical pixels per logical point. |++## `SpaceThumbnail` record++A Space's latest thumbnail, from the cache every client on this machine+shares (`crate.native.spaces.Space.thumbnail`).++Returned by [`Space.thumbnail`](#spacethumbnail).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `image` | `Vec<u8>` | | Encoded image (a small JPEG of the primary display). |+| `format` | [`ImageFormat`](/cua-sdk/reference/spacesd/computer#imageformat-enum) | | Encoding. |+| `width` | `u32` | | Pixel width. |+| `height` | `u32` | | Pixel height. |+| `captured_at_ms` / `capturedAtMs` | `u64` | | When it was captured, Unix milliseconds. |++## `SpaceUsage` record++Memory and storage use (`Space.usage`). A size is the guest's own+limit only when its `*_limited` flag says so (a VM's memory or disk, a+container's cgroup memory limit).++Returned by [`Space.usage`](#spaceusage).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `memory_used` / `memoryUsed` | `u64` | | Memory in use, bytes. |+| `memory_total` / `memoryTotal` | `u64` | | Memory size, bytes. |+| `memory_limited` / `memoryLimited` | `bool` | | `memory_total` is the guest's limit. |+| `disk_used` / `diskUsed` | `u64` | | Home filesystem bytes in use. |+| `disk_total` / `diskTotal` | `u64` | | Home filesystem size, bytes. |+| `disk_limited` / `diskLimited` | `bool` | | `disk_total` is the guest's own disk. |++## Teleport++Teleport exports an app session from this machine and imports it on another. A consent callback sees the manifest first. `Space.teleport` and `Space.teleport_manifest` ask the Cua Spaces daemon, which runs teleport; an embedded runtime without Cua Spaces raises `HostCapabilityMissing`. To bring any app into a Space (install it, open files in it), see [Teleport an app](/spaces/guides/teleport-an-app).++## Teleport into a Space++Methods of [`Space`](#space).++### `Space.teleport`++Teleports `app`'s session into this Space. `approver` sees the+manifest and returns the human's decision; `None` cancels (raises+`TeleportRefused`). Sensitive items need an explicit acknowledgement.++Through a daemon, this may need two calls (see `TeleportReceipt`):+the first returns `status: "pending"` with a `request_id` once the+user's approval is filed with the Cua Keyvault; call again with that+same `request_id` (`approver` is not consulted again -- the decision+it already made was what the first call filed) until `status:+"moved"`. `request_id` is ignored for an embedded host, which always+finishes in one call.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def teleport(self, app: str, scope: Optional[str], approver: TeleportApprover, request_id: Optional[str] = None) -> TeleportReceipt+```++</Tab>+<Tab value="TypeScript">++```ts+teleport(app: string, scope: string | undefined, approver: TeleportApprover, requestId: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<TeleportReceipt>+```++</Tab>+<Tab value="Swift">++```swift+func teleport(app: String, scope: String?, approver: TeleportApprover, requestId: String? = nil) async throws -> TeleportReceipt+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun teleport(app: String, scope: String?, approver: TeleportApprover, requestId: String? = null): TeleportReceipt+```++</Tab>+<Tab value="Rust">++```rust+pub async fn teleport(&self, app: String, scope: Option<String>, approver: Arc<dyn TeleportApprover>, request_id: Option<String>) -> Result<TeleportReceipt, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `app` | `String` | required |+| `scope` | `Option<String>` | required |+| `approver` | [`TeleportApprover`](#teleportapprover) | required |+| `request_id` | `Option<String>` | `None` |++**Returns** [`TeleportReceipt`](#teleportreceipt-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`TeleportRefused`](/cua-sdk/reference/errors#teleportrefused))++### `Space.teleport_manifest`++What teleporting `app` (`full` or `tabs`) would move from this host.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def teleport_manifest(self, app: str, scope: Optional[str]) -> TeleportManifest+```++</Tab>+<Tab value="TypeScript">++```ts+teleportManifest(app: string, scope: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<TeleportManifest>+```++</Tab>+<Tab value="Swift">++```swift+func teleportManifest(app: String, scope: String?) async throws -> TeleportManifest+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun teleportManifest(app: String, scope: String?): TeleportManifest+```++</Tab>+<Tab value="Rust">++```rust+pub async fn teleport_manifest(&self, app: String, scope: Option<String>) -> Result<TeleportManifest, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `app` | `String` | required |+| `scope` | `Option<String>` | required |++**Returns** [`TeleportManifest`](#teleportmanifest-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `TeleportApprover`++The consent gate of `Space.teleport`: shown the manifest, returns+the human's decision, or `None` to cancel. Runs on a blocking worker+thread; it may take as long as the human needs.++<Callout>+You implement `TeleportApprover` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `TeleportApprover` protocol in Swift, the interface in Kotlin and the trait in Rust.+</Callout>++| Method | Description |+| --- | --- |+| [`approve`](#teleportapproverapprove) | Decides. |++### `TeleportApprover.approve`++Decides.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def approve(self, manifest: TeleportManifest) -> Optional[TeleportDecision]+```++</Tab>+<Tab value="TypeScript">++```ts+approve(manifest: TeleportManifest): TeleportDecision | undefined+```++</Tab>+<Tab value="Swift">++```swift+func approve(manifest: TeleportManifest) -> TeleportDecision?+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun approve(manifest: TeleportManifest): TeleportDecision?+```++</Tab>+<Tab value="Rust">++```rust+pub fn approve(&self, manifest: TeleportManifest) -> Option<TeleportDecision>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `manifest` | [`TeleportManifest`](#teleportmanifest-record) | required |++**Returns** [`Option<TeleportDecision>`](#teleportdecision-record)++## `TeleportDecision` record++A human's answer to a teleport manifest.++Returned by [`TeleportApprover.approve`](#teleportapproverapprove).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `include` | `Option<Vec<String>>` | `None` | Items to send (`None` = the provider's default-checked set, never everything). An empty list is refused as ambiguous. |+| `acknowledge_sensitive` / `acknowledgeSensitive` | `bool` | `false` | The human acknowledged the sensitive items in the selection. |++## `TeleportReceipt` record++What a teleport moved, or how to retry a pending Keyvault approval.++Through a daemon (`Host::Daemon`), the underlying `teleport_app` tool is+consent-gated: a first call never delivers, it only files the request and+returns `status: "pending"` with a `request_id`; show the user the+Keyvault approval step, then call `Space.teleport` again with that+same `request_id` (`TeleportRetry::request_id`). A second `"pending"`+means the user has not decided yet -- call again the same way. Only+`status: "moved"` means the session actually landed. An embedded host+(no separate daemon) always returns `"moved"` in one call: there is+nothing to retry.++Returned by [`Space.teleport`](#spaceteleport).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `status` | `String` | | `moved` or `pending`. |+| `request_id` / `requestId` | `Option<String>` | | The Keyvault request to retry with, while pending. |+| `app` | `String` | | App. |+| `space` | `String` | | Space. |+| `method` | `String` | | `import_session`. |+| `transferred_paths` / `transferredPaths` | `Vec<String>` | | Paths sent. |+| `bundle_bytes` / `bundleBytes` | `u64` | | Bundle bytes. |+| `bundle_sha256` / `bundleSha256` | `String` | | Bundle SHA-256, verified by the Space. |+| `imported` | `Vec<String>` | | Groups imported. |+| `skipped` | `Vec<String>` | | Items skipped, with reasons. |+| `launched` | `bool` | | The app was launched. |++## `TeleportItem` record++One item a teleport would move.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `relative_path` / `relativePath` | `String` | | Bundle-relative path (what an approval names). |+| `label` | `String` | | Label. |+| `estimated_bytes` / `estimatedBytes` | `u64` | | Estimated bytes. |+| `is_sensitive` / `isSensitive` | `bool` | | Credentials, cookies, tokens, transcripts. |+| `is_checked_by_default` / `isCheckedByDefault` | `bool` | | In the default selection. |+| `count` | `Option<u64>` | | Count of things it holds. |+| `count_noun` / `countNoun` | `Option<String>` | | Noun for `count`. |++## `TeleportManifest` record++Exactly what would leave this machine.++Returned by [`Space.teleport_manifest`](#spaceteleport_manifest).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `app` | `String` | | Provider id (`firefox`, `chrome`, `claude-code`, ...). |+| `display_name` / `displayName` | `String` | | Display name. |+| `scope` | `String` | | `full` or `tabs`. |+| `items` | [`Vec<TeleportItem>`](#teleportitem-record) | | Items. |+| `total_estimated_bytes` / `totalEstimatedBytes` | `u64` | | Provider total. |+| `notes` | `Vec<String>` | | Provider caveats. |diff --git a/docs/content/docs/cua-sdk/reference/spaces/streams.mdx b/docs/content/docs/cua-sdk/reference/spaces/streams.mdxindex 2b4268e13f..ad2a2f3440 100644--- a/docs/content/docs/cua-sdk/reference/spaces/streams.mdx+++ b/docs/content/docs/cua-sdk/reference/spaces/streams.mdx@@ -119,10 +119,10 @@ pub async fn attach_stream(&self, ticket: SpaceStreamTicket, frames: Arc<dyn Fra| Parameter | Type | Default || --- | --- | --- || `ticket` | [`SpaceStreamTicket`](#spacestreamticket-record) | required |-| `frames` | [`FrameSink`](/cua-sdk/reference/spacesd/media#framesink) | required |-| `audio` | [`Option<AudioSink>`](/cua-sdk/reference/spacesd/media#audiosink) | required |+| `frames` | [`FrameSink`](/cua-sdk/reference/spacesd/computer#framesink) | required |+| `audio` | [`Option<AudioSink>`](/cua-sdk/reference/spacesd/computer#audiosink) | required |-**Returns** [`MediaSession`](/cua-sdk/reference/spacesd/media#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)+**Returns** [`MediaSession`](/cua-sdk/reference/spacesd/computer#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)### `Space.stream_session`@@ -174,8 +174,8 @@ pub async fn stream_session(&self, options: SpaceStreamOptions, frames: Arc<dyn| Parameter | Type | Default || --- | --- | --- || `options` | [`SpaceStreamOptions`](#spacestreamoptions-record) | required |-| `frames` | [`FrameSink`](/cua-sdk/reference/spacesd/media#framesink) | required |-| `audio` | [`Option<AudioSink>`](/cua-sdk/reference/spacesd/media#audiosink) | required |+| `frames` | [`FrameSink`](/cua-sdk/reference/spacesd/computer#framesink) | required |+| `audio` | [`Option<AudioSink>`](/cua-sdk/reference/spacesd/computer#audiosink) | required |**Returns** [`SpaceStreamSession`](#spacestreamsession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`HostCapabilityMissing`](/cua-sdk/reference/errors#hostcapabilitymissing))diff --git a/docs/content/docs/cua-sdk/reference/spaces/teleport-apps.mdx b/docs/content/docs/cua-sdk/reference/spaces/teleport-apps.mdxdeleted file mode 100644index cedbb94996..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/teleport-apps.mdx+++ /dev/null@@ -1,439 +0,0 @@-----title: "Teleport an app"-description: "The app catalog, plans with consent, runs, drops and window drags."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`Teleport.catalog` lists every app on this machine with what teleport can do (full, install only, unsupported). `plan` says what will be installed, sent and imported, with a consent item per path and secret; `run` executes an approved plan with progress. `parse_drop` and `start_window_drag` feed drag-and-drop onto a Space.--## `teleport`--Teleport send: move app sessions from this machine into sandboxes (the-Swift app calls it as `cua.teleport()`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func teleport(cua: Cua) -> Teleport-```--</Tab>-<Tab value="Rust">--```rust-pub fn teleport(cua: Arc<Cua>) -> Arc<Teleport>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `cua` | [`Cua`](/cua-sdk/reference/cua#cua) | required |--**Returns** [`Teleport`](/cua-sdk/reference/spaces/teleport-host#teleport)--## `TeleportRunListener`--Receives run progress (on an SDK worker thread).--<Callout>-You implement `TeleportRunListener` and pass it to the SDK (a callback interface): implement the `TeleportRunListener` protocol in Swift or the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_event`](#teleportrunlisteneron_event) | |--### `TeleportRunListener.on_event`--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func onEvent(event: TeleportRunEvent)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_event(&self, event: TeleportRunEvent)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `event` | [`TeleportRunEvent`](#teleportrunevent-record) | required |--## `TeleportWindowDragListener`--Receives window-drag events on the monitor thread (keep it quick).--<Callout>-You implement `TeleportWindowDragListener` and pass it to the SDK (a callback interface): implement the `TeleportWindowDragListener` protocol in Swift or the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_event`](#teleportwindowdraglisteneron_event) | |--### `TeleportWindowDragListener.on_event`--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func onEvent(event: TeleportWindowDragEvent)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_event(&self, event: TeleportWindowDragEvent)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `event` | [`TeleportWindowDragEvent`](#teleportwindowdragevent-record) | required |--## `TeleportWindowDragMonitor`--A running window-drag monitor. `stop` (or dropping it) ends it.--Returned by [`Teleport.start_window_drag`](/cua-sdk/reference/spaces/teleport-host#teleportstart_window_drag).--| Accessor | Returns | Description |-| --- | --- | --- |-| `stop()` | | Stops watching. |--## `TeleportCatalogEntry` record--One row of "Teleport an app…".--Returned by [`Teleport.catalog`](/cua-sdk/reference/spaces/teleport-host#teleportcatalog), [`Teleport.catalog_entry_for_name`](/cua-sdk/reference/spaces/teleport-host#teleportcatalog_entry_for_name), [`Teleport.catalog_entry_for_path`](/cua-sdk/reference/spaces/teleport-host#teleportcatalog_entry_for_path), [`Teleport.search_catalog`](/cua-sdk/reference/spaces/teleport-host#teleportsearch_catalog).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Stable id (`vscode`, `firefox`, or the host bundle id). |-| `name` | `String` | | Display name. |-| `host_path` / `hostPath` | `Option<String>` | | The host app bundle, `.desktop` entry or shortcut. |-| `host_app_id` / `hostAppId` | `Option<String>` | | Host bundle or desktop id. |-| `version` | `Option<String>` | | Host app version. |-| `capability` | [`TeleportCapability`](#teleportcapability-enum) | | Capability level. |-| `reason` | `Option<String>` | | Why it is unsupported, or a caveat. |-| `moves` | [`Vec<TeleportMove>`](#teleportmove-enum) | | Offered moves, in UI order. |-| `provider_id` / `providerId` | `Option<String>` | | Provider id, when state can move. |-| `sensitive_groups` / `sensitiveGroups` | [`Vec<TeleportSensitiveGroup>`](#teleportsensitivegroup-enum) | | The opt-in groups the signed-in state move offers (`TeleportPlanOptions.sensitive_groups`). |-| `install_source` / `installSource` | `Option<String>` | | `manifest` (pinned install), `image` (ships in cua's images), `space` (must already be there), or none. |-| `install_id` / `installId` | `Option<String>` | | Install manifest id and pinned version, for `manifest`. |-| `install_version` / `installVersion` | `Option<String>` | | |-| `launch_bin` / `launchBin` | `Option<String>` | | Binary started in the Space. |-| `last_used_ms` / `lastUsedMs` | `Option<u64>` | | Last teleported (Unix ms). |-| `json` | `String` | | The entry as JSON (what `plan` reads back). |--## `TeleportCatalogOptions` record--Options for `Teleport.catalog`.--Returned by [`Teleport.space_hint`](/cua-sdk/reference/spaces/teleport-host#teleportspace_hint).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `roots` | `Option<Vec<String>>` | `None` | App roots to scan. Default: this machine's (`/Applications`, `~/Applications`; `.desktop` dirs; Start Menu). Tests pass fixture directories. |-| `space_os` / `spaceOs` | `Option<String>` | `None` | The Space's OS (`linux`, `macos`, `windows`), to narrow the catalog. |-| `space_arch` / `spaceArch` | `Option<String>` | `None` | The Space's CPU (`aarch64`, `x86_64`). |-| `recents_path` / `recentsPath` | `Option<String>` | `None` | Recents file. Default: `~/.cua/teleport-recents.json`. |--## `TeleportConsent` record--The user's answer to the consent screen.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `approved` | `bool` | | Confirmed. |-| `acknowledge_sensitive` / `acknowledgeSensitive` | `bool` | `false` | Saw and accepted the secrets. |-| `save_to_keyvault` / `saveToKeyvault` | `bool` | `false` | "Save to Keyvault": keep the captured session sealed in the user's own Cua Keyvault after this delivery. |-| `acknowledge_relay_plaintext` / `acknowledgeRelayPlaintext` | `bool` | `false` | Saw and accepted `TeleportPlan.relay_unsealed`'s warning (S1). |-| `cookie_domains` / `cookieDomains` | `Option<Vec<String>>` | `None` | The review's per-site choice: the sites whose cookies to send (`None`: every cookie in the selection). |-| `exclude` | `Vec<String>` | `[]` | Consent items (their keys) the user turned off. |-| `from_vault` / `fromVault` | `Option<Vec<String>>` | `None` | Send these saved Keyvault items (ids) instead of reading the live app: nothing is captured from the host. |-| `include_passwords` / `includePasswords` | `bool` | `false` | Also send the saved passwords: only when ticked in the review. |-| `password_domains` / `passwordDomains` | `Option<Vec<String>>` | `None` | The sites whose saved passwords to send (the review's own choice; `None`: those of `cookie_domains`). |--## `TeleportConsentItem` record--One line of the consent screen.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`TeleportConsentKind`](#teleportconsentkind-enum) | | |-| `key` | `String` | | Installable id, host path, or manifest path. |-| `label` | `String` | | |-| `detail` | `String` | | Version and checksum, destination, or count. |-| `bytes` | `u64` | | Bytes that leave this machine. |-| `sensitive` | `bool` | | |--## `TeleportDrop` record--A parsed drop.--Returned by [`Teleport.parse_drop`](/cua-sdk/reference/spaces/teleport-host#teleportparse_drop).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | `String` | | `app`, `files`, `url` or `empty`. |-| `apps` | `Vec<String>` | | App bundles, `.desktop` entries, shortcuts. |-| `files` | `Vec<String>` | | Files and folders. |-| `urls` | `Vec<String>` | | URLs. |-| `ignored` | `Vec<String>` | | Unusable entries. |--## `TeleportPlan` record--Exactly what a teleport will do and move.--Returned by [`Teleport.plan`](/cua-sdk/reference/spaces/teleport-host#teleportplan).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app` | [`TeleportCatalogEntry`](#teleportcatalogentry-record) | | |-| `space_id` / `spaceId` | `String` | | |-| `moves` | [`TeleportMove`](#teleportmove-enum) | | |-| `steps` | [`Vec<TeleportPlanStep>`](#teleportplanstep-record) | | |-| `consent` | [`Vec<TeleportConsentItem>`](#teleportconsentitem-record) | | Every install, path and secret. |-| `sensitive` | `bool` | | A consent item is a secret (needs `acknowledge_sensitive`). |-| `total_bytes` / `totalBytes` | `u64` | | Bytes that leave this machine. |-| `warnings` | `Vec<String>` | | |-| `relay_unsealed` / `relayUnsealed` | `bool` | | This Space is reached through a relay connection that predates end-to-end sealing: a secret this plan sends would cross it in the clear (S1). Needs `acknowledge_relay_plaintext` the same way a secret needs `acknowledge_sensitive`. |-| `json` | `String` | | The plan as JSON (what `run` reads back). |--## `TeleportPlanOptions` record--Options for `Teleport.plan`.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `moves` | [`TeleportMove`](#teleportmove-enum) | | What moves. |-| `files` | `Vec<String>` | `[]` | Host files or folders (`AppWithFiles`). |-| `state_items` / `stateItems` | `Option<Vec<String>>` | `None` | Provider manifest items (`AppWithState`); `None` is the provider's default selection. |-| `sensitive_groups` / `sensitiveGroups` | [`Vec<TeleportSensitiveGroup>`](#teleportsensitivegroup-enum) | `[]` | With `state_items` `None`: also these opt-in groups of the entry's `sensitive_groups` (`SignIns` keeps the app signed in). Their items are secrets in the plan's consent: `run` needs `acknowledge_sensitive`. |-| `scope` | `Option<String>` | `None` | `tabs` or `full` (default) state. |-| `launch` | `Option<bool>` | `None` | Launch the app when done (default true). |--## `TeleportPlanStep` record--One step of a plan.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | `String` | | `install`, `files`, `state` or `launch`. |-| `summary` | `String` | | Human summary. |--## `TeleportRunEvent` record--One progress event of `Teleport.run`.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `step` | `u32` | | |-| `steps` | `u32` | | |-| `kind` | `String` | | `install`, `files`, `state`, `launch`, `done`. |-| `phase` | `String` | | `started`, `progress`, `finished`, `failed`, `done`. |-| `detail` | `String` | | |-| `done_bytes` / `doneBytes` | `u64` | | |-| `total_bytes` / `totalBytes` | `u64` | | |--## `TeleportRunReport` record--What a run did.--Returned by [`Teleport.run`](/cua-sdk/reference/spaces/teleport-host#teleportrun).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app_id` / `appId` | `String` | | |-| `installed` | `Vec<String>` | | |-| `sent` | `Vec<String>` | | Guest paths of sent files. |-| `imported` | `Vec<String>` | | |-| `skipped` | `Vec<String>` | | |-| `launched` | `bool` | | |--## `TeleportWindow` record--One on-screen window of this machine.--Returned by [`Teleport.list_windows`](/cua-sdk/reference/spaces/teleport-host#teleportlist_windows).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `window_id` / `windowId` | `u32` | | Platform window id (for the thumbnail). |-| `pid` | `i64` | | Owning process. |-| `app_name` / `appName` | `String` | | Owning app. |-| `title` | `String` | | Title (empty without Screen Recording on macOS). |-| `bundle_path` / `bundlePath` | `Option<String>` | | The owning app's bundle, when known. |--## `TeleportWindowDragEvent` record--A window-drag event (global top-left display points).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `phase` | `String` | | `start`, `move` or `end`. |-| `x` | `f64` | | |-| `y` | `f64` | | |-| `window` | [`Option<TeleportWindow>`](#teleportwindow-record) | | The dragged window (`start`, `end`). |-| `app` | [`Option<TeleportCatalogEntry>`](#teleportcatalogentry-record) | | Its app, classified (`start`, `end`). |-| `start_frame` / `startFrame` | [`Option<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | `None` | The window's frame at mouse down (`start`). |-| `frame` | [`Option<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | `None` | The window's frame now (`start`, `end`, and some `move`s). Compare with `start_frame` to tell a move from a resize (`app_drag_trigger_apply` does). |--## `TeleportCapability` enum--What teleport can do with an app.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.full-.installOnly-.unsupported-```--</Tab>-<Tab value="Rust">--```rust-TeleportCapability::Full-TeleportCapability::InstallOnly-TeleportCapability::Unsupported-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Full` | Its signed-in state can move (a provider), on top of the app. |-| `InstallOnly` | Installed in the Space; opens empty or with chosen files. |-| `Unsupported` | Shown disabled; `reason` says why. |--## `TeleportConsentKind` enum--What a consent item is.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.install-.file-.folder-.state-.secret-```--</Tab>-<Tab value="Rust">--```rust-TeleportConsentKind::Install-TeleportConsentKind::File-TeleportConsentKind::Folder-TeleportConsentKind::State-TeleportConsentKind::Secret-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Install` | An install into the Space (nothing leaves this machine). |-| `File` | A host file that leaves this machine. |-| `Folder` | A host folder that leaves this machine. |-| `State` | App state that leaves this machine. |-| `Secret` | A secret (cookies, tokens, logins) that leaves this machine. |--## `TeleportMove` enum--What a teleport moves.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.appOnly-.appWithFiles-.appWithState-```--</Tab>-<Tab value="Rust">--```rust-TeleportMove::AppOnly-TeleportMove::AppWithFiles-TeleportMove::AppWithState-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `AppOnly` | The app only. |-| `AppWithFiles` | The app plus chosen files or folders. |-| `AppWithState` | The app plus its signed-in state (consent lists every path and secret). |--## `TeleportSensitiveGroup` enum--Credential-shaped state the signed-in state move leaves out by default,-which a person opts into one group at a time (each item is a secret in-the plan's consent).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.signIns-.passwords-.history-```--</Tab>-<Tab value="Rust">--```rust-TeleportSensitiveGroup::SignIns-TeleportSensitiveGroup::Passwords-TeleportSensitiveGroup::History-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `SignIns` | The session cookies: what keeps the app signed in. |-| `Passwords` | Saved passwords. |-| `History` | Browsing history. |diff --git a/docs/content/docs/cua-sdk/reference/spaces/teleport-host.mdx b/docs/content/docs/cua-sdk/reference/spaces/teleport-host.mdxdeleted file mode 100644index c3d1c10ae4..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/teleport-host.mdx+++ /dev/null@@ -1,730 +0,0 @@-----title: "Host teleport"-description: "The Teleport object of the Spaces apps: providers, manifests and sends from this machine."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--[`teleport(cua)`](/cua-sdk/reference/spaces/teleport-apps#teleport) returns the `Teleport` object (Swift: `cua.teleport()`). It lists the apps whose sessions this machine can export, builds manifests and sends them into a Space; the app catalog, plans and runs are on [Teleport an app](/cua-sdk/reference/spaces/teleport-apps).--## `Teleport`--Teleport send. Exports from this machine's real apps; tests of hosts-embedding the SDK must set `CUA_ENV_TEST_SANDBOX=1` (every host effect is-then refused) or use `cua-teleport` directly with a fake host.--Returned by [`teleport`](/cua-sdk/reference/spaces/teleport-apps#teleport).--| Method | Description |-| --- | --- |-| [`app_icon_png`](#teleportapp_icon_png) | An app's icon as PNG bytes (`size` points), or `None`. |-| [`capture_window_thumbnail`](#teleportcapture_window_thumbnail) | A PNG preview of that one window (never the screen or another window), at most `max_width` pixels wide, kept in memory for a few seconds (the SDK's preview cache). |-| [`catalog`](#teleportcatalog) | "Teleport an app…": every installed app on this machine, classified (full, install only, unsupported with a reason), recents first. |-| [`catalog_entry_for_name`](#teleportcatalog_entry_for_name) | The catalog row for an app known by name or id (a dragged window whose bundle is unknown). |-| [`catalog_entry_for_path`](#teleportcatalog_entry_for_path) | The catalog row for a dropped app (a bundle, `.desktop` entry or shortcut path). |-| [`list_windows`](#teleportlist_windows) | This machine's user windows (for a window picker). |-| [`manifest`](#teleportmanifest) | Describes what teleporting `app` (a bundle id or app name, e.g. |-| [`parse_drop`](#teleportparse_drop) | Parses a drag payload: paths, `file://` URIs, URLs or a `text/uri-list` blob. |-| [`plan`](#teleportplan) | What teleporting `app` into `space` will install, send and import, with the consent items. |-| [`record_recent`](#teleportrecord_recent) | Records a teleported app so the catalog lists it first. |-| [`request_window_drag_permission`](#teleportrequest_window_drag_permission) | Asks for the window-drag permission (opens System Settings on macOS); returns the state after asking. |-| [`run`](#teleportrun) | Runs `plan` after the user's `consent` (secrets need `acknowledge_sensitive`), reporting progress to `listener`, and records the app in the recents. |-| [`search_catalog`](#teleportsearch_catalog) | Filters catalog rows by a search query (every word must match the name or id); order is kept. |-| [`send`](#teleportsend) | Teleports `app` into `sandbox` (through its cua-spacesd), a direct upload: the bundle is captured on this machine and sent straight to `sandbox`, never through the Keyvault. |-| [`send_env`](#teleportsend_env) | Like `Self.send`, to a spacesd connection (for example `Cua.spacesd(url, token)`). |-| [`send_through_keyvault`](#teleportsend_through_keyvault) | Teleports `app` into `sandbox`, through the caller's own Cua Keyvault: the session is captured into the Keyvault (sealed, once Touch ID / presence gated) and delivered from there, so this process, the Swift app and the network never see a raw password or cookie. |-| [`space_hint`](#teleportspace_hint) | The Space's OS and CPU, to pass as `space_os` / `space_arch` in `TeleportCatalogOptions`. |-| [`start_window_drag`](#teleportstart_window_drag) | Watches for a real app window being dragged (macOS; needs the Accessibility permission). |--| Accessor | Returns | Description |-| --- | --- | --- |-| `prefetch()` | | Warms the catalog's app list and every app's icon in the background (returns at once). Apps call it when they start so the first "Teleport an app…" opens on cached apps and icons. |-| `providers()` | [`Vec<TeleportProvider>`](#teleportprovider-record) | Every app this SDK can teleport, with install probes for consent UIs. |-| `window_drag_permitted()` | `bool` | Whether this process may watch window drags (macOS Accessibility). |-| `window_drag_supported()` | `bool` | Whether window-drag detection exists on this OS (macOS today). |--### `Teleport.app_icon_png`--An app's icon as PNG bytes (`size` points), or `None`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appIconPng(path: String, size: UInt32) -> Data?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_icon_png(&self, path: String, size: u32) -> Option<Vec<u8>>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `path` | `String` | required |-| `size` | `u32` | required |--**Returns** `Option<Vec<u8>>`--### `Teleport.capture_window_thumbnail`--A PNG preview of that one window (never the screen or another-window), at most `max_width` pixels wide, kept in memory for a few-seconds (the SDK's preview cache). `None` when it cannot be-captured (no Screen Recording permission).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func captureWindowThumbnail(windowId: UInt32, maxWidth: UInt32?) throws -> Data?-```--</Tab>-<Tab value="Rust">--```rust-pub fn capture_window_thumbnail(&self, window_id: u32, max_width: Option<u32>) -> Result<Option<Vec<u8>>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `window_id` | `u32` | required |-| `max_width` | `Option<u32>` | required |--**Returns** `Option<Vec<u8>>` · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.catalog`--"Teleport an app…": every installed app on this machine, classified-(full, install only, unsupported with a reason), recents first.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func catalog(options: TeleportCatalogOptions?) async throws -> [TeleportCatalogEntry]-```--</Tab>-<Tab value="Rust">--```rust-pub async fn catalog(&self, options: Option<TeleportCatalogOptions>) -> Result<Vec<TeleportCatalogEntry>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `options` | [`Option<TeleportCatalogOptions>`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogoptions-record) | required |--**Returns** [`Vec<TeleportCatalogEntry>`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.catalog_entry_for_name`--The catalog row for an app known by name or id (a dragged window-whose bundle is unknown).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func catalogEntryForName(name: String, options: TeleportCatalogOptions?) throws -> TeleportCatalogEntry-```--</Tab>-<Tab value="Rust">--```rust-pub fn catalog_entry_for_name(&self, name: String, options: Option<TeleportCatalogOptions>) -> Result<TeleportCatalogEntry, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `name` | `String` | required |-| `options` | [`Option<TeleportCatalogOptions>`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogoptions-record) | required |--**Returns** [`TeleportCatalogEntry`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.catalog_entry_for_path`--The catalog row for a dropped app (a bundle, `.desktop` entry or-shortcut path).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func catalogEntryForPath(path: String, options: TeleportCatalogOptions?) throws -> TeleportCatalogEntry-```--</Tab>-<Tab value="Rust">--```rust-pub fn catalog_entry_for_path(&self, path: String, options: Option<TeleportCatalogOptions>) -> Result<TeleportCatalogEntry, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `path` | `String` | required |-| `options` | [`Option<TeleportCatalogOptions>`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogoptions-record) | required |--**Returns** [`TeleportCatalogEntry`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.list_windows`--This machine's user windows (for a window picker).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func listWindows() throws -> [TeleportWindow]-```--</Tab>-<Tab value="Rust">--```rust-pub fn list_windows(&self) -> Result<Vec<TeleportWindow>, CuaError>-```--</Tab>-</Tabs>--**Returns** [`Vec<TeleportWindow>`](/cua-sdk/reference/spaces/teleport-apps#teleportwindow-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.manifest`--Describes what teleporting `app` (a bundle id or app name, e.g.-`"com.google.Chrome"` or `"Slack"`) would move. Reads the local-profile; never prompts.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func manifest(app: String, scope: TeleportScope, options: TeleportOptions?) async throws -> TeleportManifest-```--</Tab>-<Tab value="Rust">--```rust-pub async fn manifest(&self, app: String, scope: TeleportScope, options: Option<TeleportOptions>) -> Result<TeleportManifest, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app` | `String` | required |-| `scope` | [`TeleportScope`](#teleportscope-enum) | required |-| `options` | [`Option<TeleportOptions>`](#teleportoptions-record) | required |--**Returns** [`TeleportManifest`](/cua-sdk/reference/spaces/teleport#teleportmanifest-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.parse_drop`--Parses a drag payload: paths, `file://` URIs, URLs or a-`text/uri-list` blob.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func parseDrop(items: [String]) -> TeleportDrop-```--</Tab>-<Tab value="Rust">--```rust-pub fn parse_drop(&self, items: Vec<String>) -> TeleportDrop-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `items` | `Vec<String>` | required |--**Returns** [`TeleportDrop`](/cua-sdk/reference/spaces/teleport-apps#teleportdrop-record)--### `Teleport.plan`--What teleporting `app` into `space` will install, send and import,-with the consent items. Reads only file sizes and the provider's-manifest.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func plan(app: TeleportCatalogEntry, space: Space, options: TeleportPlanOptions) async throws -> TeleportPlan-```--</Tab>-<Tab value="Rust">--```rust-pub async fn plan(&self, app: TeleportCatalogEntry, space: Arc<Space>, options: TeleportPlanOptions) -> Result<TeleportPlan, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app` | [`TeleportCatalogEntry`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record) | required |-| `space` | [`Space`](/cua-sdk/reference/spaces/space#space) | required |-| `options` | [`TeleportPlanOptions`](/cua-sdk/reference/spaces/teleport-apps#teleportplanoptions-record) | required |--**Returns** [`TeleportPlan`](/cua-sdk/reference/spaces/teleport-apps#teleportplan-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.record_recent`--Records a teleported app so the catalog lists it first.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func recordRecent(id: String, recentsPath: String?) throws-```--</Tab>-<Tab value="Rust">--```rust-pub fn record_recent(&self, id: String, recents_path: Option<String>) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |-| `recents_path` | `Option<String>` | required |--**Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.request_window_drag_permission`--Asks for the window-drag permission (opens System Settings on-macOS); returns the state after asking.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func requestWindowDragPermission() throws -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn request_window_drag_permission(&self) -> Result<bool, CuaError>-```--</Tab>-</Tabs>--**Returns** `bool` · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.run`--Runs `plan` after the user's `consent` (secrets need-`acknowledge_sensitive`), reporting progress to `listener`, and-records the app in the recents.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func run(plan: TeleportPlan, space: Space, consent: TeleportConsent, listener: TeleportRunListener?) async throws -> TeleportRunReport-```--</Tab>-<Tab value="Rust">--```rust-pub async fn run(&self, plan: TeleportPlan, space: Arc<Space>, consent: TeleportConsent, listener: Option<Arc<dyn TeleportRunListener>>) -> Result<TeleportRunReport, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `plan` | [`TeleportPlan`](/cua-sdk/reference/spaces/teleport-apps#teleportplan-record) | required |-| `space` | [`Space`](/cua-sdk/reference/spaces/space#space) | required |-| `consent` | [`TeleportConsent`](/cua-sdk/reference/spaces/teleport-apps#teleportconsent-record) | required |-| `listener` | [`Option<TeleportRunListener>`](/cua-sdk/reference/spaces/teleport-apps#teleportrunlistener) | required |--**Returns** [`TeleportRunReport`](/cua-sdk/reference/spaces/teleport-apps#teleportrunreport-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.search_catalog`--Filters catalog rows by a search query (every word must match the-name or id); order is kept.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func searchCatalog(entries: [TeleportCatalogEntry], query: String) -> [TeleportCatalogEntry]-```--</Tab>-<Tab value="Rust">--```rust-pub fn search_catalog(&self, entries: Vec<TeleportCatalogEntry>, query: String) -> Vec<TeleportCatalogEntry>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `entries` | [`Vec<TeleportCatalogEntry>`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record) | required |-| `query` | `String` | required |--**Returns** [`Vec<TeleportCatalogEntry>`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogentry-record)--### `Teleport.send`--Teleports `app` into `sandbox` (through its cua-spacesd), a direct-upload: the bundle is captured on this machine and sent straight to-`sandbox`, never through the Keyvault. `selected_items` are manifest-`rel_path`s; `None` sends the default selection. `approval` is asked-first (`None` approves); sensitive items then need OS authorization.--For an app whose captured items may include a signed-in browser-session (cookies, saved passwords), prefer-`Self.send_through_keyvault`, which never lets this process or-the network see the raw secret.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func send(sandbox: Sandbox, app: String, scope: TeleportScope, selectedItems: [String]?, approval: TeleportApproval?, options: TeleportOptions?) async throws -> TeleportResult-```--</Tab>-<Tab value="Rust">--```rust-pub async fn send(&self, sandbox: Arc<Sandbox>, app: String, scope: TeleportScope, selected_items: Option<Vec<String>>, approval: Option<Arc<dyn TeleportApproval>>, options: Option<TeleportOptions>) -> Result<TeleportResult, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `sandbox` | [`Sandbox`](/cua-sdk/reference/sandbox#sandbox) | required |-| `app` | `String` | required |-| `scope` | [`TeleportScope`](#teleportscope-enum) | required |-| `selected_items` | `Option<Vec<String>>` | required |-| `approval` | [`Option<TeleportApproval>`](#teleportapproval) | required |-| `options` | [`Option<TeleportOptions>`](#teleportoptions-record) | required |--**Returns** [`TeleportResult`](#teleportresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.send_env`--Like `Self.send`, to a spacesd connection (for example-`Cua.spacesd(url, token)`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func sendEnv(env: SpacesdClient, app: String, scope: TeleportScope, selectedItems: [String]?, approval: TeleportApproval?, options: TeleportOptions?) async throws -> TeleportResult-```--</Tab>-<Tab value="Rust">--```rust-pub async fn send_env(&self, env: Arc<SpacesdClient>, app: String, scope: TeleportScope, selected_items: Option<Vec<String>>, approval: Option<Arc<dyn TeleportApproval>>, options: Option<TeleportOptions>) -> Result<TeleportResult, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `env` | [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient) | required |-| `app` | `String` | required |-| `scope` | [`TeleportScope`](#teleportscope-enum) | required |-| `selected_items` | `Option<Vec<String>>` | required |-| `approval` | [`Option<TeleportApproval>`](#teleportapproval) | required |-| `options` | [`Option<TeleportOptions>`](#teleportoptions-record) | required |--**Returns** [`TeleportResult`](#teleportresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.send_through_keyvault`--Teleports `app` into `sandbox`, through the caller's own Cua-Keyvault: the session is captured into the Keyvault (sealed, once-Touch ID / presence gated) and delivered from there, so this-process, the Swift app and the network never see a raw password or-cookie. `selected_items` are manifest `rel_path`s; `None` sends the-default selection. `approval` is asked first (`None` approves);-the Keyvault's own presence prompt follows for a sensitive-selection, in place of `Teleporter`'s OS authorization.--Fails with `CuaError.Unsupported` when no Keyvault is reachable-(the Cua daemon is not running, or this process is not signed as-first party): this never falls back to `Self.send`'s direct-upload, which would leave the session outside the Keyvault.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func sendThroughKeyvault(sandbox: Sandbox, app: String, scope: TeleportScope, selectedItems: [String]?, approval: TeleportApproval?, options: TeleportOptions?) async throws -> TeleportResult-```--</Tab>-<Tab value="Rust">--```rust-pub async fn send_through_keyvault(&self, sandbox: Arc<Sandbox>, app: String, scope: TeleportScope, selected_items: Option<Vec<String>>, approval: Option<Arc<dyn TeleportApproval>>, options: Option<TeleportOptions>) -> Result<TeleportResult, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `sandbox` | [`Sandbox`](/cua-sdk/reference/sandbox#sandbox) | required |-| `app` | `String` | required |-| `scope` | [`TeleportScope`](#teleportscope-enum) | required |-| `selected_items` | `Option<Vec<String>>` | required |-| `approval` | [`Option<TeleportApproval>`](#teleportapproval) | required |-| `options` | [`Option<TeleportOptions>`](#teleportoptions-record) | required |--**Returns** [`TeleportResult`](#teleportresult-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`Unsupported`](/cua-sdk/reference/errors#unsupported))--### `Teleport.space_hint`--The Space's OS and CPU, to pass as `space_os` / `space_arch` in-`TeleportCatalogOptions`.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func spaceHint(space: Space) async throws -> TeleportCatalogOptions-```--</Tab>-<Tab value="Rust">--```rust-pub async fn space_hint(&self, space: Arc<Space>) -> Result<TeleportCatalogOptions, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `space` | [`Space`](/cua-sdk/reference/spaces/space#space) | required |--**Returns** [`TeleportCatalogOptions`](/cua-sdk/reference/spaces/teleport-apps#teleportcatalogoptions-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Teleport.start_window_drag`--Watches for a real app window being dragged (macOS; needs the-Accessibility permission). `start` and `end` carry the window and-its classified app.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func startWindowDrag(listener: TeleportWindowDragListener) throws -> TeleportWindowDragMonitor-```--</Tab>-<Tab value="Rust">--```rust-pub fn start_window_drag(&self, listener: Arc<dyn TeleportWindowDragListener>) -> Result<Arc<TeleportWindowDragMonitor>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `listener` | [`TeleportWindowDragListener`](/cua-sdk/reference/spaces/teleport-apps#teleportwindowdraglistener) | required |--**Returns** [`TeleportWindowDragMonitor`](/cua-sdk/reference/spaces/teleport-apps#teleportwindowdragmonitor) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `TeleportApproval`--Consent callback: shown the manifest and selection before anything is-read; return `false` to abort. Runs on a worker thread and may block (for-example on a dialog). It never replaces the OS authorization prompt for-sensitive items.--<Callout>-You implement `TeleportApproval` and pass it to the SDK (a callback interface): implement the `TeleportApproval` protocol in Swift or the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`approve`](#teleportapprovalapprove) | Approve or decline. |--### `TeleportApproval.approve`--Approve or decline.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func approve(request: TeleportApprovalRequest) -> Bool-```--</Tab>-<Tab value="Rust">--```rust-pub fn approve(&self, request: TeleportApprovalRequest) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `request` | [`TeleportApprovalRequest`](#teleportapprovalrequest-record) | required |--**Returns** `bool`--## `TeleportApprovalRequest` record--What the approval callback is asked.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `manifest` | [`TeleportManifest`](/cua-sdk/reference/spaces/teleport#teleportmanifest-record) | | Everything that could move. |-| `selected` | [`Vec<TeleportItem>`](/cua-sdk/reference/spaces/teleport#teleportitem-record) | | What will move. |-| `sensitive` | `bool` | | Whether any selected item is sensitive (the OS prompt follows). |-| `destination` | `String` | | The destination spacesd endpoint. |--## `TeleportOptions` record--Options for `Teleport.manifest` and `Teleport.send`.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `chrome_profile` / `chromeProfile` | `Option<String>` | `None` | Chrome profile to capture: a name ("Profile 1") or a path. Default `Default`. |-| `display_name` / `displayName` | `Option<String>` | `None` | Display name for the app (UI only). Default: the app id. |-| `launch_after` / `launchAfter` | `Option<bool>` | `None` | Launch the app in the sandbox after importing. Default true. |-| `close_running_app` / `closeRunningApp` | `bool` | `false` | Ask the sandbox to close a running instance first. |-| `relay_plaintext_ack` / `relayPlaintextAck` | `bool` | `false` | Explicit, per-delivery opt-in to send over a `relay:` Space whose image predates end-to-end sealing (S1). Without it, a `relay:` destination fails with a `PermissionDenied` naming the risk (`cua_teleport::send::RELAY_UNSEALED_WARNING`) before anything is read or uploaded. Show that warning and get the user's explicit, per-delivery consent before setting this; never a standing setting. Local and direct Spaces are unaffected. |--## `TeleportProvider` record--An app this machine can teleport.--Returned by [`Teleport.providers`](#teleport).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Provider id. |-| `display_name` / `displayName` | `String` | | Display name. |-| `app_ids` / `appIds` | `Vec<String>` | | Bundle ids and app names it matches. |-| `macos` | `bool` | | Exports on macOS. |-| `linux` | `bool` | | Exports on Linux. |-| `windows` | `bool` | | Exports on Windows. |-| `install_probe` / `installProbe` | `Option<String>` | | Install check: a path, or a binary name when `install_probe_on_path`. |-| `install_probe_on_path` / `installProbeOnPath` | `bool` | | Whether `install_probe` is a `PATH` binary name. |--## `TeleportResult` record--The result of `Teleport.send`.--Returned by [`Teleport.send`](#teleportsend), [`Teleport.send_env`](#teleportsend_env), [`Teleport.send_through_keyvault`](#teleportsend_through_keyvault).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `provider_id` / `providerId` | `String` | | Provider id. |-| `import_id` / `importId` | `String` | | Upload id. |-| `bundle_bytes` / `bundleBytes` | `u64` | | Bundle size. |-| `sha256` | `String` | | Bundle SHA-256 (hex). |-| `sent` | `Vec<String>` | | Selected item keys. |-| `withheld` | `Vec<String>` | | Item keys the default selection left out. |-| `imported` | `Vec<String>` | | What the sandbox imported. |-| `skipped` | `Vec<String>` | | What it skipped, as "item: reason". |-| `launched` | `bool` | | Whether it launched the app. |--## `TeleportScope` enum--How much of an app session to move.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.tabs-.full-```--</Tab>-<Tab value="Rust">--```rust-TeleportScope::Tabs-TeleportScope::Full-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Tabs` | Only the open tabs / documents and session state. |-| `Full` | The full profile (may include cookies, logins, history). |diff --git a/docs/content/docs/cua-sdk/reference/spaces/teleport.mdx b/docs/content/docs/cua-sdk/reference/spaces/teleport.mdxdeleted file mode 100644index a93a9efd80..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/teleport.mdx+++ /dev/null@@ -1,264 +0,0 @@-----title: "Teleport"-description: "Move a running app between machines, with an approval callback."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--Teleport exports an app session from this machine and imports it on another. A consent callback sees the manifest first. `Space.teleport` and `Space.teleport_manifest` ask the Cua Spaces daemon, which runs teleport; an embedded runtime without Cua Spaces raises `HostCapabilityMissing`. To bring any app into a Space (install it, open files in it), see [Teleport an app](/cua-sdk/reference/spaces/teleport-apps).--## Teleport into a Space--Methods of [`Space`](/cua-sdk/reference/spaces/space#space).--### `Space.teleport`--Teleports `app`'s session into this Space. `approver` sees the-manifest and returns the human's decision; `None` cancels (raises-`TeleportRefused`). Sensitive items need an explicit acknowledgement.--Through a daemon, this may need two calls (see `TeleportReceipt`):-the first returns `status: "pending"` with a `request_id` once the-user's approval is filed with the Cua Keyvault; call again with that-same `request_id` (`approver` is not consulted again -- the decision-it already made was what the first call filed) until `status:-"moved"`. `request_id` is ignored for an embedded host, which always-finishes in one call.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def teleport(self, app: str, scope: Optional[str], approver: TeleportApprover, request_id: Optional[str] = None) -> TeleportReceipt-```--</Tab>-<Tab value="TypeScript">--```ts-teleport(app: string, scope: string | undefined, approver: TeleportApprover, requestId: string | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<TeleportReceipt>-```--</Tab>-<Tab value="Swift">--```swift-func teleport(app: String, scope: String?, approver: TeleportApprover, requestId: String? = nil) async throws -> TeleportReceipt-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun teleport(app: String, scope: String?, approver: TeleportApprover, requestId: String? = null): TeleportReceipt-```--</Tab>-<Tab value="Rust">--```rust-pub async fn teleport(&self, app: String, scope: Option<String>, approver: Arc<dyn TeleportApprover>, request_id: Option<String>) -> Result<TeleportReceipt, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app` | `String` | required |-| `scope` | `Option<String>` | required |-| `approver` | [`TeleportApprover`](#teleportapprover) | required |-| `request_id` | `Option<String>` | `None` |--**Returns** [`TeleportReceipt`](#teleportreceipt-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`TeleportRefused`](/cua-sdk/reference/errors#teleportrefused))--### `Space.teleport_manifest`--What teleporting `app` (`full` or `tabs`) would move from this host.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def teleport_manifest(self, app: str, scope: Optional[str]) -> TeleportManifest-```--</Tab>-<Tab value="TypeScript">--```ts-teleportManifest(app: string, scope: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<TeleportManifest>-```--</Tab>-<Tab value="Swift">--```swift-func teleportManifest(app: String, scope: String?) async throws -> TeleportManifest-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun teleportManifest(app: String, scope: String?): TeleportManifest-```--</Tab>-<Tab value="Rust">--```rust-pub async fn teleport_manifest(&self, app: String, scope: Option<String>) -> Result<TeleportManifest, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app` | `String` | required |-| `scope` | `Option<String>` | required |--**Returns** [`TeleportManifest`](#teleportmanifest-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `TeleportApprover`--The consent gate of `Space.teleport`: shown the manifest, returns-the human's decision, or `None` to cancel. Runs on a blocking worker-thread; it may take as long as the human needs.--<Callout>-You implement `TeleportApprover` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `TeleportApprover` protocol in Swift, the interface in Kotlin and the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`approve`](#teleportapproverapprove) | Decides. |--### `TeleportApprover.approve`--Decides.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def approve(self, manifest: TeleportManifest) -> Optional[TeleportDecision]-```--</Tab>-<Tab value="TypeScript">--```ts-approve(manifest: TeleportManifest): TeleportDecision | undefined-```--</Tab>-<Tab value="Swift">--```swift-func approve(manifest: TeleportManifest) -> TeleportDecision?-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun approve(manifest: TeleportManifest): TeleportDecision?-```--</Tab>-<Tab value="Rust">--```rust-pub fn approve(&self, manifest: TeleportManifest) -> Option<TeleportDecision>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `manifest` | [`TeleportManifest`](#teleportmanifest-record) | required |--**Returns** [`Option<TeleportDecision>`](#teleportdecision-record)--## `TeleportDecision` record--A human's answer to a teleport manifest.--Returned by [`TeleportApprover.approve`](#teleportapproverapprove).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `include` | `Option<Vec<String>>` | `None` | Items to send (`None` = the provider's default-checked set, never everything). An empty list is refused as ambiguous. |-| `acknowledge_sensitive` / `acknowledgeSensitive` | `bool` | `false` | The human acknowledged the sensitive items in the selection. |--## `TeleportReceipt` record--What a teleport moved, or how to retry a pending Keyvault approval.--Through a daemon (`Host::Daemon`), the underlying `teleport_app` tool is-consent-gated: a first call never delivers, it only files the request and-returns `status: "pending"` with a `request_id`; show the user the-Keyvault approval step, then call `Space.teleport` again with that-same `request_id` (`TeleportRetry::request_id`). A second `"pending"`-means the user has not decided yet -- call again the same way. Only-`status: "moved"` means the session actually landed. An embedded host-(no separate daemon) always returns `"moved"` in one call: there is-nothing to retry.--Returned by [`Space.teleport`](#spaceteleport).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `status` | `String` | | `moved` or `pending`. |-| `request_id` / `requestId` | `Option<String>` | | The Keyvault request to retry with, while pending. |-| `app` | `String` | | App. |-| `space` | `String` | | Space. |-| `method` | `String` | | `import_session`. |-| `transferred_paths` / `transferredPaths` | `Vec<String>` | | Paths sent. |-| `bundle_bytes` / `bundleBytes` | `u64` | | Bundle bytes. |-| `bundle_sha256` / `bundleSha256` | `String` | | Bundle SHA-256, verified by the Space. |-| `imported` | `Vec<String>` | | Groups imported. |-| `skipped` | `Vec<String>` | | Items skipped, with reasons. |-| `launched` | `bool` | | The app was launched. |--## `TeleportItem` record--One item a teleport would move.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `relative_path` / `relativePath` | `String` | | Bundle-relative path (what an approval names). |-| `label` | `String` | | Label. |-| `estimated_bytes` / `estimatedBytes` | `u64` | | Estimated bytes. |-| `is_sensitive` / `isSensitive` | `bool` | | Credentials, cookies, tokens, transcripts. |-| `is_checked_by_default` / `isCheckedByDefault` | `bool` | | In the default selection. |-| `count` | `Option<u64>` | | Count of things it holds. |-| `count_noun` / `countNoun` | `Option<String>` | | Noun for `count`. |--## `TeleportManifest` record--Exactly what would leave this machine.--Returned by [`Space.teleport_manifest`](#spaceteleport_manifest).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app` | `String` | | Provider id (`firefox`, `chrome`, `claude-code`, ...). |-| `display_name` / `displayName` | `String` | | Display name. |-| `scope` | `String` | | `full` or `tabs`. |-| `items` | [`Vec<TeleportItem>`](#teleportitem-record) | | Items. |-| `total_estimated_bytes` / `totalEstimatedBytes` | `u64` | | Provider total. |-| `notes` | `Vec<String>` | | Provider caveats. |diff --git a/docs/content/docs/cua-sdk/reference/spaces/volume-app-core.mdx b/docs/content/docs/cua-sdk/reference/spaces/volume-app-core.mdxdeleted file mode 100644index ca7bfdc897..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/volume-app-core.mdx+++ /dev/null@@ -1,863 +0,0 @@-----title: "App core: Cua Volume storage, mount and sync"-description: "Settings, Storage (this machine or an S3-compatible bucket, the Finder volume, the cache), the first run's Cua Volume page and the Drive page's devices and conflicts."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--<Callout title="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.-</Callout>--`app_storage_reduce` and `app_storage_section` drive Settings, Storage from the daemon's `volume_storage`, `volume_mount_status` and `volume_cache_stats` answers; its `request` names the tool to run (`volume_storage_set`, `volume_mount`, `volume_cache_set`, ...). S3 keys travel only in the `volume_storage_set` request. `AppDriveCard` is the first run's Cua Volume page (off by default), drawn over the `app_drive_mount_preview` miniature. `AppDriveSyncInput` feeds the Drive page's devices and conflicts.--## `AppConflictView` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | The file (what Resolve sends). |-| `text` | `String` | | |-| `trailing` | `String` | | |-| `reveal` | `Option<String>` | | The copy to show in the file manager (mounted only). |-| `open_label` / `openLabel` | `Option<String>` | | "Open" when `reveal` is set. |-| `resolve_label` / `resolveLabel` | `String` | | "Resolve". |--## `AppDriveCacheInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `size_bytes` / `sizeBytes` | `u64` | | |-| `capacity_bytes` / `capacityBytes` | `u64` | | |--## `AppDriveCard` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `label` | `String` | | "Add Cua Volume to Finder" (Linux: "Mount Cua Volume"). |-| `image_label` / `imageLabel` | `String` | | The miniature's spoken description. |-| `checked` | `bool` | | Ticked. |-| `enabled` | `bool` | | The checkbox can be used (the daemon can mount here). |-| `busy` | `bool` | | Mounting or unmounting. |-| `note` | `Option<String>` | | One muted line under it (checking, why not, what to approve). |-| `error` | `Option<String>` | | Why mounting failed. |-| `settings_label` / `settingsLabel` | `Option<String>` | | "Open System Settings" while macOS waits for the extension's approval. |-| `settings_url` / `settingsUrl` | `Option<String>` | | Where it goes. |-| `storage_title` / `storageTitle` | `Option<String>` | | "Where your files live" (none until the daemon answered). |-| `storage_options` / `storageOptions` | [`Vec<AppSettingsOption>`](/cua-sdk/reference/spaces/app-core/window#appsettingsoption-record) | | This Mac, Your S3 bucket, Set up later. |-| `storage_rows` / `storageRows` | [`Vec<AppSettingsRow>`](/cua-sdk/reference/spaces/app-core/window#appsettingsrow-record) | | The bucket's fields, Test connection and its answer (Your S3 bucket), drawn like Settings' rows. |-| `storage_note` / `storageNote` | `Option<String>` | | One muted line for Set up later. |-| `stored_in` / `storedIn` | `Option<String>` | | This Mac: "Stored in ~/.cua/volume/data" (the daemon's path). |-| `mounted_at` / `mountedAt` | `Option<String>` | | The mounted volume: "In Finder at ~/Cua Volume". |-| `stored_path` / `storedPath` | `Option<String>` | | Full paths for tooltips and Show in Finder: stored, mounted. |-| `mounted_path` / `mountedPath` | `Option<String>` | | |-| `can_continue` / `canContinue` | `bool` | | Continue can be pressed. |--## `AppDriveCheckInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ok` | `bool` | | |-| `reachable` | `bool` | | |-| `authorized` | `bool` | | |-| `versioning` | `bool` | | |-| `detail` | `Option<String>` | | |-| `applied` | `bool` | | Saved, and the daemon switched to it. |--## `AppDriveConflictInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | The file (the drive's path). |-| `conflict_path` / `conflictPath` | `String` | | The visible copy holding the losing write. |-| `winner_device` / `winnerDevice` | `String` | | |-| `loser_device` / `loserDevice` | `String` | | |-| `ts_ms` / `tsMs` | `u64` | | |--## `AppDriveDeviceInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `name` | `String` | | |-| `this_device` / `thisDevice` | `bool` | | |-| `last_seen_ms` / `lastSeenMs` | `u64` | | Its last heartbeat or change (Unix ms). |-| `last_change_ms` / `lastChangeMs` | `u64` | | |--## `AppDriveMountFrame` record--Returned by [`app_drive_mount_preview_frame`](#app_drive_mount_preview_frame), [`app_drive_mount_preview_still`](#app_drive_mount_preview_still).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `volume` | `f64` | | The volume in the sidebar, 0 absent to 1 shown (and selected). |-| `flight` | [`Option<AppPreviewPoint>`](/cua-sdk/reference/spaces/app-core/onboarding-previews#apppreviewpoint-record) | | The file in flight: its icon's top left (drawn above both windows). |-| `arrived` | `Vec<f64>` | | Each file in the volume, 0 absent to 1 shown. |--## `AppDriveMountInput` record--Returned by [`app_drive_mount_from_json`](#app_drive_mount_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `enabled` | `bool` | | The user's opt-in. |-| `state` | `String` | | `off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`. |-| `method` | `String` | | `fskit`, `nfs`, `fuse`, `none`. |-| `path` | `Option<String>` | | The mount point when mounted. |-| `volume_name` / `volumeName` | `String` | | "Cua Volume". |-| `detail` | `Option<String>` | | One sentence for `error`, `needs_approval`, `unsupported`. |-| `settings_url` / `settingsUrl` | `Option<String>` | | `needs_approval`: System Settings' file system extensions. |--## `AppDriveMountPreview` record--Returned by [`app_drive_mount_preview`](#app_drive_mount_preview).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `width` | `f64` | | Stage width. |-| `height` | `f64` | | Stage height. |-| `loop_ms` / `loopMs` | `u32` | | One loop (ms). |-| `space` | [`AppPreviewWindow`](/cua-sdk/reference/spaces/app-core/onboarding-previews#apppreviewwindow-record) | | The Space (left). |-| `finder` | [`AppPreviewWindow`](/cua-sdk/reference/spaces/app-core/onboarding-previews#apppreviewwindow-record) | | The Finder window (right). |-| `sidebar` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The Finder window's sidebar (a shade darker than its content). |-| `places` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The sidebar's other places (placeholder bars). |-| `volume` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The volume's row in the sidebar (the selection highlight). |-| `volume_icon` / `volumeIcon` | [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The volume's drive glyph. |-| `volume_label` / `volumeLabel` | `String` | | The volume's name, drawn from `volume_label_x`, centred on the row. |-| `volume_label_x` / `volumeLabelX` | `f64` | | Where the name starts. |-| `font_size` / `fontSize` | `f64` | | The name's font size. |-| `source_icons` / `sourceIcons` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | The Space's files (icons), top to bottom. |-| `source_labels` / `sourceLabels` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | Their name bars. |-| `dest_icons` / `destIcons` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | Where each file lands in the volume (icons). |-| `dest_labels` / `destLabels` | [`Vec<AppLogicalRect>`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record) | | Their name bars. |--## `AppDriveS3Input` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `endpoint` | `Option<String>` | | None: AWS. |-| `region` | `String` | | |-| `bucket` | `String` | | |-| `root` | `String` | | A key prefix inside the bucket. |-| `path_style` / `pathStyle` | `bool` | | |--## `AppDriveStorageInput` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `backend` | `String` | | `fs` or `s3` (`cloud` is never offered). |-| `fs_path` / `fsPath` | `String` | | Where `fs` keeps the bytes. |-| `s3` | [`Option<AppDriveS3Input>`](#appdrives3input-record) | | |-| `has_keys` / `hasKeys` | `bool` | | S3 keys are saved in the credential store. |--## `AppDriveStorageUpdate` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `backend` | `String` | | |-| `s3` | [`Option<AppDriveS3Input>`](#appdrives3input-record) | | |-| `access_key_id` / `accessKeyId` | `Option<String>` | | Both keys or neither. |-| `secret_access_key` / `secretAccessKey` | `Option<String>` | | |-| `dry_run` / `dryRun` | `bool` | | Only check ("Test connection"). |--## `AppDriveSyncInput` record--Returned by [`app_drive_sync_from_json`](#app_drive_sync_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `device_id` / `deviceId` | `String` | | |-| `device_name` / `deviceName` | `String` | | |-| `feed` | `String` | | `live`, `off` (one device on this machine's store), `error`. |-| `last_poll_ms` / `lastPollMs` | `u64` | | This device's last poll of the feed (Unix ms). |-| `pending_uploads` / `pendingUploads` | `u32` | | Local writes not yet in the bucket. |-| `conflicts` | [`Vec<AppDriveConflictInput>`](#appdriveconflictinput-record) | | |-| `devices` | [`Vec<AppDriveDeviceInput>`](#appdrivedeviceinput-record) | | This device first. |-| `last_error` / `lastError` | `Option<String>` | | |--## `AppStorageForm` record--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `backend` | `String` | | |-| `endpoint` | `String` | | |-| `region` | `String` | | |-| `bucket` | `String` | | |-| `root` | `String` | | |-| `path_style` / `pathStyle` | `bool` | | |-| `access_key_id` / `accessKeyId` | `String` | | |-| `secret_access_key` / `secretAccessKey` | `String` | | |--## `AppStorageInput` record--Returned by [`app_storage_input_from_json`](#app_storage_input_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `os` | [`AppSpaceOs`](/cua-sdk/reference/spaces/app-core/spaces#appspaceos-enum) | | This machine's system (the words: "This Mac", "Show in Finder"). |-| `home` | `Option<String>` | | The home folder, to show paths as `~/...`. |-| `storage` | [`Option<AppDriveStorageInput>`](#appdrivestorageinput-record) | | None until read (or when the daemon cannot answer). |-| `mount` | [`Option<AppDriveMountInput>`](#appdrivemountinput-record) | | |-| `cache` | [`Option<AppDriveCacheInput>`](#appdrivecacheinput-record) | | |--## `AppStorageState` record--Returned by [`app_storage_initial`](#app_storage_initial), [`app_storage_reduce`](#app_storage_reduce), [`app_storage_state_from_json`](#app_storage_state_from_json).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `form` | [`AppStorageForm`](#appstorageform-record) | | |-| `dirty` | `bool` | | The form differs from what is saved. |-| `busy` | `bool` | | |-| `request` | [`Option<AppStorageRequest>`](#appstoragerequest-enum) | | |-| `check` | [`Option<AppDriveCheckInput>`](#appdrivecheckinput-record) | | The last test or save. |-| `error` | `Option<String>` | | |-| `manual` | `bool` | | The bucket's fields show (else the agent prompt). |-| `seen` | `Option<String>` | | The last `volume_storage` seen (bucket, endpoint, region, keys), to notice the agent connecting a bucket while the prompt shows. |--## `AppDriveStepRequest` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.mount-.unmount-```--</Tab>-<Tab value="Rust">--```rust-AppDriveStepRequest::Mount-AppDriveStepRequest::Unmount-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Mount` | `volume_mount`; answer with `drive-mounted`. |-| `Unmount` | `volume_unmount`; answer with `drive-mounted`. |--## `AppStorageAction` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.loaded(storage: AppDriveStorageInput)-.setBackend(backend: String)-.setField(field: AppStorageField, value: String)-.setPathStyle(on: Bool)-.test-.save-.checked(check: AppDriveCheckInput)-.saved(check: AppDriveCheckInput)-.adopted(check: AppDriveCheckInput)-.showManual(on: Bool)-.setMount(on: Bool)-.reveal(path: String)-.openUrl(url: String)-.setCache(capacityBytes: UInt64)-.clearCache-.done-.failed(error: String)-```--</Tab>-<Tab value="Rust">--```rust-AppStorageAction::Loaded { storage: AppDriveStorageInput }-AppStorageAction::SetBackend { backend: String }-AppStorageAction::SetField { field: AppStorageField, value: String }-AppStorageAction::SetPathStyle { on: bool }-AppStorageAction::Test-AppStorageAction::Save-AppStorageAction::Checked { check: AppDriveCheckInput }-AppStorageAction::Saved { check: AppDriveCheckInput }-AppStorageAction::Adopted { check: AppDriveCheckInput }-AppStorageAction::ShowManual { on: bool }-AppStorageAction::SetMount { on: bool }-AppStorageAction::Reveal { path: String }-AppStorageAction::OpenUrl { url: String }-AppStorageAction::SetCache { capacity_bytes: u64 }-AppStorageAction::ClearCache-AppStorageAction::Done-AppStorageAction::Failed { error: String }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Loaded` | `volume_storage` was read: the form follows it unless edited. Fields: `storage: AppDriveStorageInput` |-| `SetBackend` | The backend choice (`fs`, `s3`). Fields: `backend: String` |-| `SetField` | Fields: `field: AppStorageField`, `value: String` |-| `SetPathStyle` | Fields: `on: bool` |-| `Test` | "Test connection". |-| `Save` | The section's Save. |-| `Checked` | A test's answer. Fields: `check: AppDriveCheckInput` |-| `Saved` | A save's answer. Fields: `check: AppDriveCheckInput` |-| `Adopted` | An adopted bucket's answer. Fields: `check: AppDriveCheckInput` |-| `ShowManual` | "Enter details manually" (on) or "Use a prompt instead" (off). Fields: `on: bool` |-| `SetMount` | "Show Cua Volume in Finder" on or off. Fields: `on: bool` |-| `Reveal` | "Show in Finder" / "Open". Fields: `path: String` |-| `OpenUrl` | "Open System Settings". Fields: `url: String` |-| `SetCache` | Fields: `capacity_bytes: u64` |-| `ClearCache` | |-| `Done` | |-| `Failed` | Fields: `error: String` |--## `AppStorageChoice` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.local-.s3-.later-```--</Tab>-<Tab value="Rust">--```rust-AppStorageChoice::Local-AppStorageChoice::S3-AppStorageChoice::Later-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Local` | This machine (the `fs` backend, no setup). |-| `S3` | The user's own S3-compatible bucket. |-| `Later` | Decide later, in Settings, Storage. |--## `AppStorageField` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.endpoint-.region-.bucket-.accessKeyId-.secretAccessKey-```--</Tab>-<Tab value="Rust">--```rust-AppStorageField::Endpoint-AppStorageField::Region-AppStorageField::Bucket-AppStorageField::AccessKeyId-AppStorageField::SecretAccessKey-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Endpoint` | |-| `Region` | |-| `Bucket` | |-| `AccessKeyId` | |-| `SecretAccessKey` | |--## `AppStorageRequest` enum--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-.test(update: AppDriveStorageUpdate)-.save(update: AppDriveStorageUpdate)-.adopt(update: AppDriveStorageUpdate)-.mount-.unmount-.reveal(path: String)-.openUrl(url: String)-.setCache(capacityBytes: UInt64)-.clearCache-```--</Tab>-<Tab value="Rust">--```rust-AppStorageRequest::Test { update: AppDriveStorageUpdate }-AppStorageRequest::Save { update: AppDriveStorageUpdate }-AppStorageRequest::Adopt { update: AppDriveStorageUpdate }-AppStorageRequest::Mount-AppStorageRequest::Unmount-AppStorageRequest::Reveal { path: String }-AppStorageRequest::OpenUrl { url: String }-AppStorageRequest::SetCache { capacity_bytes: u64 }-AppStorageRequest::ClearCache-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Test` | `volume_storage_set` with `dry_run`; answer with `checked`. Fields: `update: AppDriveStorageUpdate` |-| `Save` | `volume_storage_set`; answer with `saved`. Fields: `update: AppDriveStorageUpdate` |-| `Adopt` | `volume_storage_set` (keys from the credential store) for a bucket the user's agent configured; answer with `adopted`. Fields: `update: AppDriveStorageUpdate` |-| `Mount` | `volume_mount`. |-| `Unmount` | `volume_unmount`. |-| `Reveal` | Show the mount in the file manager (the shell's own call). Fields: `path: String` |-| `OpenUrl` | Open a URL (System Settings' file system extensions). Fields: `url: String` |-| `SetCache` | `volume_cache_set`. Fields: `capacity_bytes: u64` |-| `ClearCache` | `volume_cache_clear`. |--## `app_drive_mount_from_json`--`volume_mount_status`'s JSON as the core takes it.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveMountFromJson(json: String) throws -> AppDriveMountInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_mount_from_json(json: String) -> Result<AppDriveMountInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppDriveMountInput`](#appdrivemountinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_drive_mount_preview`--The first run's Cua Volume page: its miniature (files from a Space-arriving in the Cua Volume volume in Finder).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveMountPreview() -> AppDriveMountPreview-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_mount_preview() -> AppDriveMountPreview-```--</Tab>-</Tabs>--**Returns** [`AppDriveMountPreview`](#appdrivemountpreview-record)--## `app_drive_mount_preview_frame`--The page's miniature `t_ms` into its loop (it wraps).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveMountPreviewFrame(tMs: UInt32) -> AppDriveMountFrame-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_mount_preview_frame(t_ms: u32) -> AppDriveMountFrame-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `t_ms` | `u32` | required |--**Returns** [`AppDriveMountFrame`](#appdrivemountframe-record)--## `app_drive_mount_preview_still`--The page's miniature with Reduce Motion: files arriving, still.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveMountPreviewStill() -> AppDriveMountFrame-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_mount_preview_still() -> AppDriveMountFrame-```--</Tab>-</Tabs>--**Returns** [`AppDriveMountFrame`](#appdrivemountframe-record)--## `app_drive_sync_from_json`--`volume_sync_status`'s JSON as the core takes it.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appDriveSyncFromJson(json: String) throws -> AppDriveSyncInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_drive_sync_from_json(json: String) -> Result<AppDriveSyncInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppDriveSyncInput`](#appdrivesyncinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_storage_action_from_json`--A Storage action from JSON (a test's or save's answer, parity flows).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageActionFromJson(json: String) throws -> AppStorageAction-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_action_from_json(json: String) -> Result<AppStorageAction, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppStorageAction`](#appstorageaction-enum) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_storage_choose`--What a Storage row's choice asks for.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageChoose(id: String, option: String) -> AppStorageAction?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_choose(id: String, option: String) -> Option<AppStorageAction>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |-| `option` | `String` | required |--**Returns** [`Option<AppStorageAction>`](#appstorageaction-enum)--## `app_storage_edit`--What a Storage field's edit asks for.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageEdit(id: String, value: String) -> AppStorageAction?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_edit(id: String, value: String) -> Option<AppStorageAction>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `id` | `String` | required |-| `value` | `String` | required |--**Returns** [`Option<AppStorageAction>`](#appstorageaction-enum)--## `app_storage_initial`--Settings' Storage section before anything is read.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageInitial() -> AppStorageState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_initial() -> AppStorageState-```--</Tab>-</Tabs>--**Returns** [`AppStorageState`](#appstoragestate-record)--## `app_storage_input_from_json`--Storage input from JSON (the daemon's answers, as they come).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageInputFromJson(json: String) throws -> AppStorageInput-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_input_from_json(json: String) -> Result<AppStorageInput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppStorageInput`](#appstorageinput-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_storage_press`--What a Storage row's button asks for.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStoragePress(input: AppStorageInput, id: String) -> AppStorageAction?-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_press(input: AppStorageInput, id: String) -> Option<AppStorageAction>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppStorageInput`](#appstorageinput-record) | required |-| `id` | `String` | required |--**Returns** [`Option<AppStorageAction>`](#appstorageaction-enum)--## `app_storage_reduce`--Advances the Storage section.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageReduce(state: AppStorageState, action: AppStorageAction) -> AppStorageState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_reduce(state: AppStorageState, action: AppStorageAction) -> AppStorageState-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `state` | [`AppStorageState`](#appstoragestate-record) | required |-| `action` | [`AppStorageAction`](#appstorageaction-enum) | required |--**Returns** [`AppStorageState`](#appstoragestate-record)--## `app_storage_request_text`--One line naming a Storage command.--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageRequestText(request: AppStorageRequest) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_request_text(request: AppStorageRequest) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `request` | [`AppStorageRequest`](#appstoragerequest-enum) | required |--**Returns** `String`--## `app_storage_section`--The Storage section as drawn (a Settings section).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageSection(input: AppStorageInput, state: AppStorageState) -> AppSettingsSection-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_section(input: AppStorageInput, state: AppStorageState) -> AppSettingsSection-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `input` | [`AppStorageInput`](#appstorageinput-record) | required |-| `state` | [`AppStorageState`](#appstoragestate-record) | required |--**Returns** [`AppSettingsSection`](/cua-sdk/reference/spaces/app-core/window#appsettingssection-record)--## `app_storage_state_from_json`--Settings, Storage's state from JSON (fixtures, parity).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageStateFromJson(json: String) throws -> AppStorageState-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_state_from_json(json: String) -> Result<AppStorageState, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Returns** [`AppStorageState`](#appstoragestate-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `app_storage_update_json`--The Storage request as the tool's JSON arguments (`volume_storage_set`).--<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Swift">--```swift-func appStorageUpdateJson(update: AppDriveStorageUpdate) -> String-```--</Tab>-<Tab value="Rust">--```rust-pub fn app_storage_update_json(update: AppDriveStorageUpdate) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `update` | [`AppDriveStorageUpdate`](#appdrivestorageupdate-record) | required |--**Returns** `String`--## All items--37 items, across this page and its subpages, grouped by page (each item's section is on its page). Methods are listed on their object.--**App core: Cua Volume storage, mount and sync**: [`app_drive_mount_from_json`](#app_drive_mount_from_json), [`app_drive_mount_preview`](#app_drive_mount_preview), [`app_drive_mount_preview_frame`](#app_drive_mount_preview_frame), [`app_drive_mount_preview_still`](#app_drive_mount_preview_still), [`app_drive_sync_from_json`](#app_drive_sync_from_json), [`app_storage_action_from_json`](#app_storage_action_from_json), [`app_storage_choose`](#app_storage_choose), [`app_storage_edit`](#app_storage_edit), [`app_storage_initial`](#app_storage_initial), [`app_storage_input_from_json`](#app_storage_input_from_json), [`app_storage_press`](#app_storage_press), [`app_storage_reduce`](#app_storage_reduce), [`app_storage_request_text`](#app_storage_request_text), [`app_storage_section`](#app_storage_section), [`app_storage_state_from_json`](#app_storage_state_from_json), [`app_storage_update_json`](#app_storage_update_json), [`AppConflictView`](#appconflictview-record), [`AppDriveCacheInput`](#appdrivecacheinput-record), [`AppDriveCard`](#appdrivecard-record), [`AppDriveCheckInput`](#appdrivecheckinput-record), [`AppDriveConflictInput`](#appdriveconflictinput-record), [`AppDriveDeviceInput`](#appdrivedeviceinput-record), [`AppDriveMountFrame`](#appdrivemountframe-record), [`AppDriveMountInput`](#appdrivemountinput-record), [`AppDriveMountPreview`](#appdrivemountpreview-record), [`AppDriveS3Input`](#appdrives3input-record), [`AppDriveStepRequest`](#appdrivesteprequest-enum), [`AppDriveStorageInput`](#appdrivestorageinput-record), [`AppDriveStorageUpdate`](#appdrivestorageupdate-record), [`AppDriveSyncInput`](#appdrivesyncinput-record), [`AppStorageAction`](#appstorageaction-enum), [`AppStorageChoice`](#appstoragechoice-enum), [`AppStorageField`](#appstoragefield-enum), [`AppStorageForm`](#appstorageform-record), [`AppStorageInput`](#appstorageinput-record), [`AppStorageRequest`](#appstoragerequest-enum), [`AppStorageState`](#appstoragestate-record)diff --git a/docs/content/docs/cua-sdk/reference/spaces/volume-sync.mdx b/docs/content/docs/cua-sdk/reference/spaces/volume-sync.mdxdeleted file mode 100644index 6eccfd3fc5..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/volume-sync.mdx+++ /dev/null@@ -1,720 +0,0 @@-----title: "Cua Volume storage and sync"-description: "Where the drive keeps its bytes, the volume on this machine and in Spaces, sync across devices, and the block cache."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--Runtime methods of the drive on the `Spaces` registry: Settings > Storage, the mount, sync state and the cache. `volume_sync_status` also lists the volume mounted in each Space. Files: [Cua Volume](/cua-sdk/reference/spaces/volume).--## Storage, the volume, sync and the cache--Methods of [`Spaces`](/cua-sdk/reference/spaces#spaces).--### `Spaces.volume_storage`--`volume_storage`: where the drive keeps its bytes.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_storage(self) -> DriveStorage-```--</Tab>-<Tab value="TypeScript">--```ts-volumeStorage(asyncOpts_?: { signal: AbortSignal }): Promise<DriveStorage>-```--</Tab>-<Tab value="Swift">--```swift-func volumeStorage() async throws -> DriveStorage-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeStorage(): DriveStorage-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_storage(&self) -> Result<DriveStorage, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveStorage`](#drivestorage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_storage_set`--`volume_storage_set`: tests, and unless `dry_run` saves and switches-to, a storage backend (live, no restart).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_storage_set(self, update: DriveStorageUpdate) -> DriveStorageCheck-```--</Tab>-<Tab value="TypeScript">--```ts-volumeStorageSet(update: DriveStorageUpdate, asyncOpts_?: { signal: AbortSignal }): Promise<DriveStorageCheck>-```--</Tab>-<Tab value="Swift">--```swift-func volumeStorageSet(update: DriveStorageUpdate) async throws -> DriveStorageCheck-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeStorageSet(update: DriveStorageUpdate): DriveStorageCheck-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_storage_set(&self, update: DriveStorageUpdate) -> Result<DriveStorageCheck, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `update` | [`DriveStorageUpdate`](#drivestorageupdate-record) | required |--**Returns** [`DriveStorageCheck`](#drivestoragecheck-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_mount_status`--`volume_mount_status`: whether the drive is mounted as a volume.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_mount_status(self) -> DriveMountStatus-```--</Tab>-<Tab value="TypeScript">--```ts-volumeMountStatus(asyncOpts_?: { signal: AbortSignal }): Promise<DriveMountStatus>-```--</Tab>-<Tab value="Swift">--```swift-func volumeMountStatus() async throws -> DriveMountStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeMountStatus(): DriveMountStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_mount_status(&self) -> Result<DriveMountStatus, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveMountStatus`](#drivemountstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_mount`--`volume_mount`: turns the mount on (kept across restarts) and mounts.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_mount(self) -> DriveMountStatus-```--</Tab>-<Tab value="TypeScript">--```ts-volumeMount(asyncOpts_?: { signal: AbortSignal }): Promise<DriveMountStatus>-```--</Tab>-<Tab value="Swift">--```swift-func volumeMount() async throws -> DriveMountStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeMount(): DriveMountStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_mount(&self) -> Result<DriveMountStatus, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveMountStatus`](#drivemountstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_unmount`--`volume_unmount`: turns the mount off; pending uploads land first.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_unmount(self) -> DriveMountStatus-```--</Tab>-<Tab value="TypeScript">--```ts-volumeUnmount(asyncOpts_?: { signal: AbortSignal }): Promise<DriveMountStatus>-```--</Tab>-<Tab value="Swift">--```swift-func volumeUnmount() async throws -> DriveMountStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeUnmount(): DriveMountStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_unmount(&self) -> Result<DriveMountStatus, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveMountStatus`](#drivemountstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_sync_status`--`volume_sync_status`: devices, pending uploads and conflicts.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_sync_status(self) -> DriveSyncStatus-```--</Tab>-<Tab value="TypeScript">--```ts-volumeSyncStatus(asyncOpts_?: { signal: AbortSignal }): Promise<DriveSyncStatus>-```--</Tab>-<Tab value="Swift">--```swift-func volumeSyncStatus() async throws -> DriveSyncStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeSyncStatus(): DriveSyncStatus-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_sync_status(&self) -> Result<DriveSyncStatus, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveSyncStatus`](#drivesyncstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_sync_events`--`volume_sync_events`: events after `since_seq`, waiting up to-`wait_ms` (at most 30000) for one.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_sync_events(self, since_seq: Optional[int], wait_ms: Optional[int]) -> DriveSyncEvents-```--</Tab>-<Tab value="TypeScript">--```ts-volumeSyncEvents(sinceSeq: bigint | undefined, waitMs: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<DriveSyncEvents>-```--</Tab>-<Tab value="Swift">--```swift-func volumeSyncEvents(sinceSeq: UInt64?, waitMs: UInt32?) async throws -> DriveSyncEvents-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeSyncEvents(sinceSeq: ULong?, waitMs: UInt?): DriveSyncEvents-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_sync_events(&self, since_seq: Option<u64>, wait_ms: Option<u32>) -> Result<DriveSyncEvents, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `since_seq` | `Option<u64>` | required |-| `wait_ms` | `Option<u32>` | required |--**Returns** [`DriveSyncEvents`](#drivesyncevents-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_sync_resolve`--`volume_sync_resolve`: clears a conflict from the list (files stay).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_sync_resolve(self, path: str) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-volumeSyncResolve(path: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func volumeSyncResolve(path: String) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeSyncResolve(path: String)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_sync_resolve(&self, path: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `path` | `String` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_cache_stats`--`volume_cache_stats`: the block cache's size, cap and hit rate.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_cache_stats(self) -> DriveCacheStats-```--</Tab>-<Tab value="TypeScript">--```ts-volumeCacheStats(asyncOpts_?: { signal: AbortSignal }): Promise<DriveCacheStats>-```--</Tab>-<Tab value="Swift">--```swift-func volumeCacheStats() async throws -> DriveCacheStats-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeCacheStats(): DriveCacheStats-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_cache_stats(&self) -> Result<DriveCacheStats, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveCacheStats`](#drivecachestats-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_cache_set`--`volume_cache_set`: the cache's size cap (at least 256 MiB).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_cache_set(self, capacity_bytes: int) -> DriveCacheStats-```--</Tab>-<Tab value="TypeScript">--```ts-volumeCacheSet(capacityBytes: bigint, asyncOpts_?: { signal: AbortSignal }): Promise<DriveCacheStats>-```--</Tab>-<Tab value="Swift">--```swift-func volumeCacheSet(capacityBytes: UInt64) async throws -> DriveCacheStats-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeCacheSet(capacityBytes: ULong): DriveCacheStats-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_cache_set(&self, capacity_bytes: u64) -> Result<DriveCacheStats, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `capacity_bytes` | `u64` | required |--**Returns** [`DriveCacheStats`](#drivecachestats-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Spaces.volume_cache_clear`--`volume_cache_clear`: drops every cached block.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def volume_cache_clear(self) -> DriveCacheStats-```--</Tab>-<Tab value="TypeScript">--```ts-volumeCacheClear(asyncOpts_?: { signal: AbortSignal }): Promise<DriveCacheStats>-```--</Tab>-<Tab value="Swift">--```swift-func volumeCacheClear() async throws -> DriveCacheStats-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun volumeCacheClear(): DriveCacheStats-```--</Tab>-<Tab value="Rust">--```rust-pub async fn volume_cache_clear(&self) -> Result<DriveCacheStats, CuaError>-```--</Tab>-</Tabs>--**Returns** [`DriveCacheStats`](#drivecachestats-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `DriveStorage` record--Where the drive keeps its bytes (Settings > Storage).--Returned by [`Spaces.volume_storage`](#spacesvolume_storage).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `backend` | `String` | | `fs` or `s3`. |-| `fs_path` / `fsPath` | `String` | | Where the `fs` backend keeps bytes. |-| `s3` | [`Option<DriveS3Settings>`](#drives3settings-record) | | |-| `has_keys` / `hasKeys` | `bool` | | S3 keys are saved (they are never returned). |-| `cloud_available` / `cloudAvailable` | `bool` | | Always false in this release: hide the Cua cloud option. |--## `DriveS3Settings` record--Where an S3-compatible bucket is (no keys).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `endpoint` | `Option<String>` | | `http://127.0.0.1:9000`, `https://<account>.r2.cloudflarestorage.com`; `None` for AWS. |-| `region` | `String` | | `us-east-1`; `auto` for R2. |-| `bucket` | `String` | | |-| `root` | `String` | | A key prefix inside the bucket (may be empty). |-| `path_style` / `pathStyle` | `bool` | | Path-style addressing (MinIO and most self-hosted stores). |--## `DriveStorageUpdate` record--A storage change, or with `dry_run` a connection test.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `backend` | `String` | | `fs` or `s3` (`cloud` is refused). |-| `s3` | [`Option<DriveS3Settings>`](#drives3settings-record) | | |-| `access_key_id` / `accessKeyId` | `Option<String>` | | With `secret_access_key` (both or neither); saved in the credential store. |-| `secret_access_key` / `secretAccessKey` | `Option<String>` | | |-| `dry_run` / `dryRun` | `bool` | | Only test; change nothing. |--## `DriveStorageCheck` record--What a storage test found.--Returned by [`Spaces.volume_storage_set`](#spacesvolume_storage_set).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ok` | `bool` | | |-| `reachable` | `bool` | | |-| `authorized` | `bool` | | |-| `versioning` | `bool` | | Bucket versioning is on (required). |-| `detail` | `Option<String>` | | A sentence when not ok: what is wrong and how to fix it. |-| `problem` | `Option<String>` | | What is wrong, to key the UI on: `unreachable`, `bad_keys`, `forbidden`, `bucket_missing`, `versioning_off`, `path_style_needed`. |-| `applied` | `bool` | | Saved and switched live. |--## `DriveMountStatus` record--The drive as a volume.--Returned by [`Spaces.volume_mount`](#spacesvolume_mount), [`Spaces.volume_mount_status`](#spacesvolume_mount_status), [`Spaces.volume_unmount`](#spacesvolume_unmount).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `enabled` | `bool` | | The user's opt-in (off by default). |-| `state` | `String` | | `off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`. |-| `method` | `String` | | `nfs` (macOS), `fuse` (Linux), `fskit`, `none`. |-| `path` | `Option<String>` | | The mount point when mounted ("Show in Finder" opens it). |-| `volume_name` / `volumeName` | `String` | | |-| `detail` | `Option<String>` | | |-| `settings_url` / `settingsUrl` | `Option<String>` | | |--## `DriveSyncStatus` record--Sync across devices.--Returned by [`Spaces.volume_sync_status`](#spacesvolume_sync_status).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `device_id` / `deviceId` | `String` | | |-| `device_name` / `deviceName` | `String` | | |-| `feed` | `String` | | `live`, `off` (a store on this machine), `offline` (the bucket stopped answering; see `last_error`). |-| `poll_interval_ms` / `pollIntervalMs` | `u64` | | |-| `last_poll_ms` / `lastPollMs` | `u64` | | |-| `last_remote_change_ms` / `lastRemoteChangeMs` | `u64` | | |-| `pending_uploads` / `pendingUploads` | `u32` | | |-| `pending_bytes` / `pendingBytes` | `u64` | | |-| `conflicts` | [`Vec<DriveConflict>`](#driveconflict-record) | | |-| `devices` | [`Vec<DriveDevice>`](#drivedevice-record) | | |-| `last_error` / `lastError` | `Option<String>` | | |-| `pending` | [`Vec<DrivePendingUpload>`](#drivependingupload-record) | | The files still uploading, largest first (at most 100). |-| `backend` | `String` | | `fs` (This Mac) or `s3` (your bucket). |-| `mount` | `String` | | This machine's mount: `off`, `mounting`, `mounted`, `needs_approval`, `unsupported` or `error`. |-| `cache` | [`Option<DriveCacheStats>`](#drivecachestats-record) | | The block cache in front of a bucket. |-| `volumes` | [`Vec<DriveSpaceVolume>`](#drivespacevolume-record) | | The volume mounted in Spaces. |--## `DrivePendingUpload` record--A file waiting to upload.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | |-| `bytes` | `u64` | | |--## `DriveSpaceVolume` record--The volume mounted in a Space's guest.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `String` | | |-| `mount_path` / `mountPath` | `String` | | `/volume` (Linux) or `~/Cua Volume` (macOS), as the guest sees it. |-| `backend` | `String` | | `fs` (FUSE) or `nfs`. |-| `principal` | `String` | | Whose view it shows: `space:<folder>`, or `agent:<name>` while a persistent agent runs there. |--## `DriveConflict` record--A write that lost to a later one, kept in history and as a copy.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `String` | | |-| `conflict_path` / `conflictPath` | `String` | | |-| `winner_device` / `winnerDevice` | `String` | | |-| `loser_device` / `loserDevice` | `String` | | |-| `winner_version` / `winnerVersion` | `String` | | |-| `loser_version` / `loserVersion` | `String` | | |-| `ts_ms` / `tsMs` | `u64` | | |--## `DriveDevice` record--A device sharing the drive's bucket.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | |-| `name` | `String` | | |-| `this_device` / `thisDevice` | `bool` | | |-| `last_seen_ms` / `lastSeenMs` | `u64` | | |-| `last_change_ms` / `lastChangeMs` | `u64` | | |-| `changes` | `u64` | | |--## `DriveSyncEvents` record--Events after a sequence number, and the sequence to ask after next.--Returned by [`Spaces.volume_sync_events`](#spacesvolume_sync_events).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `events` | [`Vec<DriveSyncEvent>`](#drivesyncevent-record) | | |-| `next_seq` / `nextSeq` | `u64` | | |--## `DriveSyncEvent` record--One sync event.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `seq` | `u64` | | |-| `ts_ms` / `tsMs` | `u64` | | |-| `kind` | `String` | | `remote_change`, `remote_delete`, `upload_started`, `upload_done`, `upload_failed`, `conflict`, `error`. |-| `path` | `String` | | |-| `device` | `String` | | |-| `size` | `u64` | | |-| `version` | `String` | | |-| `detail` | `String` | | |--## `DriveCacheStats` record--The block cache in front of a remote store.--Returned by [`Spaces.volume_cache_clear`](#spacesvolume_cache_clear), [`Spaces.volume_cache_set`](#spacesvolume_cache_set), [`Spaces.volume_cache_stats`](#spacesvolume_cache_stats).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `dir` | `String` | | |-| `size_bytes` / `sizeBytes` | `u64` | | |-| `capacity_bytes` / `capacityBytes` | `u64` | | |-| `block_bytes` / `blockBytes` | `u64` | | |-| `blocks` | `u64` | | |-| `hits` | `u64` | | |-| `misses` | `u64` | | |-| `hit_rate` / `hitRate` | `f64` | | |-| `prefetched_bytes` / `prefetchedBytes` | `u64` | | |-| `evictions` | `u64` | | |diff --git a/docs/content/docs/cua-sdk/reference/spaces/volume.mdx b/docs/content/docs/cua-sdk/reference/spaces/volume.mdxindex d72cf45f2a..037336989b 100644--- a/docs/content/docs/cua-sdk/reference/spaces/volume.mdx+++ b/docs/content/docs/cua-sdk/reference/spaces/volume.mdx@@ -1,6 +1,6 @@---title: "Cua Volume"-description: "The versioned volume every Space and agent shares: files, history, grants, requests and audit."+description: "The versioned volume every Space and agent shares: files, history, grants, requests, audit, storage and sync."---{/*@@ -871,3 +871,712 @@ One file's sync state.| `state` | `String` | | `synced`, `pending_upload` (not yet in storage: other devices do not see it), `conflict` (a write lost to a later one, kept at `conflict_path`) or `conflict_copy` (the kept copy of a losing write). || `written_by` / `writtenBy` | `Option<String>` | | The device that last wrote it, when another one did. || `conflict_path` / `conflictPath` | `Option<String>` | | |++## Cua Volume storage and sync++Runtime methods of the drive on the `Spaces` registry: Settings > Storage, the mount, sync state and the cache. `volume_sync_status` also lists the volume mounted in each Space. Files: [Cua Volume](/cua-sdk/reference/spaces/volume).++## Storage, the volume, sync and the cache++Methods of [`Spaces`](/cua-sdk/reference/spaces#spaces).++### `Spaces.volume_storage`++`volume_storage`: where the drive keeps its bytes.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_storage(self) -> DriveStorage+```++</Tab>+<Tab value="TypeScript">++```ts+volumeStorage(asyncOpts_?: { signal: AbortSignal }): Promise<DriveStorage>+```++</Tab>+<Tab value="Swift">++```swift+func volumeStorage() async throws -> DriveStorage+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeStorage(): DriveStorage+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_storage(&self) -> Result<DriveStorage, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveStorage`](#drivestorage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_storage_set`++`volume_storage_set`: tests, and unless `dry_run` saves and switches+to, a storage backend (live, no restart).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_storage_set(self, update: DriveStorageUpdate) -> DriveStorageCheck+```++</Tab>+<Tab value="TypeScript">++```ts+volumeStorageSet(update: DriveStorageUpdate, asyncOpts_?: { signal: AbortSignal }): Promise<DriveStorageCheck>+```++</Tab>+<Tab value="Swift">++```swift+func volumeStorageSet(update: DriveStorageUpdate) async throws -> DriveStorageCheck+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeStorageSet(update: DriveStorageUpdate): DriveStorageCheck+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_storage_set(&self, update: DriveStorageUpdate) -> Result<DriveStorageCheck, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `update` | [`DriveStorageUpdate`](#drivestorageupdate-record) | required |++**Returns** [`DriveStorageCheck`](#drivestoragecheck-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_mount_status`++`volume_mount_status`: whether the drive is mounted as a volume.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_mount_status(self) -> DriveMountStatus+```++</Tab>+<Tab value="TypeScript">++```ts+volumeMountStatus(asyncOpts_?: { signal: AbortSignal }): Promise<DriveMountStatus>+```++</Tab>+<Tab value="Swift">++```swift+func volumeMountStatus() async throws -> DriveMountStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeMountStatus(): DriveMountStatus+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_mount_status(&self) -> Result<DriveMountStatus, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveMountStatus`](#drivemountstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_mount`++`volume_mount`: turns the mount on (kept across restarts) and mounts.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_mount(self) -> DriveMountStatus+```++</Tab>+<Tab value="TypeScript">++```ts+volumeMount(asyncOpts_?: { signal: AbortSignal }): Promise<DriveMountStatus>+```++</Tab>+<Tab value="Swift">++```swift+func volumeMount() async throws -> DriveMountStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeMount(): DriveMountStatus+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_mount(&self) -> Result<DriveMountStatus, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveMountStatus`](#drivemountstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_unmount`++`volume_unmount`: turns the mount off; pending uploads land first.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_unmount(self) -> DriveMountStatus+```++</Tab>+<Tab value="TypeScript">++```ts+volumeUnmount(asyncOpts_?: { signal: AbortSignal }): Promise<DriveMountStatus>+```++</Tab>+<Tab value="Swift">++```swift+func volumeUnmount() async throws -> DriveMountStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeUnmount(): DriveMountStatus+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_unmount(&self) -> Result<DriveMountStatus, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveMountStatus`](#drivemountstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_sync_status`++`volume_sync_status`: devices, pending uploads and conflicts.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_sync_status(self) -> DriveSyncStatus+```++</Tab>+<Tab value="TypeScript">++```ts+volumeSyncStatus(asyncOpts_?: { signal: AbortSignal }): Promise<DriveSyncStatus>+```++</Tab>+<Tab value="Swift">++```swift+func volumeSyncStatus() async throws -> DriveSyncStatus+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeSyncStatus(): DriveSyncStatus+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_sync_status(&self) -> Result<DriveSyncStatus, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveSyncStatus`](#drivesyncstatus-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_sync_events`++`volume_sync_events`: events after `since_seq`, waiting up to+`wait_ms` (at most 30000) for one.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_sync_events(self, since_seq: Optional[int], wait_ms: Optional[int]) -> DriveSyncEvents+```++</Tab>+<Tab value="TypeScript">++```ts+volumeSyncEvents(sinceSeq: bigint | undefined, waitMs: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<DriveSyncEvents>+```++</Tab>+<Tab value="Swift">++```swift+func volumeSyncEvents(sinceSeq: UInt64?, waitMs: UInt32?) async throws -> DriveSyncEvents+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeSyncEvents(sinceSeq: ULong?, waitMs: UInt?): DriveSyncEvents+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_sync_events(&self, since_seq: Option<u64>, wait_ms: Option<u32>) -> Result<DriveSyncEvents, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `since_seq` | `Option<u64>` | required |+| `wait_ms` | `Option<u32>` | required |++**Returns** [`DriveSyncEvents`](#drivesyncevents-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_sync_resolve`++`volume_sync_resolve`: clears a conflict from the list (files stay).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_sync_resolve(self, path: str) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+volumeSyncResolve(path: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func volumeSyncResolve(path: String) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeSyncResolve(path: String)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_sync_resolve(&self, path: String) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `path` | `String` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_cache_stats`++`volume_cache_stats`: the block cache's size, cap and hit rate.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_cache_stats(self) -> DriveCacheStats+```++</Tab>+<Tab value="TypeScript">++```ts+volumeCacheStats(asyncOpts_?: { signal: AbortSignal }): Promise<DriveCacheStats>+```++</Tab>+<Tab value="Swift">++```swift+func volumeCacheStats() async throws -> DriveCacheStats+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeCacheStats(): DriveCacheStats+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_cache_stats(&self) -> Result<DriveCacheStats, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveCacheStats`](#drivecachestats-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_cache_set`++`volume_cache_set`: the cache's size cap (at least 256 MiB).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_cache_set(self, capacity_bytes: int) -> DriveCacheStats+```++</Tab>+<Tab value="TypeScript">++```ts+volumeCacheSet(capacityBytes: bigint, asyncOpts_?: { signal: AbortSignal }): Promise<DriveCacheStats>+```++</Tab>+<Tab value="Swift">++```swift+func volumeCacheSet(capacityBytes: UInt64) async throws -> DriveCacheStats+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeCacheSet(capacityBytes: ULong): DriveCacheStats+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_cache_set(&self, capacity_bytes: u64) -> Result<DriveCacheStats, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `capacity_bytes` | `u64` | required |++**Returns** [`DriveCacheStats`](#drivecachestats-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Spaces.volume_cache_clear`++`volume_cache_clear`: drops every cached block.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def volume_cache_clear(self) -> DriveCacheStats+```++</Tab>+<Tab value="TypeScript">++```ts+volumeCacheClear(asyncOpts_?: { signal: AbortSignal }): Promise<DriveCacheStats>+```++</Tab>+<Tab value="Swift">++```swift+func volumeCacheClear() async throws -> DriveCacheStats+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun volumeCacheClear(): DriveCacheStats+```++</Tab>+<Tab value="Rust">++```rust+pub async fn volume_cache_clear(&self) -> Result<DriveCacheStats, CuaError>+```++</Tab>+</Tabs>++**Returns** [`DriveCacheStats`](#drivecachestats-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `DriveStorage` record++Where the drive keeps its bytes (Settings > Storage).++Returned by [`Spaces.volume_storage`](#spacesvolume_storage).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `backend` | `String` | | `fs` or `s3`. |+| `fs_path` / `fsPath` | `String` | | Where the `fs` backend keeps bytes. |+| `s3` | [`Option<DriveS3Settings>`](#drives3settings-record) | | |+| `has_keys` / `hasKeys` | `bool` | | S3 keys are saved (they are never returned). |+| `cloud_available` / `cloudAvailable` | `bool` | | Always false in this release: hide the Cua cloud option. |++## `DriveS3Settings` record++Where an S3-compatible bucket is (no keys).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `endpoint` | `Option<String>` | | `http://127.0.0.1:9000`, `https://<account>.r2.cloudflarestorage.com`; `None` for AWS. |+| `region` | `String` | | `us-east-1`; `auto` for R2. |+| `bucket` | `String` | | |+| `root` | `String` | | A key prefix inside the bucket (may be empty). |+| `path_style` / `pathStyle` | `bool` | | Path-style addressing (MinIO and most self-hosted stores). |++## `DriveStorageUpdate` record++A storage change, or with `dry_run` a connection test.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `backend` | `String` | | `fs` or `s3` (`cloud` is refused). |+| `s3` | [`Option<DriveS3Settings>`](#drives3settings-record) | | |+| `access_key_id` / `accessKeyId` | `Option<String>` | | With `secret_access_key` (both or neither); saved in the credential store. |+| `secret_access_key` / `secretAccessKey` | `Option<String>` | | |+| `dry_run` / `dryRun` | `bool` | | Only test; change nothing. |++## `DriveStorageCheck` record++What a storage test found.++Returned by [`Spaces.volume_storage_set`](#spacesvolume_storage_set).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `ok` | `bool` | | |+| `reachable` | `bool` | | |+| `authorized` | `bool` | | |+| `versioning` | `bool` | | Bucket versioning is on (required). |+| `detail` | `Option<String>` | | A sentence when not ok: what is wrong and how to fix it. |+| `problem` | `Option<String>` | | What is wrong, to key the UI on: `unreachable`, `bad_keys`, `forbidden`, `bucket_missing`, `versioning_off`, `path_style_needed`. |+| `applied` | `bool` | | Saved and switched live. |++## `DriveMountStatus` record++The drive as a volume.++Returned by [`Spaces.volume_mount`](#spacesvolume_mount), [`Spaces.volume_mount_status`](#spacesvolume_mount_status), [`Spaces.volume_unmount`](#spacesvolume_unmount).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `enabled` | `bool` | | The user's opt-in (off by default). |+| `state` | `String` | | `off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`. |+| `method` | `String` | | `nfs` (macOS), `fuse` (Linux), `fskit`, `none`. |+| `path` | `Option<String>` | | The mount point when mounted ("Show in Finder" opens it). |+| `volume_name` / `volumeName` | `String` | | |+| `detail` | `Option<String>` | | |+| `settings_url` / `settingsUrl` | `Option<String>` | | |++## `DriveSyncStatus` record++Sync across devices.++Returned by [`Spaces.volume_sync_status`](#spacesvolume_sync_status).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `device_id` / `deviceId` | `String` | | |+| `device_name` / `deviceName` | `String` | | |+| `feed` | `String` | | `live`, `off` (a store on this machine), `offline` (the bucket stopped answering; see `last_error`). |+| `poll_interval_ms` / `pollIntervalMs` | `u64` | | |+| `last_poll_ms` / `lastPollMs` | `u64` | | |+| `last_remote_change_ms` / `lastRemoteChangeMs` | `u64` | | |+| `pending_uploads` / `pendingUploads` | `u32` | | |+| `pending_bytes` / `pendingBytes` | `u64` | | |+| `conflicts` | [`Vec<DriveConflict>`](#driveconflict-record) | | |+| `devices` | [`Vec<DriveDevice>`](#drivedevice-record) | | |+| `last_error` / `lastError` | `Option<String>` | | |+| `pending` | [`Vec<DrivePendingUpload>`](#drivependingupload-record) | | The files still uploading, largest first (at most 100). |+| `backend` | `String` | | `fs` (This Mac) or `s3` (your bucket). |+| `mount` | `String` | | This machine's mount: `off`, `mounting`, `mounted`, `needs_approval`, `unsupported` or `error`. |+| `cache` | [`Option<DriveCacheStats>`](#drivecachestats-record) | | The block cache in front of a bucket. |+| `volumes` | [`Vec<DriveSpaceVolume>`](#drivespacevolume-record) | | The volume mounted in Spaces. |++## `DrivePendingUpload` record++A file waiting to upload.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `path` | `String` | | |+| `bytes` | `u64` | | |++## `DriveSpaceVolume` record++The volume mounted in a Space's guest.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `String` | | |+| `mount_path` / `mountPath` | `String` | | `/volume` (Linux) or `~/Cua Volume` (macOS), as the guest sees it. |+| `backend` | `String` | | `fs` (FUSE) or `nfs`. |+| `principal` | `String` | | Whose view it shows: `space:<folder>`, or `agent:<name>` while a persistent agent runs there. |++## `DriveConflict` record++A write that lost to a later one, kept in history and as a copy.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `path` | `String` | | |+| `conflict_path` / `conflictPath` | `String` | | |+| `winner_device` / `winnerDevice` | `String` | | |+| `loser_device` / `loserDevice` | `String` | | |+| `winner_version` / `winnerVersion` | `String` | | |+| `loser_version` / `loserVersion` | `String` | | |+| `ts_ms` / `tsMs` | `u64` | | |++## `DriveDevice` record++A device sharing the drive's bucket.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `String` | | |+| `name` | `String` | | |+| `this_device` / `thisDevice` | `bool` | | |+| `last_seen_ms` / `lastSeenMs` | `u64` | | |+| `last_change_ms` / `lastChangeMs` | `u64` | | |+| `changes` | `u64` | | |++## `DriveSyncEvents` record++Events after a sequence number, and the sequence to ask after next.++Returned by [`Spaces.volume_sync_events`](#spacesvolume_sync_events).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `events` | [`Vec<DriveSyncEvent>`](#drivesyncevent-record) | | |+| `next_seq` / `nextSeq` | `u64` | | |++## `DriveSyncEvent` record++One sync event.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `seq` | `u64` | | |+| `ts_ms` / `tsMs` | `u64` | | |+| `kind` | `String` | | `remote_change`, `remote_delete`, `upload_started`, `upload_done`, `upload_failed`, `conflict`, `error`. |+| `path` | `String` | | |+| `device` | `String` | | |+| `size` | `u64` | | |+| `version` | `String` | | |+| `detail` | `String` | | |++## `DriveCacheStats` record++The block cache in front of a remote store.++Returned by [`Spaces.volume_cache_clear`](#spacesvolume_cache_clear), [`Spaces.volume_cache_set`](#spacesvolume_cache_set), [`Spaces.volume_cache_stats`](#spacesvolume_cache_stats).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `dir` | `String` | | |+| `size_bytes` / `sizeBytes` | `u64` | | |+| `capacity_bytes` / `capacityBytes` | `u64` | | |+| `block_bytes` / `blockBytes` | `u64` | | |+| `blocks` | `u64` | | |+| `hits` | `u64` | | |+| `misses` | `u64` | | |+| `hit_rate` / `hitRate` | `f64` | | |+| `prefetched_bytes` / `prefetchedBytes` | `u64` | | |+| `evictions` | `u64` | | |diff --git a/docs/content/docs/cua-sdk/reference/spaces/windows.mdx b/docs/content/docs/cua-sdk/reference/spaces/windows.mdxdeleted file mode 100644index 47a316b764..0000000000--- a/docs/content/docs/cua-sdk/reference/spaces/windows.mdx+++ /dev/null@@ -1,399 +0,0 @@-----title: "Windows, icons and displays"-description: "A Space's app icons (batched, through the SDK's one icon cache), window previews, displays and memory and storage use."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--`app_icons` answers a whole window list in one call: cached icons come from memory or `$CUA_HOME/cache/icons`, and every miss costs one guest round trip. `thumbnail` is the Space's latest small preview from the cache every client on the machine shares (`$CUA_HOME/cache/thumbnails`, kept fresh by the daemon while someone asks). `window_thumbnail` previews one window, reused for a few seconds. `displays` lists the displays with their resolution and `usage` the memory and storage use.--## Windows, icons and displays--Methods of [`Space`](/cua-sdk/reference/spaces/space#space).--### `Space.app_icons`--Icons for many windows' apps at once, in request order (`None`: the-Space has no icon for that app; show none). Answered by the SDK's-one icon cache (memory, then `$CUA_HOME/cache/icons`, keyed by the-app and the Space's image, never the pid); every miss costs one-guest round trip for the whole batch. macOS renders the app bundle-of the pid; Linux reads the `.desktop` entry's `Icon=` from the icon-theme; Windows has none.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def app_icons(self, requests: List[SpaceAppIconRequest]) -> List[Optional[SpaceAppIcon]]-```--</Tab>-<Tab value="TypeScript">--```ts-appIcons(requests: Array<SpaceAppIconRequest>, asyncOpts_?: { signal: AbortSignal }): Promise<Array<SpaceAppIcon | undefined>>-```--</Tab>-<Tab value="Swift">--```swift-func appIcons(requests: [SpaceAppIconRequest]) async throws -> [SpaceAppIcon?]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun appIcons(requests: List<SpaceAppIconRequest>): List<SpaceAppIcon?>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn app_icons(&self, requests: Vec<SpaceAppIconRequest>) -> Result<Vec<Option<SpaceAppIcon>>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `requests` | [`Vec<SpaceAppIconRequest>`](#spaceappiconrequest-record) | required |--**Returns** [`Vec<Option<SpaceAppIcon>>`](#spaceappicon-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.app_icon`--The icon the guest desktop shows for a window's app (pass the-window's `app_name`, `app_id` and `pid`), or `None` when the Space-has none: show no icon then, not a placeholder. A window list should-ask `Space.app_icons` once for all its windows instead.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def app_icon(self, app_name: str, app_id: str, pid: int) -> Optional[SpaceAppIcon]-```--</Tab>-<Tab value="TypeScript">--```ts-appIcon(appName: string, appId: string, pid: number, asyncOpts_?: { signal: AbortSignal }): Promise<SpaceAppIcon | undefined>-```--</Tab>-<Tab value="Swift">--```swift-func appIcon(appName: String, appId: String, pid: UInt32) async throws -> SpaceAppIcon?-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun appIcon(appName: String, appId: String, pid: UInt): SpaceAppIcon?-```--</Tab>-<Tab value="Rust">--```rust-pub async fn app_icon(&self, app_name: String, app_id: String, pid: u32) -> Result<Option<SpaceAppIcon>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `app_name` | `String` | required |-| `app_id` | `String` | required |-| `pid` | `u32` | required |--**Returns** [`Option<SpaceAppIcon>`](#spaceappicon-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.thumbnail`--The Space's latest thumbnail (a small JPEG of its primary display)-from the cache every client on this machine shares: returned at-once when it is younger than `max_age_ms` (unset: any age), else-captured fresh through cua-spacesd and kept for the next caller.-When that capture fails, the older one comes back (`captured_at_ms`-says how old). Asking keeps the daemon refreshing running Spaces'-thumbnails in the background for a while (about every 90 s).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def thumbnail(self, max_age_ms: Optional[int]) -> SpaceThumbnail-```--</Tab>-<Tab value="TypeScript">--```ts-thumbnail(maxAgeMs: bigint | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<SpaceThumbnail>-```--</Tab>-<Tab value="Swift">--```swift-func thumbnail(maxAgeMs: UInt64?) async throws -> SpaceThumbnail-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun thumbnail(maxAgeMs: ULong?): SpaceThumbnail-```--</Tab>-<Tab value="Rust">--```rust-pub async fn thumbnail(&self, max_age_ms: Option<u64>) -> Result<SpaceThumbnail, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `max_age_ms` | `Option<u64>` | required |--**Returns** [`SpaceThumbnail`](#spacethumbnail-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.window_thumbnail`--A small JPEG preview of one of the Space's windows (`window_id` and-`epoch` from `windows`), at most `max_dimension` px, reused for a-few seconds (the SDK's preview cache); `None` when the guest-captured nothing.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def window_thumbnail(self, window_id: str, epoch: int, max_dimension: int) -> Optional[bytes]-```--</Tab>-<Tab value="TypeScript">--```ts-windowThumbnail(windowId: string, epoch: bigint, maxDimension: number, asyncOpts_?: { signal: AbortSignal }): Promise<ArrayBuffer | undefined>-```--</Tab>-<Tab value="Swift">--```swift-func windowThumbnail(windowId: String, epoch: UInt64, maxDimension: UInt32) async throws -> Data?-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun windowThumbnail(windowId: String, epoch: ULong, maxDimension: UInt): ByteArray?-```--</Tab>-<Tab value="Rust">--```rust-pub async fn window_thumbnail(&self, window_id: String, epoch: u64, max_dimension: u32) -> Result<Option<Vec<u8>>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `window_id` | `String` | required |-| `epoch` | `u64` | required |-| `max_dimension` | `u32` | required |--**Returns** `Option<Vec<u8>>` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.displays`--The Space's displays, primary first, with their resolution in-physical pixels.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def displays(self) -> List[SpaceDisplay]-```--</Tab>-<Tab value="TypeScript">--```ts-displays(asyncOpts_?: { signal: AbortSignal }): Promise<Array<SpaceDisplay>>-```--</Tab>-<Tab value="Swift">--```swift-func displays() async throws -> [SpaceDisplay]-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun displays(): List<SpaceDisplay>-```--</Tab>-<Tab value="Rust">--```rust-pub async fn displays(&self) -> Result<Vec<SpaceDisplay>, CuaError>-```--</Tab>-</Tabs>--**Returns** [`Vec<SpaceDisplay>`](#spacedisplay-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `Space.usage`--Memory and storage use now (cheap: poll it at a low rate while a-detail is visible).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def usage(self) -> SpaceUsage-```--</Tab>-<Tab value="TypeScript">--```ts-usage(asyncOpts_?: { signal: AbortSignal }): Promise<SpaceUsage>-```--</Tab>-<Tab value="Swift">--```swift-func usage() async throws -> SpaceUsage-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun usage(): SpaceUsage-```--</Tab>-<Tab value="Rust">--```rust-pub async fn usage(&self) -> Result<SpaceUsage, CuaError>-```--</Tab>-</Tabs>--**Returns** [`SpaceUsage`](#spaceusage-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `SpaceAppIcon` record--An app icon from `Space.app_icons`: the icon the guest desktop uses,-normalized by the SDK's icon cache.--Returned by [`Space.app_icon`](#spaceapp_icon), [`Space.app_icons`](#spaceapp_icons).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `bytes` | `Vec<u8>` | | The 64 px PNG (2x), or an SVG the guest could not rasterize. |-| `content_type` / `contentType` | `String` | | `image/png` or `image/svg+xml`. |-| `bytes_1x` / `bytes1x` | `Vec<u8>` | | The 32 px PNG (1x); empty for an SVG. |--## `SpaceAppIconRequest` record--One window's app, for `Space.app_icons`.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `app_name` / `appName` | `String` | | App name, as the window list reports it. |-| `app_id` / `appId` | `String` | `""` | App id (bundle id, `.desktop` id). |-| `pid` | `u32` | `0` | A process of the app (0 when unknown). |--## `SpaceDisplay` record--One of a Space's displays (`Space.displays`).--Returned by [`Space.displays`](#spacedisplays).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `String` | | Display id. |-| `name` | `String` | | Name ("XVFB-0", "Built-in Retina Display"). |-| `primary` | `bool` | | The primary display. |-| `width_px` / `widthPx` | `u32` | | Framebuffer width in physical pixels. |-| `height_px` / `heightPx` | `u32` | | Framebuffer height in physical pixels. |-| `scale_factor` / `scaleFactor` | `f64` | | Physical pixels per logical point. |--## `SpaceThumbnail` record--A Space's latest thumbnail, from the cache every client on this machine-shares (`crate.native.spaces.Space.thumbnail`).--Returned by [`Space.thumbnail`](#spacethumbnail).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `image` | `Vec<u8>` | | Encoded image (a small JPEG of the primary display). |-| `format` | [`ImageFormat`](/cua-sdk/reference/spacesd/computer#imageformat-enum) | | Encoding. |-| `width` | `u32` | | Pixel width. |-| `height` | `u32` | | Pixel height. |-| `captured_at_ms` / `capturedAtMs` | `u64` | | When it was captured, Unix milliseconds. |--## `SpaceUsage` record--Memory and storage use (`Space.usage`). A size is the guest's own-limit only when its `*_limited` flag says so (a VM's memory or disk, a-container's cgroup memory limit).--Returned by [`Space.usage`](#spaceusage).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `memory_used` / `memoryUsed` | `u64` | | Memory in use, bytes. |-| `memory_total` / `memoryTotal` | `u64` | | Memory size, bytes. |-| `memory_limited` / `memoryLimited` | `bool` | | `memory_total` is the guest's limit. |-| `disk_used` / `diskUsed` | `u64` | | Home filesystem bytes in use. |-| `disk_total` / `diskTotal` | `u64` | | Home filesystem size, bytes. |-| `disk_limited` / `diskLimited` | `bool` | | `disk_total` is the guest's own disk. |diff --git a/docs/content/docs/cua-sdk/reference/spacesd/computer.mdx b/docs/content/docs/cua-sdk/reference/spacesd/computer.mdxindex 51f92a0bf9..87e8737743 100644--- a/docs/content/docs/cua-sdk/reference/spacesd/computer.mdx+++ b/docs/content/docs/cua-sdk/reference/spacesd/computer.mdx@@ -1,6 +1,6 @@----title: "Computer"-description: "Screenshots, pointer, keyboard, clipboard and displays of a sandbox desktop through cua-spacesd."+title: "Computer and media"+description: "Screenshots, pointer, keyboard, clipboard and displays of a sandbox desktop, and its video and audio streams."---{/*@@ -10,6 +10,7 @@ description: "Screenshots, pointer, keyboard, clipboard and displays of a sandboVersion: 0.5.0*/}+import { Callout } from 'fumadocs-ui/components/callout';import { Tab, Tabs } from 'fumadocs-ui/components/tabs';Coordinates are screen pixels. cua-spacesd delegates input to Cua Driver in the guest; these calls need an image with a desktop.@@ -854,7 +855,7 @@ pub async fn displays(&self) -> Result<String, CuaError>A captured screenshot.-Returned by [`Sandbox.guest_screenshot`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_screenshot), [`Space.screenshot`](/cua-sdk/reference/spaces/space#spacescreenshot), [`SpacesdClient.screenshot`](#spacesdclientscreenshot).+Returned by [`Sandbox.guest_screenshot`](/cua-sdk/reference/spacesd#sandboxguest_screenshot), [`Space.screenshot`](/cua-sdk/reference/spaces/space#spacescreenshot), [`SpacesdClient.screenshot`](#spacesdclientscreenshot).| Field | Type | Default | Description || --- | --- | --- | --- |@@ -945,3 +946,630 @@ Returned by [`SpacesdClient.cursor_position`](#spacesdclientcursor_position).| --- | --- | --- | --- || `x` | `f64` | | X. || `y` | `f64` | | Y. |++## Media++Media sessions deliver encoded frames and audio packets (`FrameSink`, `AudioSink`) to callbacks you implement.++## Open a session++Methods of [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient).++### `SpacesdClient.open_media`++Opens a media session and starts delivering encoded video frames and+control events to `frames`. Decoding stays in the host language.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def open_media(self, options: MediaOpenOptions, frames: FrameSink) -> MediaSession+```++</Tab>+<Tab value="TypeScript">++```ts+openMedia(options: MediaOpenOptions, frames: FrameSink, asyncOpts_?: { signal: AbortSignal }): Promise<MediaSessionLike>+```++</Tab>+<Tab value="Swift">++```swift+func openMedia(options: MediaOpenOptions, frames: FrameSink) async throws -> MediaSession+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun openMedia(options: MediaOpenOptions, frames: FrameSink): MediaSession+```++</Tab>+<Tab value="Rust">++```rust+pub async fn open_media(&self, options: MediaOpenOptions, frames: Arc<dyn FrameSink>) -> Result<Arc<MediaSession>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `options` | [`MediaOpenOptions`](#mediaopenoptions-record) | required |+| `frames` | [`FrameSink`](#framesink) | required |++**Returns** [`MediaSession`](#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdClient.open_media_with_audio`++`SpacesdClient.open_media` that also delivers audio packets to+`audio` (set `options.audio` to negotiate audio tracks).++Two methods instead of an optional sink: optional callback objects+do not lower in every binding generator.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def open_media_with_audio(self, options: MediaOpenOptions, frames: FrameSink, audio: AudioSink) -> MediaSession+```++</Tab>+<Tab value="TypeScript">++```ts+openMediaWithAudio(options: MediaOpenOptions, frames: FrameSink, audio: AudioSink, asyncOpts_?: { signal: AbortSignal }): Promise<MediaSessionLike>+```++</Tab>+<Tab value="Swift">++```swift+func openMediaWithAudio(options: MediaOpenOptions, frames: FrameSink, audio: AudioSink) async throws -> MediaSession+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun openMediaWithAudio(options: MediaOpenOptions, frames: FrameSink, audio: AudioSink): MediaSession+```++</Tab>+<Tab value="Rust">++```rust+pub async fn open_media_with_audio(&self, options: MediaOpenOptions, frames: Arc<dyn FrameSink>, audio: Arc<dyn AudioSink>) -> Result<Arc<MediaSession>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `options` | [`MediaOpenOptions`](#mediaopenoptions-record) | required |+| `frames` | [`FrameSink`](#framesink) | required |+| `audio` | [`AudioSink`](#audiosink) | required |++**Returns** [`MediaSession`](#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## Media bridge++Methods of [`Sandbox`](/cua-sdk/reference/sandbox#sandbox).++### `Sandbox.open_media_bridge`++Opens a media session and returns a loopback WebSocket bridge for a+webview (daemon mode). `open_media_json` is a+`cua.env.v1.OpenMediaRequest` in proto3 JSON (`None`: primary display).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def open_media_bridge(self, open_media_json: Optional[str]) -> MediaBridge+```++</Tab>+<Tab value="TypeScript">++```ts+openMediaBridge(openMediaJson: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<MediaBridge>+```++</Tab>+<Tab value="Swift">++```swift+func openMediaBridge(openMediaJson: String?) async throws -> MediaBridge+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun openMediaBridge(openMediaJson: String?): MediaBridge+```++</Tab>+<Tab value="Rust">++```rust+pub async fn open_media_bridge(&self, open_media_json: Option<String>) -> Result<MediaBridge, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `open_media_json` | `Option<String>` | required |++**Returns** [`MediaBridge`](#mediabridge-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `MediaSession`++A live media session.++Returned by [`Space.attach_stream`](/cua-sdk/reference/spaces/streams#spaceattach_stream), [`SpacesdClient.open_media`](#spacesdclientopen_media), [`SpacesdClient.open_media_with_audio`](#spacesdclientopen_media_with_audio).++| Method | Description |+| --- | --- |+| [`close`](#mediasessionclose) | Closes the socket and the session. |+| [`request_keyframe`](#mediasessionrequest_keyframe) | `StreamService.RequestKeyframe`. |+| [`send_control`](#mediasessionsend_control) | Sends a JSON control message on the media socket (for example `{"type":"request_keyframe","payload":{}}` or interactive input). |+| [`set_preferences_json`](#mediasessionset_preferences_json) | `StreamService.SetPreferences` from proto3 JSON (the session id is filled in). |++| Accessor | Returns | Description |+| --- | --- | --- |+| `codec()` | `String` | Negotiated video codec (`h264`, `bgra`, `png`). |+| `is_closed()` | `bool` | Whether the socket has closed. |+| `open_response_json()` | `String` | `OpenMediaResponse` as proto3 JSON (ticket removed). |+| `session_id()` | `String` | `OpenMediaResponse.media_session_id`. |+| `stats()` | [`MediaStats`](#mediastats-record) | Delivery counters. |++### `MediaSession.close`++Closes the socket and the session.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def close(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+close(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func close() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun closeSession()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn close(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `MediaSession.request_keyframe`++`StreamService.RequestKeyframe`.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def request_keyframe(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+requestKeyframe(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func requestKeyframe() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun requestKeyframe()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn request_keyframe(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `MediaSession.send_control`++Sends a JSON control message on the media socket (for example+`{"type":"request_keyframe","payload":{}}` or interactive input).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def send_control(self, json: str) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+sendControl(json: string): void+```++</Tab>+<Tab value="Swift">++```swift+func sendControl(json: String) throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+fun sendControl(json: String)+```++</Tab>+<Tab value="Rust">++```rust+pub fn send_control(&self, json: String) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `json` | `String` | required |++**Raises** [`CuaError`](/cua-sdk/reference/errors)++### `MediaSession.set_preferences_json`++`StreamService.SetPreferences` from proto3 JSON (the session id is+filled in).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def set_preferences_json(self, json: str) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+setPreferencesJson(json: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func setPreferencesJson(json: String) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun setPreferencesJson(json: String)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn set_preferences_json(&self, json: String) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `json` | `String` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `MediaOpenOptions` record++Media session options.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `display` | `Option<String>` | `None` | Display id (primary when unset). Ignored when `window_handle` is set. |+| `window_handle` / `windowHandle` | `Option<String>` | `None` | Window handle (from `ListTargets` / `ListWindows`). |+| `max_fps` / `maxFps` | `u32` | `0` | FPS cap (0 = driver default). |+| `max_dimension` / `maxDimension` | `u32` | `0` | Long-edge cap (0 = native). |+| `audio` | `bool` | `false` | Also negotiate desktop/app audio (Opus). |+| `disable_video` / `disableVideo` | `bool` | `false` | Audio only. |+| `request_json` / `requestJson` | `Option<String>` | `None` | Extra `OpenMediaRequest` fields as proto3 JSON, merged over the above (escape hatch). |++## `MediaBridge` record++A media bridge for webviews (daemon mode).++Returned by [`Sandbox.open_media_bridge`](#sandboxopen_media_bridge).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `ws_url` / `wsUrl` | `String` | | Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks rcdp wire v2 unchanged; no env token is exposed. |+| `ticket` | `String` | | The bridge ticket (also accepted as subprotocol `cua.ticket.<ticket>`). |+| `open_media_response_json` / `openMediaResponseJson` | `String` | | `cua.env.v1.OpenMediaResponse` as proto3 JSON (upstream ticket removed). |++## `AudioSink`++Receives audio packets. Must return quickly.++<Callout>+You implement `AudioSink` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `AudioSink` protocol in Swift, the interface in Kotlin and the trait in Rust.+</Callout>++| Method | Description |+| --- | --- |+| [`on_audio`](#audiosinkon_audio) | An audio packet. |++### `AudioSink.on_audio`++An audio packet.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def on_audio(self, packet: AudioPacket) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+onAudio(packet: AudioPacket): void+```++</Tab>+<Tab value="Swift">++```swift+func onAudio(packet: AudioPacket)+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun onAudio(packet: AudioPacket)+```++</Tab>+<Tab value="Rust">++```rust+pub fn on_audio(&self, packet: AudioPacket)+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `packet` | [`AudioPacket`](#audiopacket-record) | required |++## `FrameSink`++Receives video frames and control events. Implementations must return+quickly and hand off decoding.++<Callout>+You implement `FrameSink` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `FrameSink` protocol in Swift, the interface in Kotlin and the trait in Rust.+</Callout>++| Method | Description |+| --- | --- |+| [`on_event`](#framesinkon_event) | A control message or the socket close. |+| [`on_frame`](#framesinkon_frame) | A video access unit. |++### `FrameSink.on_event`++A control message or the socket close.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def on_event(self, event: MediaEvent) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+onEvent(event: MediaEvent): void+```++</Tab>+<Tab value="Swift">++```swift+func onEvent(event: MediaEvent)+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun onEvent(event: MediaEvent)+```++</Tab>+<Tab value="Rust">++```rust+pub fn on_event(&self, event: MediaEvent)+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `event` | [`MediaEvent`](#mediaevent-record) | required |++### `FrameSink.on_frame`++A video access unit.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def on_frame(self, frame: VideoFrame) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+onFrame(frame: VideoFrame): void+```++</Tab>+<Tab value="Swift">++```swift+func onFrame(frame: VideoFrame)+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun onFrame(frame: VideoFrame)+```++</Tab>+<Tab value="Rust">++```rust+pub fn on_frame(&self, frame: VideoFrame)+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `frame` | [`VideoFrame`](#videoframe-record) | required |++## `AudioPacket` record++One audio packet (MEDIA.md §12.2).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `track_id` / `trackId` | `u16` | | Track id from `NegotiatedAudio`. |+| `sequence` | `u32` | | Per-track sequence (wraps mod 2³²). |+| `pts_us` / `ptsUs` | `u64` | | Media-clock time of the first sample (µs). |+| `frame_samples` / `frameSamples` | `u16` | | Samples per channel. |+| `config_epoch` / `configEpoch` | `u8` | | Must match the latest `audio_config` of the track. |+| `discontinuity` | `bool` | | The previous packet was dropped or the track restarted. |+| `dtx` | `bool` | | DTX / comfort-noise frame. |+| `data` | `Vec<u8>` | | One Opus packet or interleaved s16le PCM. |++## `MediaEvent` record++A control message (`hello`, `session_opened`, `lifecycle`,+`audio_config`, `stats`, `error`, ...) or the close of the socket+(`kind = "closed"`, `json = {"code":…, "reason":…}`).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `kind` | `String` | | The message `type`. |+| `json` | `String` | | The whole message as JSON. |++## `MediaStats` record++Delivery counters.++Returned by [`MediaSession.stats`](#mediasession).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `frames` | `u64` | | Video frames delivered. |+| `frames_dropped` / `framesDropped` | `u64` | | Video frames dropped because the sink fell behind. |+| `audio_packets` / `audioPackets` | `u64` | | Audio packets delivered. |+| `malformed` | `u64` | | Malformed binary messages ignored. |+| `events` | `u64` | | Control events delivered. |++## `VideoFrame` record++One encoded video access unit.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `sequence` | `u64` | | Per-target frame sequence (may start anywhere; gaps mean replaced frames). |+| `codec` | `String` | | `h264`, `bgra` or `png`. |+| `keyframe` | `bool` | | Random-access point (IDR with SPS/PPS for H.264). |+| `width` | `u32` | | Payload width in pixels. |+| `height` | `u32` | | Payload height in pixels. |+| `capture_timestamp_us` / `captureTimestampUs` | `u64` | | Media-clock capture time (µs). |+| `codec_epoch` / `codecEpoch` | `u64` | | Decoder configuration generation; reset the decoder when it changes. |+| `geometry_epoch` / `geometryEpoch` | `u64` | | Coordinate generation. |+| `data` | `Vec<u8>` | | Encoded payload. |+| `header_json` / `headerJson` | `String` | | The packet's JSON header, verbatim. |diff --git a/docs/content/docs/cua-sdk/reference/spacesd/index.mdx b/docs/content/docs/cua-sdk/reference/spacesd/index.mdxindex 2d9cfdb0ff..ebde27e7cb 100644--- a/docs/content/docs/cua-sdk/reference/spacesd/index.mdx+++ b/docs/content/docs/cua-sdk/reference/spacesd/index.mdx@@ -1,6 +1,6 @@----title: "Spacesd client"-description: "SpacesdClient: the cua-spacesd client for processes, files, the desktop and media in a sandbox."+title: "Spacesd client and processes"+description: "SpacesdClient: the cua-spacesd client, running processes in a sandbox, and sandboxes without cua-spacesd."---{/*@@ -12,7 +12,7 @@ description: "SpacesdClient: the cua-spacesd client for processes, files, the deimport { Tab, Tabs } from 'fumadocs-ui/components/tabs';-`sandbox.spacesd()`, `space.spacesd()` (or `cua.spacesd(url, token)` for any spacesd) returns a `SpacesdClient`. It picks native gRPC or gRPC-Web, sends the token and chunks transfers. Methods by task: [processes](/cua-sdk/reference/spacesd/shell), [files](/cua-sdk/reference/spacesd/files), [computer](/cua-sdk/reference/spacesd/computer) and [media](/cua-sdk/reference/spacesd/media).+`sandbox.spacesd()`, `space.spacesd()` (or `cua.spacesd(url, token)` for any spacesd) returns a `SpacesdClient`. It picks native gRPC or gRPC-Web, sends the token and chunks transfers. Processes are below; [files](/cua-sdk/reference/spacesd/files) and the [computer and media](/cua-sdk/reference/spacesd/computer) have their own pages.Python programs usually use the high-level API instead: [`cua_sandbox` interfaces](/cua-sdk/reference/python/interfaces).@@ -83,7 +83,7 @@ Returned by [`Cua.spacesd`](/cua-sdk/reference/cua#cuaspacesd), [`Relay.connect`| [`health`](#spacesdclienthealth) | `Health` as proto3 JSON. || [`http`](#spacesdclienthttp) | Sends one plain-HTTP request to the spacesd port with this client's endpoint and credentials (through the Fleet gateway when the endpoint is a Fleet service). || [`agents`](/cua-sdk/reference/agents#spacesdclientagents) | Coding agents in this guest. |-| [`attach`](/cua-sdk/reference/spacesd/shell#spacesdclientattach) | Attaches to a running process by pid or tag. |+| [`attach`](/cua-sdk/reference/spacesd#spacesdclientattach) | Attaches to a running process by pid or tag. || [`click`](/cua-sdk/reference/spacesd/computer#spacesdclientclick) | Left click. || [`cursor_position`](/cua-sdk/reference/spacesd/computer#spacesdclientcursor_position) | Pointer position. || [`displays`](/cua-sdk/reference/spacesd/computer#spacesdclientdisplays) | Displays as proto3 JSON (`[Display]`). |@@ -95,21 +95,21 @@ Returned by [`Cua.spacesd`](/cua-sdk/reference/cua#cuaspacesd), [`Relay.connect`| [`hotkey`](/cua-sdk/reference/spacesd/computer#spacesdclienthotkey) | Presses a chord (`["ctrl", "c"]`). || [`keyboard_json`](/cua-sdk/reference/spacesd/computer#spacesdclientkeyboard_json) | Full `ComputerService.Keyboard` from proto3 JSON. || [`list_dir`](/cua-sdk/reference/spacesd/files#spacesdclientlist_dir) | `ListDir` (depth 1 = direct children). |-| [`list_processes`](/cua-sdk/reference/spacesd/shell#spacesdclientlist_processes) | Guest processes as proto3 JSON (`[ProcessInfo]`). |+| [`list_processes`](/cua-sdk/reference/spacesd#spacesdclientlist_processes) | Guest processes as proto3 JSON (`[ProcessInfo]`). || [`make_dir`](/cua-sdk/reference/spacesd/files#spacesdclientmake_dir) | `MakeDir` (with parents). || [`move_to`](/cua-sdk/reference/spacesd/computer#spacesdclientmove_to) | Moves the pointer. |-| [`open_media`](/cua-sdk/reference/spacesd/media#spacesdclientopen_media) | Opens a media session and starts delivering encoded video frames and control events to `frames`. |-| [`open_media_with_audio`](/cua-sdk/reference/spacesd/media#spacesdclientopen_media_with_audio) | `SpacesdClient.open_media` that also delivers audio packets to `audio` (set `options.audio` to negotiate audio tracks). |+| [`open_media`](/cua-sdk/reference/spacesd/computer#spacesdclientopen_media) | Opens a media session and starts delivering encoded video frames and control events to `frames`. |+| [`open_media_with_audio`](/cua-sdk/reference/spacesd/computer#spacesdclientopen_media_with_audio) | `SpacesdClient.open_media` that also delivers audio packets to `audio` (set `options.audio` to negotiate audio tracks). || [`pointer_json`](/cua-sdk/reference/spacesd/computer#spacesdclientpointer_json) | Full `ComputerService.Pointer` from proto3 JSON. || [`press`](/cua-sdk/reference/spacesd/computer#spacesdclientpress) | Presses one key (`enter`, `KEY_ESCAPE`, `a`, ...). || [`remove`](/cua-sdk/reference/spacesd/files#spacesdclientremove) | `Remove`. || [`right_click`](/cua-sdk/reference/spacesd/computer#spacesdclientright_click) | Right click. |-| [`run`](/cua-sdk/reference/spacesd/shell#spacesdclientrun) | Runs a command to completion. |+| [`run`](/cua-sdk/reference/spacesd#spacesdclientrun) | Runs a command to completion. || [`screenshot`](/cua-sdk/reference/spacesd/computer#spacesdclientscreenshot) | Captures a display. || [`scroll`](/cua-sdk/reference/spacesd/computer#spacesdclientscroll) | Scrolls by line deltas. || [`set_clipboard`](/cua-sdk/reference/spacesd/computer#spacesdclientset_clipboard) | Sets clipboard text; returns the clipboard generation. |-| [`sh`](/cua-sdk/reference/spacesd/shell#spacesdclientsh) | Runs `line` with `/bin/sh -c` to completion. |-| [`spawn`](/cua-sdk/reference/spacesd/shell#spacesdclientspawn) | Starts a command and returns its handle. |+| [`sh`](/cua-sdk/reference/spacesd#spacesdclientsh) | Runs `line` with `/bin/sh -c` to completion. |+| [`spawn`](/cua-sdk/reference/spacesd#spacesdclientspawn) | Starts a command and returns its handle. || [`stat`](/cua-sdk/reference/spacesd/files#spacesdclientstat) | `Stat`. || [`type_text`](/cua-sdk/reference/spacesd/computer#spacesdclienttype_text) | Types text. || [`upload`](/cua-sdk/reference/spacesd/files#spacesdclientupload) | Uploads bytes to `path` (chunked, resumable, SHA-256 verified). |@@ -537,3 +537,1232 @@ One HTTP header (duplicates are kept in order).| --- | --- | --- | --- || `name` | `String` | | Header name. || `value` | `String` | | Header value. |++## Without cua-spacesd++The macOS 15 image ships no cua-spacesd, so `sandbox.spacesd()` fails for it (macOS 26 runs cua-spacesd). A local Lume sandbox is still reachable: commands over `lume ssh`, screenshots and the display over the VM's VNC endpoint. `cua sb exec`, `cua sb screenshot` and `cua sb view` use the same calls. Other sandboxes fail with `Unsupported`.++Python programs usually use the high-level API instead: [`cua_sandbox` shell and screen](/cua-sdk/reference/python/interfaces).++## Agentless methods++Methods of [`Sandbox`](/cua-sdk/reference/sandbox#sandbox).++### `Sandbox.lacks_spacesd`++Whether this sandbox has no cua-spacesd: it declares no `env`+service, or its image says it does not carry one. `spacesd()` fails+for these; `guest_sh`, `guest_screenshot` and `guest_display` reach a+local Lume sandbox without it.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+def lacks_spacesd(self) -> bool+```++</Tab>+<Tab value="TypeScript">++```ts+lacksSpacesd(): boolean+```++</Tab>+<Tab value="Swift">++```swift+func lacksSpacesd() -> Bool+```++</Tab>+<Tab value="Kotlin">++```kotlin+fun lacksSpacesd(): Boolean+```++</Tab>+<Tab value="Rust">++```rust+pub fn lacks_spacesd(&self) -> bool+```++</Tab>+</Tabs>++**Returns** `bool`++### `Sandbox.guest_sh`++Runs `line` with `/bin/sh -c` in the guest without cua-spacesd, to+completion (default timeout 120 s). Local macOS Lume sandboxes only:+over `lume ssh`, stdout and stderr kept apart, no stdin. Others fail+with `Unsupported`.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def guest_sh(self, line: str, timeout_ms: Optional[int] = None) -> ProcessOutput+```++</Tab>+<Tab value="TypeScript">++```ts+guestSh(line: string, timeoutMs: number | undefined = undefined, asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>+```++</Tab>+<Tab value="Swift">++```swift+func guestSh(line: String, timeoutMs: UInt32? = nil) async throws -> ProcessOutput+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun guestSh(line: String, timeoutMs: UInt? = null): ProcessOutput+```++</Tab>+<Tab value="Rust">++```rust+pub async fn guest_sh(&self, line: String, timeout_ms: Option<u32>) -> Result<ProcessOutput, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `line` | `String` | required |+| `timeout_ms` | `Option<u32>` | `None` |++**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors) ([`Unsupported`](/cua-sdk/reference/errors#unsupported))++### `Sandbox.guest_screenshot`++Captures the guest framebuffer as PNG without cua-spacesd. Local+Lume sandboxes only: over the VM's VNC endpoint.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def guest_screenshot(self) -> Screenshot+```++</Tab>+<Tab value="TypeScript">++```ts+guestScreenshot(asyncOpts_?: { signal: AbortSignal }): Promise<Screenshot>+```++</Tab>+<Tab value="Swift">++```swift+func guestScreenshot() async throws -> Screenshot+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun guestScreenshot(): Screenshot+```++</Tab>+<Tab value="Rust">++```rust+pub async fn guest_screenshot(&self) -> Result<Screenshot, CuaError>+```++</Tab>+</Tabs>++**Returns** [`Screenshot`](/cua-sdk/reference/spacesd/computer#screenshot-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `Sandbox.guest_display`++The guest display without cua-spacesd: the VM's VNC endpoint and a+host command that opens it (`lume attach`). Local Lume sandboxes+only.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def guest_display(self) -> GuestDisplay+```++</Tab>+<Tab value="TypeScript">++```ts+guestDisplay(asyncOpts_?: { signal: AbortSignal }): Promise<GuestDisplayLike>+```++</Tab>+<Tab value="Swift">++```swift+func guestDisplay() async throws -> GuestDisplay+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun guestDisplay(): GuestDisplay+```++</Tab>+<Tab value="Rust">++```rust+pub async fn guest_display(&self) -> Result<Arc<GuestDisplay>, CuaError>+```++</Tab>+</Tabs>++**Returns** [`GuestDisplay`](#guestdisplay) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `GuestDisplay`++The guest display of a sandbox without cua-spacesd+(`Sandbox.guest_display`). An object, not a record, so no binding's+default string form (repr, str, description, toString, Debug) can show+the VNC password: `url()` is masked, and only the explicit+`url_with_password()` returns it.++Returned by [`Sandbox.guest_display`](#sandboxguest_display).++| Accessor | Returns | Description |+| --- | --- | --- |+| `open_command()` | `Vec<String>` | A host command that opens a viewer on it (`lume attach <vm>`); empty when there is none. It handles the password itself. |+| `url()` | `String` | The display URL (`vnc://HOST:PORT`) with any password masked as `****`. Safe to print and log. |+| `url_with_password()` | `String` | SENSITIVE: the display URL with the VNC password (`vnc://:PASSWORD@HOST:PORT`), for handing to a VNC client. Never print or log it. |+| `via()` | `String` | How the display is reached (`vnc`). |++## Processes++Run a command to completion with `run` or `sh`, or `spawn` a `SpacesdProcess` to stream its output and write its input.++Python programs usually use the high-level API instead: [`sb.shell`, `sb.terminal`](/cua-sdk/reference/python/interfaces#shell).++## Run processes++Methods of [`SpacesdClient`](#spacesdclient).++### `SpacesdClient.run`++Runs a command to completion.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def run(self, command: SpacesdCommand) -> ProcessOutput+```++</Tab>+<Tab value="TypeScript">++```ts+run(command: SpacesdCommand, asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>+```++</Tab>+<Tab value="Swift">++```swift+func run(command: SpacesdCommand) async throws -> ProcessOutput+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun run(command: SpacesdCommand): ProcessOutput+```++</Tab>+<Tab value="Rust">++```rust+pub async fn run(&self, command: SpacesdCommand) -> Result<ProcessOutput, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `command` | [`SpacesdCommand`](#spacesdcommand-record) | required |++**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++**Example**++{/* Examples: scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.py, scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.ts, scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.swift, scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.kt */}++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin']} groupId="sdk-lang" persist>+<Tab value="Python">++```python test="docs" id="spacesd-client-run-py" session="spacesd-client-run-py" prelude="spacesd,spacesd-vars"+import asyncio++import cua++async def main():+ guest = await cua.embedded().spacesd(URL, TOKEN) # or: await sandbox.spacesd(None)+ out = await guest.run(cua.SpacesdCommand(program="echo", args=["hello"]))+ print([out.exit.success, out.stdout])+ # [True, b'hello\n']++asyncio.run(main())+```++</Tab>+<Tab value="TypeScript">++```ts test="docs" id="spacesd-client-run-ts" prelude="spacesd,spacesd-vars"+import { SpacesdCommand, embedded } from '@trycua/cua';++const guest = await embedded().spacesd(URL, TOKEN); // or: await sandbox.spacesd(undefined)+const out = await guest.run(SpacesdCommand.create({ program: 'echo', args: ['hello'] }));+console.log(out.exit.success, new TextDecoder().decode(out.stdout));+```++</Tab>+<Tab value="Swift">++```swift test="swift" id="spacesd-client-run-swift"+import Cua++let guest = try await Cua.embedded().spacesd(url: "http://10.0.0.5:3211", token: "TOKEN") // or: try await sandbox.spacesd(probeTimeoutMs: nil)+let out = try await guest.run(command: SpacesdCommand("echo", ["hello"]))+print(out.exit.success, String(decoding: out.stdout, as: UTF8.self))+```++</Tab>+<Tab value="Kotlin">++```kotlin test="kotlin" id="spacesd-client-run-kt"+import ai.cua.sdk.Cua+import ai.cua.sdk.CuaConfig+import ai.cua.sdk.SpacesdCommand++val guest = Cua.embedded(CuaConfig()).spacesd("http://10.0.0.5:3211", "TOKEN") // or: sandbox.spacesd(null)+val out = guest.run(SpacesdCommand(program = "echo", args = listOf("hello")))+println("${out.exit.success} ${out.stdout.decodeToString()}")+```++</Tab>+</Tabs>++### `SpacesdClient.sh`++Runs `line` with `/bin/sh -c` to completion.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def sh(self, line: str, timeout_ms: Optional[int]) -> ProcessOutput+```++</Tab>+<Tab value="TypeScript">++```ts+sh(line: string, timeoutMs: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>+```++</Tab>+<Tab value="Swift">++```swift+func sh(line: String, timeoutMs: UInt32?) async throws -> ProcessOutput+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun sh(line: String, timeoutMs: UInt?): ProcessOutput+```++</Tab>+<Tab value="Rust">++```rust+pub async fn sh(&self, line: String, timeout_ms: Option<u32>) -> Result<ProcessOutput, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `line` | `String` | required |+| `timeout_ms` | `Option<u32>` | required |++**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdClient.spawn`++Starts a command and returns its handle.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def spawn(self, command: SpacesdCommand) -> SpacesdProcess+```++</Tab>+<Tab value="TypeScript">++```ts+spawn(command: SpacesdCommand, asyncOpts_?: { signal: AbortSignal }): Promise<SpacesdProcessLike>+```++</Tab>+<Tab value="Swift">++```swift+func spawn(command: SpacesdCommand) async throws -> SpacesdProcess+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun spawn(command: SpacesdCommand): SpacesdProcess+```++</Tab>+<Tab value="Rust">++```rust+pub async fn spawn(&self, command: SpacesdCommand) -> Result<Arc<SpacesdProcess>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `command` | [`SpacesdCommand`](#spacesdcommand-record) | required |++**Returns** [`SpacesdProcess`](#spacesdprocess) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++**Example**++{/* Examples: scripts/docs-generators/examples/cua-sdk/SpacesdClient.spawn.py, scripts/docs-generators/examples/cua-sdk/SpacesdClient.spawn.swift, scripts/docs-generators/examples/cua-sdk/SpacesdClient.spawn.kt */}++<Tabs items={['Python', 'Swift', 'Kotlin']} groupId="sdk-lang" persist>+<Tab value="Python">++```python test="docs" id="spacesd-client-spawn-py" session="spacesd-client-spawn-py" prelude="spacesd,spacesd-vars"+import asyncio++import cua++async def main():+ guest = await cua.embedded().spacesd(URL, TOKEN)+ proc = await guest.spawn(cua.SpacesdCommand(program="cat", args=[], stdin=True))+ await proc.write_stdin(b"xyz")+ await proc.close_stdin()+ print([(await proc.wait()).stdout])+ # [b'xyz']++asyncio.run(main())+```++</Tab>+<Tab value="Swift">++```swift test="swift" id="spacesd-client-spawn-swift"+import Cua+import Foundation++let guest = try await Cua.embedded().spacesd(url: "http://10.0.0.5:3211", token: "TOKEN")+let proc = try await guest.spawn(command: SpacesdCommand("cat", stdin: true))+try await proc.writeStdin(data: Data("xyz".utf8))+try await proc.closeStdin()+print(String(decoding: try await proc.wait().stdout, as: UTF8.self))+```++</Tab>+<Tab value="Kotlin">++```kotlin test="kotlin" id="spacesd-client-spawn-kt"+import ai.cua.sdk.Cua+import ai.cua.sdk.CuaConfig+import ai.cua.sdk.SpacesdCommand++val guest = Cua.embedded(CuaConfig()).spacesd("http://10.0.0.5:3211", "TOKEN")+val proc = guest.spawn(SpacesdCommand(program = "cat", stdin = true))+proc.writeStdin("xyz".encodeToByteArray())+proc.closeStdin()+println(proc.wait().stdout.decodeToString())+```++</Tab>+</Tabs>++### `SpacesdClient.attach`++Attaches to a running process by pid or tag.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def attach(self, pid: Optional[int], tag: Optional[str], replay: ReplayMode) -> SpacesdProcess+```++</Tab>+<Tab value="TypeScript">++```ts+attach(pid: number | undefined, tag: string | undefined, replay: ReplayMode, asyncOpts_?: { signal: AbortSignal }): Promise<SpacesdProcessLike>+```++</Tab>+<Tab value="Swift">++```swift+func attach(pid: UInt32?, tag: String?, replay: ReplayMode) async throws -> SpacesdProcess+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun attach(pid: UInt?, tag: String?, replay: ReplayMode): SpacesdProcess+```++</Tab>+<Tab value="Rust">++```rust+pub async fn attach(&self, pid: Option<u32>, tag: Option<String>, replay: ReplayMode) -> Result<Arc<SpacesdProcess>, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `pid` | `Option<u32>` | required |+| `tag` | `Option<String>` | required |+| `replay` | [`ReplayMode`](#replaymode-enum) | required |++**Returns** [`SpacesdProcess`](#spacesdprocess) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdClient.list_processes`++Guest processes as proto3 JSON (`[ProcessInfo]`).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def list_processes(self, include_exited: bool) -> str+```++</Tab>+<Tab value="TypeScript">++```ts+listProcesses(includeExited: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<string>+```++</Tab>+<Tab value="Swift">++```swift+func listProcesses(includeExited: Bool) async throws -> String+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun listProcesses(includeExited: Boolean): String+```++</Tab>+<Tab value="Rust">++```rust+pub async fn list_processes(&self, include_exited: bool) -> Result<String, CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `include_exited` | `bool` | required |++**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `SpacesdProcess`++A guest process, from `spawn` or `attach`.++Returned by [`SpacesdClient.attach`](#spacesdclientattach), [`SpacesdClient.spawn`](#spacesdclientspawn).++| Method | Description |+| --- | --- |+| [`close_stdin`](#spacesdprocessclose_stdin) | Closes stdin. |+| [`detach`](#spacesdprocessdetach) | Stops receiving output without affecting the process. |+| [`kill`](#spacesdprocesskill) | SIGKILL. |+| [`next_event`](#spacesdprocessnext_event) | Next output chunk or the exit; `None` after the exit was returned. |+| [`resize`](#spacesdprocessresize) | Resizes the PTY. |+| [`signal`](#spacesdprocesssignal) | Sends a signal by name (`term`, `kill`, `SIGINT`, ...). |+| [`wait`](#spacesdprocesswait) | Collects the remaining output until exit. |+| [`write_pty`](#spacesdprocesswrite_pty) | Writes PTY keystrokes. |+| [`write_stdin`](#spacesdprocesswrite_stdin) | Writes stdin (PTY input for PTY processes), exactly once across retries. |++| Accessor | Returns | Description |+| --- | --- | --- |+| `pid()` | `u32` | Guest pid. |+| `tag()` | `Option<String>` | Tag, when set. |++### `SpacesdProcess.close_stdin`++Closes stdin.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def close_stdin(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+closeStdin(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func closeStdin() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun closeStdin()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn close_stdin(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.detach`++Stops receiving output without affecting the process.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def detach(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+detach(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func detach() async+```++</Tab>+<Tab value="Kotlin">++```kotlin+suspend fun detach()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn detach(&self)+```++</Tab>+</Tabs>++**Async**++### `SpacesdProcess.kill`++SIGKILL.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def kill(self) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+kill(asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func kill() async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun kill()+```++</Tab>+<Tab value="Rust">++```rust+pub async fn kill(&self) -> Result<(), CuaError>+```++</Tab>+</Tabs>++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.next_event`++Next output chunk or the exit; `None` after the exit was returned.+Reconnects transparently from the last seen offset.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def next_event(self) -> Optional[ProcessEvent]+```++</Tab>+<Tab value="TypeScript">++```ts+nextEvent(asyncOpts_?: { signal: AbortSignal }): Promise<ProcessEvent | undefined>+```++</Tab>+<Tab value="Swift">++```swift+func nextEvent() async throws -> ProcessEvent?+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun nextEvent(): ProcessEvent?+```++</Tab>+<Tab value="Rust">++```rust+pub async fn next_event(&self) -> Result<Option<ProcessEvent>, CuaError>+```++</Tab>+</Tabs>++**Returns** [`Option<ProcessEvent>`](#processevent-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.resize`++Resizes the PTY.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def resize(self, cols: int, rows: int) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+resize(cols: number, rows: number, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func resize(cols: UInt32, rows: UInt32) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun resize(cols: UInt, rows: UInt)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn resize(&self, cols: u32, rows: u32) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `cols` | `u32` | required |+| `rows` | `u32` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.signal`++Sends a signal by name (`term`, `kill`, `SIGINT`, ...).++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def signal(self, signal: str) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+signal(signal: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func signal(signal: String) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun signal(signal: String)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn signal(&self, signal: String) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `signal` | `String` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.wait`++Collects the remaining output until exit.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def wait(self) -> ProcessOutput+```++</Tab>+<Tab value="TypeScript">++```ts+wait(asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>+```++</Tab>+<Tab value="Swift">++```swift+func wait() async throws -> ProcessOutput+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun wait(): ProcessOutput+```++</Tab>+<Tab value="Rust">++```rust+pub async fn wait(&self) -> Result<ProcessOutput, CuaError>+```++</Tab>+</Tabs>++**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.write_pty`++Writes PTY keystrokes.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def write_pty(self, data: bytes) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+writePty(data: ArrayBuffer, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func writePty(data: Data) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun writePty(data: ByteArray)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn write_pty(&self, data: Vec<u8>) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `data` | `Vec<u8>` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++### `SpacesdProcess.write_stdin`++Writes stdin (PTY input for PTY processes), exactly once across+retries.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+async def write_stdin(self, data: bytes) -> None+```++</Tab>+<Tab value="TypeScript">++```ts+writeStdin(data: ArrayBuffer, asyncOpts_?: { signal: AbortSignal }): Promise<void>+```++</Tab>+<Tab value="Swift">++```swift+func writeStdin(data: Data) async throws+```++</Tab>+<Tab value="Kotlin">++```kotlin+@Throws(CuaException::class)+suspend fun writeStdin(data: ByteArray)+```++</Tab>+<Tab value="Rust">++```rust+pub async fn write_stdin(&self, data: Vec<u8>) -> Result<(), CuaError>+```++</Tab>+</Tabs>++| Parameter | Type | Default |+| --- | --- | --- |+| `data` | `Vec<u8>` | required |++**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)++## `SpacesdCommand` record++A command to run in the guest.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `program` | `String` | | Program (absolute path or `PATH` lookup). |+| `args` | `Vec<String>` | `[]` | Arguments. |+| `env` | `HashMap<String, String>` | `[:]` | Extra environment. |+| `cwd` | `Option<String>` | `None` | Working directory. |+| `user` | `Option<String>` | `None` | Run as this user. |+| `timeout_ms` / `timeoutMs` | `Option<u32>` | `None` | Kill after this long. |+| `tag` | `Option<String>` | `None` | Tag for reattaching (`attach(tag=…)`). |+| `stdin` | `bool` | `false` | Keep stdin open for `write_stdin`. |+| `pty` | [`Option<PtySize>`](#ptysize-record) | `None` | Run in a PTY of this size. |++## `ProcessOutput` record++Collected output of a finished process.++Returned by [`Sandbox.guest_sh`](#sandboxguest_sh), [`SpacesdClient.run`](#spacesdclientrun), [`SpacesdClient.sh`](#spacesdclientsh), [`SpacesdProcess.wait`](#spacesdprocesswait).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `exit` | [`ExitInfo`](#exitinfo-record) | | Exit. |+| `stdout` | `Vec<u8>` | | stdout bytes. |+| `stderr` | `Vec<u8>` | | stderr bytes. |+| `pty` | `Vec<u8>` | | PTY bytes. |++## `ExitInfo` record++How a process ended.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `code` | `Option<i32>` | | Exit code for a normal exit. |+| `signal` | `Option<String>` | | Terminating signal (`kill`, `term`, ...). |+| `timed_out` / `timedOut` | `bool` | | Stopped by its timeout. |+| `error` | `Option<String>` | | Supervisor error (for example "executable not found"). |+| `success` | `bool` | | `code == 0`. |++## `ProcessEvent` record++One output chunk or the exit.++Returned by [`SpacesdProcess.next_event`](#spacesdprocessnext_event).++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `kind` | [`ProcessEventKind`](#processeventkind-enum) | | Kind. |+| `offset` | `u64` | | Combined-output offset of the first byte. |+| `data` | `Vec<u8>` | | Bytes (empty for `Exit`). |+| `exit` | [`Option<ExitInfo>`](#exitinfo-record) | | Exit (only for `Exit`). |++## `ProcessEventKind` enum++Kind of a process event.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+ProcessEventKind.STDOUT+ProcessEventKind.STDERR+ProcessEventKind.PTY+ProcessEventKind.EXIT+```++</Tab>+<Tab value="TypeScript">++```ts+ProcessEventKind.Stdout+ProcessEventKind.Stderr+ProcessEventKind.Pty+ProcessEventKind.Exit+```++</Tab>+<Tab value="Swift">++```swift+.stdout+.stderr+.pty+.exit+```++</Tab>+<Tab value="Kotlin">++```kotlin+ProcessEventKind.STDOUT+ProcessEventKind.STDERR+ProcessEventKind.PTY+ProcessEventKind.EXIT+```++</Tab>+<Tab value="Rust">++```rust+ProcessEventKind::Stdout+ProcessEventKind::Stderr+ProcessEventKind::Pty+ProcessEventKind::Exit+```++</Tab>+</Tabs>++| Variant | Description |+| --- | --- |+| `Stdout` | stdout bytes. |+| `Stderr` | stderr bytes. |+| `Pty` | PTY bytes. |+| `Exit` | The process ended (always last). |++## `PtySize` record++A PTY size.++| Field | Type | Default | Description |+| --- | --- | --- | --- |+| `cols` | `u32` | | Columns. |+| `rows` | `u32` | | Rows. |++## `ReplayMode` enum++Scrollback replay when attaching.++<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>+<Tab value="Python">++```python+ReplayMode.NONE()+ReplayMode.ALL()+ReplayMode.LAST_BYTES(n: int)+ReplayMode.FROM_OFFSET(offset: int)+```++</Tab>+<Tab value="TypeScript">++```ts+new ReplayMode.None()+new ReplayMode.All()+new ReplayMode.LastBytes({ n: bigint })+new ReplayMode.FromOffset({ offset: bigint })+```++</Tab>+<Tab value="Swift">++```swift+.none+.all+.lastBytes(n: UInt64)+.fromOffset(offset: UInt64)+```++</Tab>+<Tab value="Kotlin">++```kotlin+ReplayMode.None+ReplayMode.All+ReplayMode.LastBytes(n: ULong)+ReplayMode.FromOffset(offset: ULong)+```++</Tab>+<Tab value="Rust">++```rust+ReplayMode::None+ReplayMode::All+ReplayMode::LastBytes { n: u64 }+ReplayMode::FromOffset { offset: u64 }+```++</Tab>+</Tabs>++| Variant | Description |+| --- | --- |+| `None` | Live output only. |+| `All` | Everything retained. |+| `LastBytes` | The last `n` bytes. Fields: `n: u64` |+| `FromOffset` | From this combined-output offset. Fields: `offset: u64` |diff --git a/docs/content/docs/cua-sdk/reference/spacesd/media.mdx b/docs/content/docs/cua-sdk/reference/spacesd/media.mdxdeleted file mode 100644index b0f1137538..0000000000--- a/docs/content/docs/cua-sdk/reference/spacesd/media.mdx+++ /dev/null@@ -1,639 +0,0 @@-----title: "Media"-description: "Video and audio streaming sessions and the sink callbacks you implement."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Callout } from 'fumadocs-ui/components/callout';-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--Media sessions deliver encoded frames and audio packets (`FrameSink`, `AudioSink`) to callbacks you implement. Decoded BGRA frames and PCM audio come with Cua Spaces: see [Decoded media](/cua-sdk/reference/spaces/decoded-media).--## Open a session--Methods of [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient).--### `SpacesdClient.open_media`--Opens a media session and starts delivering encoded video frames and-control events to `frames`. Decoding stays in the host language.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def open_media(self, options: MediaOpenOptions, frames: FrameSink) -> MediaSession-```--</Tab>-<Tab value="TypeScript">--```ts-openMedia(options: MediaOpenOptions, frames: FrameSink, asyncOpts_?: { signal: AbortSignal }): Promise<MediaSessionLike>-```--</Tab>-<Tab value="Swift">--```swift-func openMedia(options: MediaOpenOptions, frames: FrameSink) async throws -> MediaSession-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun openMedia(options: MediaOpenOptions, frames: FrameSink): MediaSession-```--</Tab>-<Tab value="Rust">--```rust-pub async fn open_media(&self, options: MediaOpenOptions, frames: Arc<dyn FrameSink>) -> Result<Arc<MediaSession>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `options` | [`MediaOpenOptions`](#mediaopenoptions-record) | required |-| `frames` | [`FrameSink`](#framesink) | required |--**Returns** [`MediaSession`](#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdClient.open_media_with_audio`--`SpacesdClient.open_media` that also delivers audio packets to-`audio` (set `options.audio` to negotiate audio tracks).--Two methods instead of an optional sink: optional callback objects-do not lower in every binding generator.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def open_media_with_audio(self, options: MediaOpenOptions, frames: FrameSink, audio: AudioSink) -> MediaSession-```--</Tab>-<Tab value="TypeScript">--```ts-openMediaWithAudio(options: MediaOpenOptions, frames: FrameSink, audio: AudioSink, asyncOpts_?: { signal: AbortSignal }): Promise<MediaSessionLike>-```--</Tab>-<Tab value="Swift">--```swift-func openMediaWithAudio(options: MediaOpenOptions, frames: FrameSink, audio: AudioSink) async throws -> MediaSession-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun openMediaWithAudio(options: MediaOpenOptions, frames: FrameSink, audio: AudioSink): MediaSession-```--</Tab>-<Tab value="Rust">--```rust-pub async fn open_media_with_audio(&self, options: MediaOpenOptions, frames: Arc<dyn FrameSink>, audio: Arc<dyn AudioSink>) -> Result<Arc<MediaSession>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `options` | [`MediaOpenOptions`](#mediaopenoptions-record) | required |-| `frames` | [`FrameSink`](#framesink) | required |-| `audio` | [`AudioSink`](#audiosink) | required |--**Returns** [`MediaSession`](#mediasession) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## Media bridge--Methods of [`Sandbox`](/cua-sdk/reference/sandbox#sandbox).--### `Sandbox.open_media_bridge`--Opens a media session and returns a loopback WebSocket bridge for a-webview (daemon mode). `open_media_json` is a-`cua.env.v1.OpenMediaRequest` in proto3 JSON (`None`: primary display).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def open_media_bridge(self, open_media_json: Optional[str]) -> MediaBridge-```--</Tab>-<Tab value="TypeScript">--```ts-openMediaBridge(openMediaJson: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<MediaBridge>-```--</Tab>-<Tab value="Swift">--```swift-func openMediaBridge(openMediaJson: String?) async throws -> MediaBridge-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun openMediaBridge(openMediaJson: String?): MediaBridge-```--</Tab>-<Tab value="Rust">--```rust-pub async fn open_media_bridge(&self, open_media_json: Option<String>) -> Result<MediaBridge, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `open_media_json` | `Option<String>` | required |--**Returns** [`MediaBridge`](#mediabridge-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `MediaSession`--A live media session.--Returned by [`Space.attach_stream`](/cua-sdk/reference/spaces/streams#spaceattach_stream), [`SpacesdClient.open_media`](#spacesdclientopen_media), [`SpacesdClient.open_media_with_audio`](#spacesdclientopen_media_with_audio).--| Method | Description |-| --- | --- |-| [`close`](#mediasessionclose) | Closes the socket and the session. |-| [`request_keyframe`](#mediasessionrequest_keyframe) | `StreamService.RequestKeyframe`. |-| [`send_control`](#mediasessionsend_control) | Sends a JSON control message on the media socket (for example `{"type":"request_keyframe","payload":{}}` or interactive input). |-| [`set_preferences_json`](#mediasessionset_preferences_json) | `StreamService.SetPreferences` from proto3 JSON (the session id is filled in). |--| Accessor | Returns | Description |-| --- | --- | --- |-| `codec()` | `String` | Negotiated video codec (`h264`, `bgra`, `png`). |-| `is_closed()` | `bool` | Whether the socket has closed. |-| `open_response_json()` | `String` | `OpenMediaResponse` as proto3 JSON (ticket removed). |-| `session_id()` | `String` | `OpenMediaResponse.media_session_id`. |-| `stats()` | [`MediaStats`](#mediastats-record) | Delivery counters. |--### `MediaSession.close`--Closes the socket and the session.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def close(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-close(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func close() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun closeSession()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn close(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `MediaSession.request_keyframe`--`StreamService.RequestKeyframe`.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def request_keyframe(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-requestKeyframe(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func requestKeyframe() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun requestKeyframe()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn request_keyframe(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `MediaSession.send_control`--Sends a JSON control message on the media socket (for example-`{"type":"request_keyframe","payload":{}}` or interactive input).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def send_control(self, json: str) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-sendControl(json: string): void-```--</Tab>-<Tab value="Swift">--```swift-func sendControl(json: String) throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun sendControl(json: String)-```--</Tab>-<Tab value="Rust">--```rust-pub fn send_control(&self, json: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Raises** [`CuaError`](/cua-sdk/reference/errors)--### `MediaSession.set_preferences_json`--`StreamService.SetPreferences` from proto3 JSON (the session id is-filled in).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def set_preferences_json(self, json: str) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-setPreferencesJson(json: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func setPreferencesJson(json: String) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun setPreferencesJson(json: String)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn set_preferences_json(&self, json: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `json` | `String` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `MediaOpenOptions` record--Media session options.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `display` | `Option<String>` | `None` | Display id (primary when unset). Ignored when `window_handle` is set. |-| `window_handle` / `windowHandle` | `Option<String>` | `None` | Window handle (from `ListTargets` / `ListWindows`). |-| `max_fps` / `maxFps` | `u32` | `0` | FPS cap (0 = driver default). |-| `max_dimension` / `maxDimension` | `u32` | `0` | Long-edge cap (0 = native). |-| `audio` | `bool` | `false` | Also negotiate desktop/app audio (Opus). |-| `disable_video` / `disableVideo` | `bool` | `false` | Audio only. |-| `request_json` / `requestJson` | `Option<String>` | `None` | Extra `OpenMediaRequest` fields as proto3 JSON, merged over the above (escape hatch). |--## `MediaBridge` record--A media bridge for webviews (daemon mode).--Returned by [`Sandbox.open_media_bridge`](#sandboxopen_media_bridge).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `ws_url` / `wsUrl` | `String` | | Loopback `ws://` URL carrying a short-lived bridge ticket. Speaks rcdp wire v2 unchanged; no env token is exposed. |-| `ticket` | `String` | | The bridge ticket (also accepted as subprotocol `cua.ticket.<ticket>`). |-| `open_media_response_json` / `openMediaResponseJson` | `String` | | `cua.env.v1.OpenMediaResponse` as proto3 JSON (upstream ticket removed). |--## `AudioSink`--Receives audio packets. Must return quickly.--<Callout>-You implement `AudioSink` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `AudioSink` protocol in Swift, the interface in Kotlin and the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_audio`](#audiosinkon_audio) | An audio packet. |--### `AudioSink.on_audio`--An audio packet.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def on_audio(self, packet: AudioPacket) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-onAudio(packet: AudioPacket): void-```--</Tab>-<Tab value="Swift">--```swift-func onAudio(packet: AudioPacket)-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun onAudio(packet: AudioPacket)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_audio(&self, packet: AudioPacket)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `packet` | [`AudioPacket`](#audiopacket-record) | required |--## `FrameSink`--Receives video frames and control events. Implementations must return-quickly and hand off decoding.--<Callout>-You implement `FrameSink` and pass it to the SDK (a callback interface): subclass it in Python, implement the interface in TypeScript, the `FrameSink` protocol in Swift, the interface in Kotlin and the trait in Rust.-</Callout>--| Method | Description |-| --- | --- |-| [`on_event`](#framesinkon_event) | A control message or the socket close. |-| [`on_frame`](#framesinkon_frame) | A video access unit. |--### `FrameSink.on_event`--A control message or the socket close.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def on_event(self, event: MediaEvent) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-onEvent(event: MediaEvent): void-```--</Tab>-<Tab value="Swift">--```swift-func onEvent(event: MediaEvent)-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun onEvent(event: MediaEvent)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_event(&self, event: MediaEvent)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `event` | [`MediaEvent`](#mediaevent-record) | required |--### `FrameSink.on_frame`--A video access unit.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def on_frame(self, frame: VideoFrame) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-onFrame(frame: VideoFrame): void-```--</Tab>-<Tab value="Swift">--```swift-func onFrame(frame: VideoFrame)-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun onFrame(frame: VideoFrame)-```--</Tab>-<Tab value="Rust">--```rust-pub fn on_frame(&self, frame: VideoFrame)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `frame` | [`VideoFrame`](#videoframe-record) | required |--## `AudioPacket` record--One audio packet (MEDIA.md §12.2).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `track_id` / `trackId` | `u16` | | Track id from `NegotiatedAudio`. |-| `sequence` | `u32` | | Per-track sequence (wraps mod 2³²). |-| `pts_us` / `ptsUs` | `u64` | | Media-clock time of the first sample (µs). |-| `frame_samples` / `frameSamples` | `u16` | | Samples per channel. |-| `config_epoch` / `configEpoch` | `u8` | | Must match the latest `audio_config` of the track. |-| `discontinuity` | `bool` | | The previous packet was dropped or the track restarted. |-| `dtx` | `bool` | | DTX / comfort-noise frame. |-| `data` | `Vec<u8>` | | One Opus packet or interleaved s16le PCM. |--## `MediaEvent` record--A control message (`hello`, `session_opened`, `lifecycle`,-`audio_config`, `stats`, `error`, ...) or the close of the socket-(`kind = "closed"`, `json = {"code":…, "reason":…}`).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | `String` | | The message `type`. |-| `json` | `String` | | The whole message as JSON. |--## `MediaStats` record--Delivery counters.--Returned by [`MediaSession.stats`](#mediasession).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `frames` | `u64` | | Video frames delivered. |-| `frames_dropped` / `framesDropped` | `u64` | | Video frames dropped because the sink fell behind. |-| `audio_packets` / `audioPackets` | `u64` | | Audio packets delivered. |-| `malformed` | `u64` | | Malformed binary messages ignored. |-| `events` | `u64` | | Control events delivered. |--## `VideoFrame` record--One encoded video access unit.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `sequence` | `u64` | | Per-target frame sequence (may start anywhere; gaps mean replaced frames). |-| `codec` | `String` | | `h264`, `bgra` or `png`. |-| `keyframe` | `bool` | | Random-access point (IDR with SPS/PPS for H.264). |-| `width` | `u32` | | Payload width in pixels. |-| `height` | `u32` | | Payload height in pixels. |-| `capture_timestamp_us` / `captureTimestampUs` | `u64` | | Media-clock capture time (µs). |-| `codec_epoch` / `codecEpoch` | `u64` | | Decoder configuration generation; reset the decoder when it changes. |-| `geometry_epoch` / `geometryEpoch` | `u64` | | Coordinate generation. |-| `data` | `Vec<u8>` | | Encoded payload. |-| `header_json` / `headerJson` | `String` | | The packet's JSON header, verbatim. |diff --git a/docs/content/docs/cua-sdk/reference/spacesd/meta.json b/docs/content/docs/cua-sdk/reference/spacesd/meta.jsonindex a54e583b71..699f5f2480 100644--- a/docs/content/docs/cua-sdk/reference/spacesd/meta.json+++ b/docs/content/docs/cua-sdk/reference/spacesd/meta.json@@ -1,9 +1,7 @@{- "title": "Spacesd client",+ "title": "Spacesd client and processes","pages": [- "shell","files",- "computer",- "media"+ "computer"]}diff --git a/docs/content/docs/cua-sdk/reference/spacesd/shell.mdx b/docs/content/docs/cua-sdk/reference/spacesd/shell.mdxdeleted file mode 100644index 3f24e828b7..0000000000--- a/docs/content/docs/cua-sdk/reference/spacesd/shell.mdx+++ /dev/null@@ -1,1020 +0,0 @@-----title: "Processes"-description: "Run, spawn and attach to processes in a sandbox through cua-spacesd."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--Run a command to completion with `run` or `sh`, or `spawn` a `SpacesdProcess` to stream its output and write its input.--Python programs usually use the high-level API instead: [`sb.shell`, `sb.terminal`](/cua-sdk/reference/python/interfaces#shell).--## Run processes--Methods of [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient).--### `SpacesdClient.run`--Runs a command to completion.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def run(self, command: SpacesdCommand) -> ProcessOutput-```--</Tab>-<Tab value="TypeScript">--```ts-run(command: SpacesdCommand, asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>-```--</Tab>-<Tab value="Swift">--```swift-func run(command: SpacesdCommand) async throws -> ProcessOutput-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun run(command: SpacesdCommand): ProcessOutput-```--</Tab>-<Tab value="Rust">--```rust-pub async fn run(&self, command: SpacesdCommand) -> Result<ProcessOutput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `command` | [`SpacesdCommand`](#spacesdcommand-record) | required |--**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--**Example**--{/* Examples: scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.py, scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.ts, scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.swift, scripts/docs-generators/examples/cua-sdk/SpacesdClient.run.kt */}--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin']} groupId="sdk-lang" persist>-<Tab value="Python">--```python test="docs" id="spacesd-client-run-py" session="spacesd-client-run-py" prelude="spacesd,spacesd-vars"-import asyncio--import cua--async def main():- guest = await cua.embedded().spacesd(URL, TOKEN) # or: await sandbox.spacesd(None)- out = await guest.run(cua.SpacesdCommand(program="echo", args=["hello"]))- print([out.exit.success, out.stdout])- # [True, b'hello\n']--asyncio.run(main())-```--</Tab>-<Tab value="TypeScript">--```ts test="docs" id="spacesd-client-run-ts" prelude="spacesd,spacesd-vars"-import { SpacesdCommand, embedded } from '@trycua/cua';--const guest = await embedded().spacesd(URL, TOKEN); // or: await sandbox.spacesd(undefined)-const out = await guest.run(SpacesdCommand.create({ program: 'echo', args: ['hello'] }));-console.log(out.exit.success, new TextDecoder().decode(out.stdout));-```--</Tab>-<Tab value="Swift">--```swift test="swift" id="spacesd-client-run-swift"-import Cua--let guest = try await Cua.embedded().spacesd(url: "http://10.0.0.5:3211", token: "TOKEN") // or: try await sandbox.spacesd(probeTimeoutMs: nil)-let out = try await guest.run(command: SpacesdCommand("echo", ["hello"]))-print(out.exit.success, String(decoding: out.stdout, as: UTF8.self))-```--</Tab>-<Tab value="Kotlin">--```kotlin test="kotlin" id="spacesd-client-run-kt"-import ai.cua.sdk.Cua-import ai.cua.sdk.CuaConfig-import ai.cua.sdk.SpacesdCommand--val guest = Cua.embedded(CuaConfig()).spacesd("http://10.0.0.5:3211", "TOKEN") // or: sandbox.spacesd(null)-val out = guest.run(SpacesdCommand(program = "echo", args = listOf("hello")))-println("${out.exit.success} ${out.stdout.decodeToString()}")-```--</Tab>-</Tabs>--### `SpacesdClient.sh`--Runs `line` with `/bin/sh -c` to completion.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def sh(self, line: str, timeout_ms: Optional[int]) -> ProcessOutput-```--</Tab>-<Tab value="TypeScript">--```ts-sh(line: string, timeoutMs: number | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>-```--</Tab>-<Tab value="Swift">--```swift-func sh(line: String, timeoutMs: UInt32?) async throws -> ProcessOutput-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun sh(line: String, timeoutMs: UInt?): ProcessOutput-```--</Tab>-<Tab value="Rust">--```rust-pub async fn sh(&self, line: String, timeout_ms: Option<u32>) -> Result<ProcessOutput, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `line` | `String` | required |-| `timeout_ms` | `Option<u32>` | required |--**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdClient.spawn`--Starts a command and returns its handle.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def spawn(self, command: SpacesdCommand) -> SpacesdProcess-```--</Tab>-<Tab value="TypeScript">--```ts-spawn(command: SpacesdCommand, asyncOpts_?: { signal: AbortSignal }): Promise<SpacesdProcessLike>-```--</Tab>-<Tab value="Swift">--```swift-func spawn(command: SpacesdCommand) async throws -> SpacesdProcess-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun spawn(command: SpacesdCommand): SpacesdProcess-```--</Tab>-<Tab value="Rust">--```rust-pub async fn spawn(&self, command: SpacesdCommand) -> Result<Arc<SpacesdProcess>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `command` | [`SpacesdCommand`](#spacesdcommand-record) | required |--**Returns** [`SpacesdProcess`](#spacesdprocess) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--**Example**--{/* Examples: scripts/docs-generators/examples/cua-sdk/SpacesdClient.spawn.py, scripts/docs-generators/examples/cua-sdk/SpacesdClient.spawn.swift, scripts/docs-generators/examples/cua-sdk/SpacesdClient.spawn.kt */}--<Tabs items={['Python', 'Swift', 'Kotlin']} groupId="sdk-lang" persist>-<Tab value="Python">--```python test="docs" id="spacesd-client-spawn-py" session="spacesd-client-spawn-py" prelude="spacesd,spacesd-vars"-import asyncio--import cua--async def main():- guest = await cua.embedded().spacesd(URL, TOKEN)- proc = await guest.spawn(cua.SpacesdCommand(program="cat", args=[], stdin=True))- await proc.write_stdin(b"xyz")- await proc.close_stdin()- print([(await proc.wait()).stdout])- # [b'xyz']--asyncio.run(main())-```--</Tab>-<Tab value="Swift">--```swift test="swift" id="spacesd-client-spawn-swift"-import Cua-import Foundation--let guest = try await Cua.embedded().spacesd(url: "http://10.0.0.5:3211", token: "TOKEN")-let proc = try await guest.spawn(command: SpacesdCommand("cat", stdin: true))-try await proc.writeStdin(data: Data("xyz".utf8))-try await proc.closeStdin()-print(String(decoding: try await proc.wait().stdout, as: UTF8.self))-```--</Tab>-<Tab value="Kotlin">--```kotlin test="kotlin" id="spacesd-client-spawn-kt"-import ai.cua.sdk.Cua-import ai.cua.sdk.CuaConfig-import ai.cua.sdk.SpacesdCommand--val guest = Cua.embedded(CuaConfig()).spacesd("http://10.0.0.5:3211", "TOKEN")-val proc = guest.spawn(SpacesdCommand(program = "cat", stdin = true))-proc.writeStdin("xyz".encodeToByteArray())-proc.closeStdin()-println(proc.wait().stdout.decodeToString())-```--</Tab>-</Tabs>--### `SpacesdClient.attach`--Attaches to a running process by pid or tag.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def attach(self, pid: Optional[int], tag: Optional[str], replay: ReplayMode) -> SpacesdProcess-```--</Tab>-<Tab value="TypeScript">--```ts-attach(pid: number | undefined, tag: string | undefined, replay: ReplayMode, asyncOpts_?: { signal: AbortSignal }): Promise<SpacesdProcessLike>-```--</Tab>-<Tab value="Swift">--```swift-func attach(pid: UInt32?, tag: String?, replay: ReplayMode) async throws -> SpacesdProcess-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun attach(pid: UInt?, tag: String?, replay: ReplayMode): SpacesdProcess-```--</Tab>-<Tab value="Rust">--```rust-pub async fn attach(&self, pid: Option<u32>, tag: Option<String>, replay: ReplayMode) -> Result<Arc<SpacesdProcess>, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `pid` | `Option<u32>` | required |-| `tag` | `Option<String>` | required |-| `replay` | [`ReplayMode`](#replaymode-enum) | required |--**Returns** [`SpacesdProcess`](#spacesdprocess) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdClient.list_processes`--Guest processes as proto3 JSON (`[ProcessInfo]`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def list_processes(self, include_exited: bool) -> str-```--</Tab>-<Tab value="TypeScript">--```ts-listProcesses(includeExited: boolean, asyncOpts_?: { signal: AbortSignal }): Promise<string>-```--</Tab>-<Tab value="Swift">--```swift-func listProcesses(includeExited: Bool) async throws -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun listProcesses(includeExited: Boolean): String-```--</Tab>-<Tab value="Rust">--```rust-pub async fn list_processes(&self, include_exited: bool) -> Result<String, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `include_exited` | `bool` | required |--**Returns** `String` · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `SpacesdProcess`--A guest process, from `spawn` or `attach`.--Returned by [`SpacesdClient.attach`](#spacesdclientattach), [`SpacesdClient.spawn`](#spacesdclientspawn).--| Method | Description |-| --- | --- |-| [`close_stdin`](#spacesdprocessclose_stdin) | Closes stdin. |-| [`detach`](#spacesdprocessdetach) | Stops receiving output without affecting the process. |-| [`kill`](#spacesdprocesskill) | SIGKILL. |-| [`next_event`](#spacesdprocessnext_event) | Next output chunk or the exit; `None` after the exit was returned. |-| [`resize`](#spacesdprocessresize) | Resizes the PTY. |-| [`signal`](#spacesdprocesssignal) | Sends a signal by name (`term`, `kill`, `SIGINT`, ...). |-| [`wait`](#spacesdprocesswait) | Collects the remaining output until exit. |-| [`write_pty`](#spacesdprocesswrite_pty) | Writes PTY keystrokes. |-| [`write_stdin`](#spacesdprocesswrite_stdin) | Writes stdin (PTY input for PTY processes), exactly once across retries. |--| Accessor | Returns | Description |-| --- | --- | --- |-| `pid()` | `u32` | Guest pid. |-| `tag()` | `Option<String>` | Tag, when set. |--### `SpacesdProcess.close_stdin`--Closes stdin.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def close_stdin(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-closeStdin(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func closeStdin() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun closeStdin()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn close_stdin(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.detach`--Stops receiving output without affecting the process.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def detach(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-detach(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func detach() async-```--</Tab>-<Tab value="Kotlin">--```kotlin-suspend fun detach()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn detach(&self)-```--</Tab>-</Tabs>--**Async**--### `SpacesdProcess.kill`--SIGKILL.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def kill(self) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-kill(asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func kill() async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun kill()-```--</Tab>-<Tab value="Rust">--```rust-pub async fn kill(&self) -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.next_event`--Next output chunk or the exit; `None` after the exit was returned.-Reconnects transparently from the last seen offset.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def next_event(self) -> Optional[ProcessEvent]-```--</Tab>-<Tab value="TypeScript">--```ts-nextEvent(asyncOpts_?: { signal: AbortSignal }): Promise<ProcessEvent | undefined>-```--</Tab>-<Tab value="Swift">--```swift-func nextEvent() async throws -> ProcessEvent?-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun nextEvent(): ProcessEvent?-```--</Tab>-<Tab value="Rust">--```rust-pub async fn next_event(&self) -> Result<Option<ProcessEvent>, CuaError>-```--</Tab>-</Tabs>--**Returns** [`Option<ProcessEvent>`](#processevent-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.resize`--Resizes the PTY.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def resize(self, cols: int, rows: int) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-resize(cols: number, rows: number, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func resize(cols: UInt32, rows: UInt32) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun resize(cols: UInt, rows: UInt)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn resize(&self, cols: u32, rows: u32) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `cols` | `u32` | required |-| `rows` | `u32` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.signal`--Sends a signal by name (`term`, `kill`, `SIGINT`, ...).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def signal(self, signal: str) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-signal(signal: string, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func signal(signal: String) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun signal(signal: String)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn signal(&self, signal: String) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `signal` | `String` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.wait`--Collects the remaining output until exit.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def wait(self) -> ProcessOutput-```--</Tab>-<Tab value="TypeScript">--```ts-wait(asyncOpts_?: { signal: AbortSignal }): Promise<ProcessOutput>-```--</Tab>-<Tab value="Swift">--```swift-func wait() async throws -> ProcessOutput-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun wait(): ProcessOutput-```--</Tab>-<Tab value="Rust">--```rust-pub async fn wait(&self) -> Result<ProcessOutput, CuaError>-```--</Tab>-</Tabs>--**Returns** [`ProcessOutput`](#processoutput-record) · **Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.write_pty`--Writes PTY keystrokes.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def write_pty(self, data: bytes) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-writePty(data: ArrayBuffer, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func writePty(data: Data) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun writePty(data: ByteArray)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn write_pty(&self, data: Vec<u8>) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `data` | `Vec<u8>` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--### `SpacesdProcess.write_stdin`--Writes stdin (PTY input for PTY processes), exactly once across-retries.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-async def write_stdin(self, data: bytes) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-writeStdin(data: ArrayBuffer, asyncOpts_?: { signal: AbortSignal }): Promise<void>-```--</Tab>-<Tab value="Swift">--```swift-func writeStdin(data: Data) async throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-suspend fun writeStdin(data: ByteArray)-```--</Tab>-<Tab value="Rust">--```rust-pub async fn write_stdin(&self, data: Vec<u8>) -> Result<(), CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `data` | `Vec<u8>` | required |--**Async** · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `SpacesdCommand` record--A command to run in the guest.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `program` | `String` | | Program (absolute path or `PATH` lookup). |-| `args` | `Vec<String>` | `[]` | Arguments. |-| `env` | `HashMap<String, String>` | `[:]` | Extra environment. |-| `cwd` | `Option<String>` | `None` | Working directory. |-| `user` | `Option<String>` | `None` | Run as this user. |-| `timeout_ms` / `timeoutMs` | `Option<u32>` | `None` | Kill after this long. |-| `tag` | `Option<String>` | `None` | Tag for reattaching (`attach(tag=…)`). |-| `stdin` | `bool` | `false` | Keep stdin open for `write_stdin`. |-| `pty` | [`Option<PtySize>`](#ptysize-record) | `None` | Run in a PTY of this size. |--## `ProcessOutput` record--Collected output of a finished process.--Returned by [`Sandbox.guest_sh`](/cua-sdk/reference/sandbox/without-spacesd#sandboxguest_sh), [`SpacesdClient.run`](#spacesdclientrun), [`SpacesdClient.sh`](#spacesdclientsh), [`SpacesdProcess.wait`](#spacesdprocesswait).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `exit` | [`ExitInfo`](#exitinfo-record) | | Exit. |-| `stdout` | `Vec<u8>` | | stdout bytes. |-| `stderr` | `Vec<u8>` | | stderr bytes. |-| `pty` | `Vec<u8>` | | PTY bytes. |--## `ExitInfo` record--How a process ended.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `code` | `Option<i32>` | | Exit code for a normal exit. |-| `signal` | `Option<String>` | | Terminating signal (`kill`, `term`, ...). |-| `timed_out` / `timedOut` | `bool` | | Stopped by its timeout. |-| `error` | `Option<String>` | | Supervisor error (for example "executable not found"). |-| `success` | `bool` | | `code == 0`. |--## `ProcessEvent` record--One output chunk or the exit.--Returned by [`SpacesdProcess.next_event`](#spacesdprocessnext_event).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `kind` | [`ProcessEventKind`](#processeventkind-enum) | | Kind. |-| `offset` | `u64` | | Combined-output offset of the first byte. |-| `data` | `Vec<u8>` | | Bytes (empty for `Exit`). |-| `exit` | [`Option<ExitInfo>`](#exitinfo-record) | | Exit (only for `Exit`). |--## `ProcessEventKind` enum--Kind of a process event.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-ProcessEventKind.STDOUT-ProcessEventKind.STDERR-ProcessEventKind.PTY-ProcessEventKind.EXIT-```--</Tab>-<Tab value="TypeScript">--```ts-ProcessEventKind.Stdout-ProcessEventKind.Stderr-ProcessEventKind.Pty-ProcessEventKind.Exit-```--</Tab>-<Tab value="Swift">--```swift-.stdout-.stderr-.pty-.exit-```--</Tab>-<Tab value="Kotlin">--```kotlin-ProcessEventKind.STDOUT-ProcessEventKind.STDERR-ProcessEventKind.PTY-ProcessEventKind.EXIT-```--</Tab>-<Tab value="Rust">--```rust-ProcessEventKind::Stdout-ProcessEventKind::Stderr-ProcessEventKind::Pty-ProcessEventKind::Exit-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `Stdout` | stdout bytes. |-| `Stderr` | stderr bytes. |-| `Pty` | PTY bytes. |-| `Exit` | The process ended (always last). |--## `PtySize` record--A PTY size.--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `cols` | `u32` | | Columns. |-| `rows` | `u32` | | Rows. |--## `ReplayMode` enum--Scrollback replay when attaching.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-ReplayMode.NONE()-ReplayMode.ALL()-ReplayMode.LAST_BYTES(n: int)-ReplayMode.FROM_OFFSET(offset: int)-```--</Tab>-<Tab value="TypeScript">--```ts-new ReplayMode.None()-new ReplayMode.All()-new ReplayMode.LastBytes({ n: bigint })-new ReplayMode.FromOffset({ offset: bigint })-```--</Tab>-<Tab value="Swift">--```swift-.none-.all-.lastBytes(n: UInt64)-.fromOffset(offset: UInt64)-```--</Tab>-<Tab value="Kotlin">--```kotlin-ReplayMode.None-ReplayMode.All-ReplayMode.LastBytes(n: ULong)-ReplayMode.FromOffset(offset: ULong)-```--</Tab>-<Tab value="Rust">--```rust-ReplayMode::None-ReplayMode::All-ReplayMode::LastBytes { n: u64 }-ReplayMode::FromOffset { offset: u64 }-```--</Tab>-</Tabs>--| Variant | Description |-| --- | --- |-| `None` | Live output only. |-| `All` | Everything retained. |-| `LastBytes` | The last `n` bytes. Fields: `n: u64` |-| `FromOffset` | From this combined-output offset. Fields: `offset: u64` |diff --git a/docs/content/docs/cua-sdk/reference/telemetry.mdx b/docs/content/docs/cua-sdk/reference/telemetry.mdxdeleted file mode 100644index 60081a9fd8..0000000000--- a/docs/content/docs/cua-sdk/reference/telemetry.mdx+++ /dev/null@@ -1,709 +0,0 @@-----title: "Telemetry"-description: "Anonymous usage telemetry switches."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk- Source: cua-bindgen docs (UniFFI metadata of libcua_sdk)- Version: 0.5.0-*/}--import { Tab, Tabs } from 'fumadocs-ui/components/tabs';--What is collected and never collected: [Telemetry and privacy](/cua-sdk/concepts/telemetry). These calls read and change the same switches as `cua telemetry`; the SDK records its own events.--## `telemetry_status`--Telemetry state, and exactly what every event carries.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_status() -> TelemetryStatus-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryStatus(): TelemetryStatus-```--</Tab>-<Tab value="Swift">--```swift-func telemetryStatus() -> TelemetryStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryStatus(): TelemetryStatus-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_status() -> TelemetryStatus-```--</Tab>-</Tabs>--**Returns** [`TelemetryStatus`](#telemetrystatus-record)--## `telemetry_set_enabled`--Turns usage telemetry on or off for this machine (`$CUA_HOME/config.toml`,-the same switch as `cua telemetry off` and the Spaces app setting). The-environment (`DO_NOT_TRACK`, `CUA_TELEMETRY`) still wins.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_set_enabled(enabled: bool) -> TelemetryStatus-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetrySetEnabled(enabled: boolean): TelemetryStatus-```--</Tab>-<Tab value="Swift">--```swift-func telemetrySetEnabled(enabled: Bool) throws -> TelemetryStatus-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun telemetrySetEnabled(enabled: Boolean): TelemetryStatus-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_set_enabled(enabled: bool) -> Result<TelemetryStatus, CuaError>-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `enabled` | `bool` | required |--**Returns** [`TelemetryStatus`](#telemetrystatus-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)--## `telemetry_show_last`--The last `limit` events queued or sent from this machine, exactly as-sent, as JSON (`[{status, payload}]`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_show_last(limit: int) -> str-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryShowLast(limit: number): string-```--</Tab>-<Tab value="Swift">--```swift-func telemetryShowLast(limit: UInt32) -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryShowLast(limit: UInt): String-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_show_last(limit: u32) -> String-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `limit` | `u32` | required |--**Returns** `String`--## `telemetry_schema_json`--Every event and property that may be sent, as JSON.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_schema_json() -> str-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetrySchemaJson(): string-```--</Tab>-<Tab value="Swift">--```swift-func telemetrySchemaJson() -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetrySchemaJson(): String-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_schema_json() -> String-```--</Tab>-</Tabs>--**Returns** `String`--## `telemetry_reset_id`--Deletes the anonymous install id and its salt.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_reset_id() -> None-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryResetId(): void-```--</Tab>-<Tab value="Swift">--```swift-func telemetryResetId() throws-```--</Tab>-<Tab value="Kotlin">--```kotlin-@Throws(CuaException::class)-fun telemetryResetId()-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_reset_id() -> Result<(), CuaError>-```--</Tab>-</Tabs>--**Raises** [`CuaError`](/cua-sdk/reference/errors)--## `StreamStatsReport` record--One stream session's aggregate stats (sampled).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `transport` | `String` | | `quic`, `webrtc`, `websocket` or `grpc`. |-| `codec` | `String` | | `h264`, `hevc`, `av1`, `vp8`, `vp9`, `jpeg` or `png`. |-| `hw_decode` / `hwDecode` | `Option<bool>` | | Hardware decode (None: not decoded here). |-| `avg_fps` / `avgFps` | `f64` | | |-| `p95_latency_ms` / `p95LatencyMs` | `Option<f64>` | | p95 input-to-present or control round trip, ms. |-| `height` | `u32` | | Stream height in pixels. |-| `duration_ms` / `durationMs` | `u64` | | |--## `TelemetryStatus` record--Telemetry state.--Returned by [`telemetry_set_enabled`](#telemetry_set_enabled), [`telemetry_status`](#telemetry_status).--| Field | Type | Default | Description |-| --- | --- | --- | --- |-| `enabled` | `bool` | | Usage events may be sent. |-| `source` | `String` | | Why (`env CUA_TELEMETRY`, `env DO_NOT_TRACK`, `config <path>`, `CI environment ...`, `default`). |-| `source_kind` / `sourceKind` | `String` | | `do_not_track`, `env`, `legacy_env`, `config`, `ci` or `default`. |-| `is_ci` / `isCi` | `bool` | | Running in CI. |-| `install_id` / `installId` | `Option<String>` | | The first 8 characters of the anonymous install id, if one exists. |-| `notice_shown` / `noticeShown` | `bool` | | The first-run notice was shown on this machine. |-| `endpoint` | `String` | | Where batches go. |-| `product` | `String` | | Which Cua program events are attributed to. |-| `envelope_json` / `envelopeJson` | `String` | | The exact properties every event carries, as JSON. |--## `telemetry_acknowledge_notice`--Records that the first-run notice was shown in the app's UI (nothing is-sent from a machine before that). Apps that show the notice themselves-call `telemetry_use_app_notice` first so the SDK does not print it.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_acknowledge_notice() -> None-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryAcknowledgeNotice(): void-```--</Tab>-<Tab value="Swift">--```swift-func telemetryAcknowledgeNotice()-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryAcknowledgeNotice()-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_acknowledge_notice()-```--</Tab>-</Tabs>--## `telemetry_flush`--Sends queued events now, waiting at most `timeout_ms`; anything left-is kept on disk for a later process.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_flush(timeout_ms: int) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryFlush(timeoutMs: number): void-```--</Tab>-<Tab value="Swift">--```swift-func telemetryFlush(timeoutMs: UInt32)-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryFlush(timeoutMs: UInt)-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_flush(timeout_ms: u32)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `timeout_ms` | `u32` | required |--## `telemetry_notice_text`--The first-run notice text (an app shows it in its own UI, then calls-`telemetry_acknowledge_notice`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_notice_text() -> str-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryNoticeText(): string-```--</Tab>-<Tab value="Swift">--```swift-func telemetryNoticeText() -> String-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryNoticeText(): String-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_notice_text() -> String-```--</Tab>-</Tabs>--**Returns** `String`--## `telemetry_record_bench_run`--Records a finished cua-bench run: the taskset (catalog name, else-`custom`), the aggregate success rate (0 to 1, bucketed), the task count-(bucketed) and the outcome (`ok`, `error`, `cancelled`).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_record_bench_run(taskset: str, success_rate: Optional[float], task_count: int, outcome: str) -> bool-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryRecordBenchRun(taskset: string, successRate: number | undefined, taskCount: bigint, outcome: string): boolean-```--</Tab>-<Tab value="Swift">--```swift-func telemetryRecordBenchRun(taskset: String, successRate: Double?, taskCount: UInt64, outcome: String) -> Bool-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryRecordBenchRun(taskset: String, successRate: Double?, taskCount: ULong, outcome: String): Boolean-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_record_bench_run(taskset: String, success_rate: Option<f64>, task_count: u64, outcome: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `taskset` | `String` | required |-| `success_rate` | `Option<f64>` | required |-| `task_count` | `u64` | required |-| `outcome` | `String` | required |--**Returns** `bool`--## `telemetry_record_feature`--Records use of a Spaces app feature (fixed names: `space_create_local`,-`teleport_drop`, ... see the docs). Returns whether it was queued;-unknown names are dropped.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_record_feature(feature: str) -> bool-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryRecordFeature(feature: string): boolean-```--</Tab>-<Tab value="Swift">--```swift-func telemetryRecordFeature(feature: String) -> Bool-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryRecordFeature(feature: String): Boolean-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_record_feature(feature: String) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `feature` | `String` | required |--**Returns** `bool`--## `telemetry_record_onboarding_step`--Records an install or onboarding funnel step (fixed names:-`onboarding_shown`, `signed_in`, `first_space_created`, ...; `first_*`-steps count once per install). Returns whether it was queued.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_record_onboarding_step(step: str, ok: bool) -> bool-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryRecordOnboardingStep(step: string, ok: boolean): boolean-```--</Tab>-<Tab value="Swift">--```swift-func telemetryRecordOnboardingStep(step: String, ok: Bool) -> Bool-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryRecordOnboardingStep(step: String, ok: Boolean): Boolean-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_record_onboarding_step(step: String, ok: bool) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `step` | `String` | required |-| `ok` | `bool` | required |--**Returns** `bool`--## `telemetry_record_stream_stats`--Records one stream session's aggregate stats (bucketed and sampled).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_record_stream_stats(stats: StreamStatsReport) -> bool-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryRecordStreamStats(stats: StreamStatsReport): boolean-```--</Tab>-<Tab value="Swift">--```swift-func telemetryRecordStreamStats(stats: StreamStatsReport) -> Bool-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryRecordStreamStats(stats: StreamStatsReport): Boolean-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_record_stream_stats(stats: StreamStatsReport) -> bool-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `stats` | [`StreamStatsReport`](#streamstatsreport-record) | required |--**Returns** `bool`--## `telemetry_set_surface`--Names the SDK surface events are attributed to. Bindings call it at-import: `sdk_python`, `sdk_typescript`, `sdk_swift`, `sdk_kotlin`;-apps pass their own product (`spaces_app`). Unknown names are ignored.--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_set_surface(surface: str, version: str) -> None-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetrySetSurface(surface: string, version: string): void-```--</Tab>-<Tab value="Swift">--```swift-func telemetrySetSurface(surface: String, version: String)-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetrySetSurface(surface: String, version: String)-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_set_surface(surface: String, version: String)-```--</Tab>-</Tabs>--| Parameter | Type | Default |-| --- | --- | --- |-| `surface` | `String` | required |-| `version` | `String` | required |--## `telemetry_use_app_notice`--The host app shows the first-run notice itself (no stderr notice).--<Tabs items={['Python', 'TypeScript', 'Swift', 'Kotlin', 'Rust']} groupId="sdk-lang" persist>-<Tab value="Python">--```python-def telemetry_use_app_notice() -> None-```--</Tab>-<Tab value="TypeScript">--```ts-function telemetryUseAppNotice(): void-```--</Tab>-<Tab value="Swift">--```swift-func telemetryUseAppNotice()-```--</Tab>-<Tab value="Kotlin">--```kotlin-fun telemetryUseAppNotice()-```--</Tab>-<Tab value="Rust">--```rust-pub fn telemetry_use_app_notice()-```--</Tab>-</Tabs>diff --git a/docs/content/docs/cua-sdk/reference/types.mdx b/docs/content/docs/cua-sdk/reference/types.mdxindex 39bf79d9ce..f965e8c1b2 100644--- a/docs/content/docs/cua-sdk/reference/types.mdx+++ b/docs/content/docs/cua-sdk/reference/types.mdx@@ -50,20 +50,18 @@ Renamed members: in Kotlin, objects implement `AutoCloseable`, whose `close()` f292 items. Methods are listed on their object.-The 783 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), [App core: billing, relay usage and Teams](/cua-sdk/reference/spaces/account-app-core#all-items), [Machines page](/cua-sdk/reference/spaces/machines-app-core), [Getting started and the command palette](/cua-sdk/reference/spaces/app-checklist-palette).-| Item | Kind | Summary || --- | --- | --- || [`agent_event_category`](/cua-sdk/reference/agents#agent_event_category) | function | The category of an event kind: `message`, `user`, `activity` or `hidden` (the rule `AgentEvent.category` and `AgentTranscript` use). || [`agent_harnesses`](/cua-sdk/reference/agents#agent_harnesses) | function | The harnesses, their readiness, installs, key variables and limits, as JSON. |-| [`AgentActionReport`](/cua-sdk/reference/spaces/agents#agentactionreport-record) | record | Result of `Space.agent_message` / `Space.agent_stop`. |+| [`AgentActionReport`](/cua-sdk/reference/spaces#agentactionreport-record) | record | Result of `Space.agent_message` / `Space.agent_stop`. || [`AgentArtifact`](/cua-sdk/reference/agents#agentartifact-record) | record | A file the run created or changed. || [`AgentDelivery`](/cua-sdk/reference/spaces/persistent-agents#agentdelivery-record) | record | What `Spaces.persistent_agent_send` did. || [`AgentEvent`](/cua-sdk/reference/agents#agentevent-record) | record | One normalized event. || [`AgentEventPage`](/cua-sdk/reference/agents#agenteventpage-record) | record | A page of events. || [`AgentFile`](/cua-sdk/reference/agents#agentfile-record) | record | A file for the first prompt or a follow-up. |-| [`AgentInfo`](/cua-sdk/reference/agent-setup#agentinfo-record) | record | One AI coding agent and what cua configured for it. |-| [`AgentMcpServer`](/cua-sdk/reference/agent-setup#agentmcpserver-record) | record | The MCP server to register. |+| [`AgentInfo`](/cua-sdk/reference/agents#agentinfo-record) | record | One AI coding agent and what cua configured for it. |+| [`AgentMcpServer`](/cua-sdk/reference/agents#agentmcpserver-record) | record | The MCP server to register. || [`AgentPauseReport`](/cua-sdk/reference/spaces/persistent-agents#agentpausereport-record) | record | What `Spaces.agent_pause` did. || [`AgentResumeReport`](/cua-sdk/reference/spaces/persistent-agents#agentresumereport-record) | record | What `Spaces.agent_resume` did. || [`AgentRun`](/cua-sdk/reference/agents#agentrun) | object | One run. |@@ -71,39 +69,39 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`AgentRunMcpServer`](/cua-sdk/reference/agents#agentrunmcpserver-record) | record | An MCP server a run's agent gets: `url` (streamable HTTP, as reachable from inside the sandbox) or `command` (stdio, run in the sandbox). || [`AgentRunOptions`](/cua-sdk/reference/agents#agentrunoptions-record) | record | Options for `Agents.run`. || [`AgentRunResult`](/cua-sdk/reference/agents#agentrunresult-record) | record | What the last turn produced. |-| [`AgentRunStatus`](/cua-sdk/reference/spaces/agents#agentrunstatus-record) | record | One agent run's status. |+| [`AgentRunStatus`](/cua-sdk/reference/spaces#agentrunstatus-record) | record | One agent run's status. || [`Agents`](/cua-sdk/reference/agents#agents) | object | Agent runs in one sandbox. |-| [`AgentSetup`](/cua-sdk/reference/agent-setup#agentsetup) | object | Agent onboarding for this machine's user. |-| [`AgentSetupChange`](/cua-sdk/reference/agent-setup#agentsetupchange-enum) | enum | What happened to one target. |-| [`AgentSetupOutcome`](/cua-sdk/reference/agent-setup#agentsetupoutcome-record) | record | One target's outcome. |-| [`AgentSetupTarget`](/cua-sdk/reference/agent-setup#agentsetuptarget-enum) | enum | What an operation touched. |-| [`AgentStartReport`](/cua-sdk/reference/spaces/agents#agentstartreport-record) | record | Result of `Space.agent_start`. |+| [`AgentSetup`](/cua-sdk/reference/agents#agentsetup) | object | Agent onboarding for this machine's user. |+| [`AgentSetupChange`](/cua-sdk/reference/agents#agentsetupchange-enum) | enum | What happened to one target. |+| [`AgentSetupOutcome`](/cua-sdk/reference/agents#agentsetupoutcome-record) | record | One target's outcome. |+| [`AgentSetupTarget`](/cua-sdk/reference/agents#agentsetuptarget-enum) | enum | What an operation touched. |+| [`AgentStartReport`](/cua-sdk/reference/spaces#agentstartreport-record) | record | Result of `Space.agent_start`. || [`AgentTranscript`](/cua-sdk/reference/agents#agenttranscript) | object | A run's events folded into conversation items, the same rule in every language: the agent's message chunks join into `message` items, the prompt is a `user` item (never repeated as agent text), and consecutive activity of one turn folds into one `activity` group. || [`AgentTranscriptItem`](/cua-sdk/reference/agents#agenttranscriptitem-record) | record | One item of an `AgentTranscript`. || [`ambiguous_sandbox_candidates`](/cua-sdk/reference/sandbox#ambiguous_sandbox_candidates) | function | The qualified candidates an `AmbiguousSandbox` message lists (empty for any other message). |-| [`AudioPacket`](/cua-sdk/reference/spacesd/media#audiopacket-record) | record | One audio packet (MEDIA.md §12.2). |-| [`AudioSink`](/cua-sdk/reference/spacesd/media#audiosink) | object | Receives audio packets. |+| [`AudioPacket`](/cua-sdk/reference/spacesd/computer#audiopacket-record) | record | One audio packet (MEDIA.md §12.2). |+| [`AudioSink`](/cua-sdk/reference/spacesd/computer#audiosink) | object | Receives audio packets. || [`Auth`](/cua-sdk/reference/auth#auth) | object | Sign-in and the shared session. || [`AuthIdentity`](/cua-sdk/reference/auth#authidentity-record) | record | Who is signed in (from token claims; display only). || [`AuthStatus`](/cua-sdk/reference/auth#authstatus-record) | record | The stored session, read without network access. || [`BuildFile`](/cua-sdk/reference/image#buildfile-record) | record | A local file copied into a built image. |-| [`BundledSkill`](/cua-sdk/reference/agent-setup#bundledskill-record) | record | A skill bundled with the SDK. |+| [`BundledSkill`](/cua-sdk/reference/agents#bundledskill-record) | record | A skill bundled with the SDK. || [`canonical_image`](/cua-sdk/reference/image#canonical_image) | function | The canonical image for `os` (`linux`, `windows`, `macos`) and `version` (`None` = default: `ghcr.io/trycua/linux:24.04`, `ghcr.io/trycua/windows:2022`, `ghcr.io/trycua/macos:26`; macOS accepts `tahoe`/`sequoia`). || [`canonical_image_tier`](/cua-sdk/reference/image#canonical_image_tier) | function | The canonical image for `os`, `version` and `tier`: `slim` (the minimum that passes `cua-spacesd doctor --strict`; CI and benchmarks use it), `full` or `None` (the default, with dev tooling) or, on macOS, `xcode` / `xcode-<X.Y>` (full plus one pinned Xcode). || [`check_placement`](/cua-sdk/reference/cua#check_placement) | function | Checks a location, kind and runtime against each other without creating anything: `InvalidPlacement` (listing the valid values) when the combination does not exist. |-| [`CloudCheck`](/cua-sdk/reference/spaces/cloud#cloudcheck-record) | record | One check `cloud_test` ran. |-| [`CloudConnected`](/cua-sdk/reference/spaces/cloud#cloudconnected-record) | record | `cloud_connect`: the connected cloud and the checks it passed. |-| [`CloudCredentials`](/cua-sdk/reference/spaces/cloud#cloudcredentials-record) | record | Where a cloud's credentials were found on this machine (never a secret). |-| [`CloudDisconnected`](/cua-sdk/reference/spaces/cloud#clouddisconnected-record) | record | `cloud_disconnect`. |-| [`CloudKind`](/cua-sdk/reference/spaces/cloud#cloudkind-record) | record | What a cloud can run for one image family, and the estimated cost. |-| [`CloudOptions`](/cua-sdk/reference/sandbox/options#cloudoptions-record) | record | Advanced options for cloud sandboxes (warm capacity, limits, TTL, a dedicated pool). |-| [`CloudProvider`](/cua-sdk/reference/spaces/cloud#cloudprovider-record) | record | One cloud as `cloud_status` lists it. |-| [`CloudResource`](/cua-sdk/reference/spaces/cloud#cloudresource-record) | record | One thing Cua created in a cloud. |-| [`CloudStatus`](/cua-sdk/reference/spaces/cloud#cloudstatus-record) | record | `cloud_status`. |-| [`CloudSweepItem`](/cua-sdk/reference/spaces/cloud#cloudsweepitem-record) | record | One row of `cloud_sweep`. |-| [`CloudSweepReport`](/cua-sdk/reference/spaces/cloud#cloudsweepreport-record) | record | `cloud_sweep`. |-| [`CloudTarget`](/cua-sdk/reference/spaces/cloud#cloudtarget-record) | record | Where in a cloud account Spaces go. |-| [`CloudTestReport`](/cua-sdk/reference/spaces/cloud#cloudtestreport-record) | record | `cloud_test`. |+| [`CloudCheck`](/cua-sdk/reference/spaces/persistent-agents#cloudcheck-record) | record | One check `cloud_test` ran. |+| [`CloudConnected`](/cua-sdk/reference/spaces/persistent-agents#cloudconnected-record) | record | `cloud_connect`: the connected cloud and the checks it passed. |+| [`CloudCredentials`](/cua-sdk/reference/spaces/persistent-agents#cloudcredentials-record) | record | Where a cloud's credentials were found on this machine (never a secret). |+| [`CloudDisconnected`](/cua-sdk/reference/spaces/persistent-agents#clouddisconnected-record) | record | `cloud_disconnect`. |+| [`CloudKind`](/cua-sdk/reference/spaces/persistent-agents#cloudkind-record) | record | What a cloud can run for one image family, and the estimated cost. |+| [`CloudOptions`](/cua-sdk/reference/image#cloudoptions-record) | record | Advanced options for cloud sandboxes (warm capacity, limits, TTL, a dedicated pool). |+| [`CloudProvider`](/cua-sdk/reference/spaces/persistent-agents#cloudprovider-record) | record | One cloud as `cloud_status` lists it. |+| [`CloudResource`](/cua-sdk/reference/spaces/persistent-agents#cloudresource-record) | record | One thing Cua created in a cloud. |+| [`CloudStatus`](/cua-sdk/reference/spaces/persistent-agents#cloudstatus-record) | record | `cloud_status`. |+| [`CloudSweepItem`](/cua-sdk/reference/spaces/persistent-agents#cloudsweepitem-record) | record | One row of `cloud_sweep`. |+| [`CloudSweepReport`](/cua-sdk/reference/spaces/persistent-agents#cloudsweepreport-record) | record | `cloud_sweep`. |+| [`CloudTarget`](/cua-sdk/reference/spaces/persistent-agents#cloudtarget-record) | record | Where in a cloud account Spaces go. |+| [`CloudTestReport`](/cua-sdk/reference/spaces/persistent-agents#cloudtestreport-record) | record | `cloud_test`. || [`ComputerGrant`](/cua-sdk/reference/spaces/persistent-agents#computergrant-record) | record | A persistent agent's grant on one of the user's computers. || [`config_get`](/cua-sdk/reference/cua#config_get) | function | One setting's effective value and source. || [`config_list`](/cua-sdk/reference/cua#config_list) | function | Every setting with its effective value and source. |@@ -111,7 +109,7 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`config_set`](/cua-sdk/reference/cua#config_set) | function | Writes a setting to the config file (checked and normalised: `default.on` takes `local`, `cloud` or a provider). || [`config_unset`](/cua-sdk/reference/cua#config_unset) | function | Removes a setting from the config file. || [`ConfigEntry`](/cua-sdk/reference/cua#configentry-record) | record | One setting's effective value. |-| [`Container`](/cua-sdk/reference/sandbox/options#container-record) | record | An extra container next to a sandbox (a compose-style sidecar), addressed by name on every runtime: the sandbox reaches it at its `name` (on its `ports`), it reaches the sandbox at `main`, and `services` may name its ports (`{"db": 5432}`). |+| [`Container`](/cua-sdk/reference/image#container-record) | record | An extra container next to a sandbox (a compose-style sidecar), addressed by name on every runtime: the sandbox reaches it at its `name` (on its `ports`), it reaches the sandbox at `main`, and `services` may name its ports (`{"db": 5432}`). || [`contrib_providers_built`](/cua-sdk/reference/sandbox#contrib_providers_built) | function | The contrib providers this build includes (empty unless built with the `contrib` feature). || [`Cua`](/cua-sdk/reference/cua#cua) | object | The entry point of the SDK: create one with `Cua::embedded` or `Cua::connect`, then reach sandboxes, Spaces and the rest through its accessors. || [`cua_sdk_version`](/cua-sdk/reference/cua#cua_sdk_version) | function | Version of the SDK library. |@@ -120,36 +118,36 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`CuaInfo`](/cua-sdk/reference/cua#cuainfo-record) | record | Identity of the SDK (and daemon, when connected). || [`CuaMode`](/cua-sdk/reference/cua#cuamode-enum) | enum | Where the SDK runtime lives. || [`CursorArt`](/cua-sdk/reference/spaces/streams#cursorart-record) | record | One cursor shape's shared art: an SVG path on a square canvas, filled with the participant's color over an outline. |-| [`DeviceEnrollment`](/cua-sdk/reference/spaces/devices#deviceenrollment-record) | record | `Devices.enroll`'s result. |-| [`Devices`](/cua-sdk/reference/spaces/devices#devices) | object | This device as a client of the signed-in account on a relay: its enrollment, the account's other devices and its audit log. |-| [`DevicesSnapshot`](/cua-sdk/reference/spaces/devices#devicessnapshot-record) | record | Everything the Devices page reads, in one call. |-| [`DoctorReport`](/cua-sdk/reference/local#doctorreport-record) | record | Doctor output. |+| [`DeviceEnrollment`](/cua-sdk/reference/spaces/host#deviceenrollment-record) | record | `Devices.enroll`'s result. |+| [`Devices`](/cua-sdk/reference/spaces/host#devices) | object | This device as a client of the signed-in account on a relay: its enrollment, the account's other devices and its audit log. |+| [`DevicesSnapshot`](/cua-sdk/reference/spaces/host#devicessnapshot-record) | record | Everything the Devices page reads, in one call. |+| [`DoctorReport`](/cua-sdk/reference/cua#doctorreport-record) | record | Doctor output. || [`DriveAccessRequest`](/cua-sdk/reference/spaces/volume#driveaccessrequest-record) | record | An agent's request for more access, waiting for the user. || [`DriveAudit`](/cua-sdk/reference/spaces/volume#driveaudit-record) | record | The newest audit events and whether the hash chain verified. || [`DriveAuditEvent`](/cua-sdk/reference/spaces/volume#driveauditevent-record) | record | One audit event. |-| [`DriveCacheStats`](/cua-sdk/reference/spaces/volume-sync#drivecachestats-record) | record | The block cache in front of a remote store. |-| [`DriveConflict`](/cua-sdk/reference/spaces/volume-sync#driveconflict-record) | record | A write that lost to a later one, kept in history and as a copy. |-| [`DriveDevice`](/cua-sdk/reference/spaces/volume-sync#drivedevice-record) | record | A device sharing the drive's bucket. |+| [`DriveCacheStats`](/cua-sdk/reference/spaces/volume#drivecachestats-record) | record | The block cache in front of a remote store. |+| [`DriveConflict`](/cua-sdk/reference/spaces/volume#driveconflict-record) | record | A write that lost to a later one, kept in history and as a copy. |+| [`DriveDevice`](/cua-sdk/reference/spaces/volume#drivedevice-record) | record | A device sharing the drive's bucket. || [`DriveEntry`](/cua-sdk/reference/spaces/volume#driveentry-record) | record | One row of a drive listing. || [`DriveFile`](/cua-sdk/reference/spaces/volume#drivefile-record) | record | A file's content and version. || [`DriveFileSync`](/cua-sdk/reference/spaces/volume#drivefilesync-record) | record | One file's sync state. || [`DriveGrant`](/cua-sdk/reference/spaces/volume#drivegrant-record) | record | A widening of an agent's or a Space's access. || [`DriveListing`](/cua-sdk/reference/spaces/volume#drivelisting-record) | record | A folder's listing. |-| [`DriveMountStatus`](/cua-sdk/reference/spaces/volume-sync#drivemountstatus-record) | record | The drive as a volume. |+| [`DriveMountStatus`](/cua-sdk/reference/spaces/volume#drivemountstatus-record) | record | The drive as a volume. || [`DriveObject`](/cua-sdk/reference/spaces/volume#driveobject-record) | record | A written version. |-| [`DrivePendingUpload`](/cua-sdk/reference/spaces/volume-sync#drivependingupload-record) | record | A file waiting to upload. |-| [`DriveS3Settings`](/cua-sdk/reference/spaces/volume-sync#drives3settings-record) | record | Where an S3-compatible bucket is (no keys). |-| [`DriveSpaceVolume`](/cua-sdk/reference/spaces/volume-sync#drivespacevolume-record) | record | The volume mounted in a Space's guest. |-| [`DriveStorage`](/cua-sdk/reference/spaces/volume-sync#drivestorage-record) | record | Where the drive keeps its bytes (Settings > Storage). |-| [`DriveStorageCheck`](/cua-sdk/reference/spaces/volume-sync#drivestoragecheck-record) | record | What a storage test found. |-| [`DriveStorageUpdate`](/cua-sdk/reference/spaces/volume-sync#drivestorageupdate-record) | record | A storage change, or with `dry_run` a connection test. |-| [`DriveSyncEvent`](/cua-sdk/reference/spaces/volume-sync#drivesyncevent-record) | record | One sync event. |-| [`DriveSyncEvents`](/cua-sdk/reference/spaces/volume-sync#drivesyncevents-record) | record | Events after a sequence number, and the sequence to ask after next. |-| [`DriveSyncStatus`](/cua-sdk/reference/spaces/volume-sync#drivesyncstatus-record) | record | Sync across devices. |+| [`DrivePendingUpload`](/cua-sdk/reference/spaces/volume#drivependingupload-record) | record | A file waiting to upload. |+| [`DriveS3Settings`](/cua-sdk/reference/spaces/volume#drives3settings-record) | record | Where an S3-compatible bucket is (no keys). |+| [`DriveSpaceVolume`](/cua-sdk/reference/spaces/volume#drivespacevolume-record) | record | The volume mounted in a Space's guest. |+| [`DriveStorage`](/cua-sdk/reference/spaces/volume#drivestorage-record) | record | Where the drive keeps its bytes (Settings > Storage). |+| [`DriveStorageCheck`](/cua-sdk/reference/spaces/volume#drivestoragecheck-record) | record | What a storage test found. |+| [`DriveStorageUpdate`](/cua-sdk/reference/spaces/volume#drivestorageupdate-record) | record | A storage change, or with `dry_run` a connection test. |+| [`DriveSyncEvent`](/cua-sdk/reference/spaces/volume#drivesyncevent-record) | record | One sync event. |+| [`DriveSyncEvents`](/cua-sdk/reference/spaces/volume#drivesyncevents-record) | record | Events after a sequence number, and the sequence to ask after next. |+| [`DriveSyncStatus`](/cua-sdk/reference/spaces/volume#drivesyncstatus-record) | record | Sync across devices. || [`DriveVersion`](/cua-sdk/reference/spaces/volume#driveversion-record) | record | One version in a file's history. || [`DriveView`](/cua-sdk/reference/spaces/volume#driveview-record) | record | Whose view of the drive a call takes: the user (the default, the whole drive) or a persistent agent in a Space. || [`error_doc_url`](/cua-sdk/reference/cua#error_doc_url) | function | A link to the errors-reference entry of a `CuaError` variant, by name (`InvalidArgument`, case-insensitive). |-| [`ExitInfo`](/cua-sdk/reference/spacesd/shell#exitinfo-record) | record | How a process ended. |+| [`ExitInfo`](/cua-sdk/reference/spacesd#exitinfo-record) | record | How a process ended. || [`FileEntry`](/cua-sdk/reference/spacesd/files#fileentry-record) | record | A file or directory in the guest. || [`Fleet`](/cua-sdk/reference/fleet#fleet) | object | Fleet control plane. || [`fleet_check_runtime`](/cua-sdk/reference/fleet/images#fleet_check_runtime) | function | `fleet_resolve_runtime` with the image variant already known (`variant` as `fleet_image_variant` returns it); `None` means the manifest could not be read (an unset runtime then falls back to the reference). |@@ -173,10 +171,10 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`FleetSignedUrl`](/cua-sdk/reference/fleet/claims#fleetsignedurl-record) | record | A signed, shareable service URL. || [`FleetSizeLimits`](/cua-sdk/reference/fleet/images#fleetsizelimits-record) | record | The everyday sizes of a cloud sandbox, which the Cua apps offer (`cua_fleet::CLOUD_DEFAULT_RANGE_CPUS`, `cua_fleet::CLOUD_DEFAULT_RANGE_MEMORY_MB`). || [`FleetUsagePricing`](/cua-sdk/reference/fleet/images#fleetusagepricing-record) | record | This account's Cua Cloud rates (`Fleet.usage_pricing`). |-| [`FrameSink`](/cua-sdk/reference/spacesd/media#framesink) | object | Receives video frames and control events. |-| [`GpuOption`](/cua-sdk/reference/spaces/create#gpuoption-record) | record | One GPU option of a runtime (see `Spaces.gpu_support`). |-| [`GpuSupport`](/cua-sdk/reference/spaces/create#gpusupport-record) | record | The GPU options of one runtime: empty, with the reason, when it has none. |-| [`GuestDisplay`](/cua-sdk/reference/sandbox/without-spacesd#guestdisplay) | object | The guest display of a sandbox without cua-spacesd (`Sandbox.guest_display`). |+| [`FrameSink`](/cua-sdk/reference/spacesd/computer#framesink) | object | Receives video frames and control events. |+| [`GpuOption`](/cua-sdk/reference/spaces#gpuoption-record) | record | One GPU option of a runtime (see `Spaces.gpu_support`). |+| [`GpuSupport`](/cua-sdk/reference/spaces#gpusupport-record) | record | The GPU options of one runtime: empty, with the reason, when it has none. |+| [`GuestDisplay`](/cua-sdk/reference/spacesd#guestdisplay) | object | The guest display of a sandbox without cua-spacesd (`Sandbox.guest_display`). || [`HomeTransfer`](/cua-sdk/reference/spaces/persistent-agents#hometransfer-record) | record | What moved between the drive and a Space. || [`Host`](/cua-sdk/reference/spaces/host#host) | object | This machine as an unattended-access host. || [`HostAccessRecord`](/cua-sdk/reference/spaces/host#hostaccessrecord-record) | record | One access to this machine. |@@ -193,9 +191,9 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`ImageFormat`](/cua-sdk/reference/spacesd/computer#imageformat-enum) | enum | Screenshot encoding. || [`ImageInfo`](/cua-sdk/reference/image#imageinfo-record) | record | The image a sandbox runs, as resolved and pinned at create time. || [`ImageLayer`](/cua-sdk/reference/image#imagelayer-enum) | enum | One image build step (as in `images.cua.ai/v1alpha1` recipes). |-| [`Local`](/cua-sdk/reference/local#local) | object | Local runtimes and images. |-| [`LocalImage`](/cua-sdk/reference/local#localimage-record) | record | A local image. |-| [`LocalStorage`](/cua-sdk/reference/local#localstorage-record) | record | What local Spaces have room for (see `Local.storage`). |+| [`Local`](/cua-sdk/reference/cua#local) | object | Local runtimes and images. |+| [`LocalImage`](/cua-sdk/reference/cua#localimage-record) | record | A local image. |+| [`LocalStorage`](/cua-sdk/reference/cua#localstorage-record) | record | What local Spaces have room for (see `Local.storage`). || [`LocationInfo`](/cua-sdk/reference/cua#locationinfo-record) | record | The locations `on` accepts: `local`, `cloud`, then registered providers. || [`locations`](/cua-sdk/reference/cua#locations) | function | Every location with the kinds and runtimes it offers (for pickers and help text). || [`LoginAttempt`](/cua-sdk/reference/auth#loginattempt) | object | A started sign-in. |@@ -205,11 +203,11 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`mcp_connect_url`](/cua-sdk/reference/services#mcp_connect_url) | function | Connects an MCP client to an endpoint URL (`http://host:8765/mcp`; a bare origin means `/mcp`) with `headers` on every request. || [`McpClient`](/cua-sdk/reference/services#mcpclient) | object | An MCP client (rmcp, streamable HTTP; protocol 2026-07-28 when the server supports it, else the server's revision). || [`McpConfig`](/cua-sdk/reference/services#mcpconfig-record) | record | Where an MCP endpoint is and what every request needs. |-| [`MediaBridge`](/cua-sdk/reference/spacesd/media#mediabridge-record) | record | A media bridge for webviews (daemon mode). |-| [`MediaEvent`](/cua-sdk/reference/spacesd/media#mediaevent-record) | record | A control message (`hello`, `session_opened`, `lifecycle`, `audio_config`, `stats`, `error`, ...) or the close of the socket (`kind = "closed"`, `json = {"code":…, "reason":…}`). |-| [`MediaOpenOptions`](/cua-sdk/reference/spacesd/media#mediaopenoptions-record) | record | Media session options. |-| [`MediaSession`](/cua-sdk/reference/spacesd/media#mediasession) | object | A live media session. |-| [`MediaStats`](/cua-sdk/reference/spacesd/media#mediastats-record) | record | Delivery counters. |+| [`MediaBridge`](/cua-sdk/reference/spacesd/computer#mediabridge-record) | record | A media bridge for webviews (daemon mode). |+| [`MediaEvent`](/cua-sdk/reference/spacesd/computer#mediaevent-record) | record | A control message (`hello`, `session_opened`, `lifecycle`, `audio_config`, `stats`, `error`, ...) or the close of the socket (`kind = "closed"`, `json = {"code":…, "reason":…}`). |+| [`MediaOpenOptions`](/cua-sdk/reference/spacesd/computer#mediaopenoptions-record) | record | Media session options. |+| [`MediaSession`](/cua-sdk/reference/spacesd/computer#mediasession) | object | A live media session. |+| [`MediaStats`](/cua-sdk/reference/spacesd/computer#mediastats-record) | record | Delivery counters. || [`normalize_image`](/cua-sdk/reference/image#normalize_image) | function | Normalises a reference like the docker CLI (`python` is `docker.io/library/python:latest`). || [`NotificationInfo`](/cua-sdk/reference/spaces/persistent-agents#notificationinfo-record) | record | One entry of the notifications feed. || [`omarchy_image`](/cua-sdk/reference/image#omarchy_image) | function | The Omarchy image, `ghcr.io/trycua/omarchy:<channel>` (default `edge`; also `rc`, `stable`): Omarchy (Arch Linux, Hyprland) with cua-spacesd, as an amd64 VM (QEMU locally, KubeVirt in the cloud; emulated on arm64 hosts). |@@ -237,29 +235,29 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`PresenceParticipant`](/cua-sdk/reference/spaces/streams#presenceparticipant-record) | record | A presence participant. || [`PresencePoint`](/cua-sdk/reference/spaces/streams#presencepoint-record) | record | A normalized point. || [`PresenceView`](/cua-sdk/reference/spaces/streams#presenceview) | object | The shared presence netcode model: who is present and what to draw, with remote cursors interpolated (render delay, Catmull-Rom, extrapolation cap), idle cursors faded, stale participants dropped and your own cursor at the local pointer (libs/cua/proto/PRESENCE.md section 4). |-| [`ProcessEvent`](/cua-sdk/reference/spacesd/shell#processevent-record) | record | One output chunk or the exit. |-| [`ProcessEventKind`](/cua-sdk/reference/spacesd/shell#processeventkind-enum) | enum | Kind of a process event. |-| [`ProcessOutput`](/cua-sdk/reference/spacesd/shell#processoutput-record) | record | Collected output of a finished process. |-| [`PtySize`](/cua-sdk/reference/spacesd/shell#ptysize-record) | record | A PTY size. |+| [`ProcessEvent`](/cua-sdk/reference/spacesd#processevent-record) | record | One output chunk or the exit. |+| [`ProcessEventKind`](/cua-sdk/reference/spacesd#processeventkind-enum) | enum | Kind of a process event. |+| [`ProcessOutput`](/cua-sdk/reference/spacesd#processoutput-record) | record | Collected output of a finished process. |+| [`PtySize`](/cua-sdk/reference/spacesd#ptysize-record) | record | A PTY size. || [`PublicUrl`](/cua-sdk/reference/services#publicurl-record) | record | A shareable URL of a sandbox service that expires. || [`qualify_sandbox_ref`](/cua-sdk/reference/sandbox#qualify_sandbox_ref) | function | Qualifies `name` for a lookup: `local = true` narrows a bare name to `local:<name>`, `false` to `cloud:<name>`, `None` keeps it (a bare name is then searched across locations). |-| [`ReadinessProbe`](/cua-sdk/reference/sandbox/options#readinessprobe-record) | record | A user-declared readiness probe. |+| [`ReadinessProbe`](/cua-sdk/reference/image#readinessprobe-record) | record | A user-declared readiness probe. || [`RegistrySecret`](/cua-sdk/reference/image#registrysecret-enum) | enum | Credentials for a private registry image. || [`Relay`](/cua-sdk/reference/spaces/host#relay) | object | The signed-in account's view of a cua-relay. |-| [`RelayAuditEvent`](/cua-sdk/reference/spaces/devices#relayauditevent-record) | record | One event of the account's audit log. |+| [`RelayAuditEvent`](/cua-sdk/reference/spaces/host#relayauditevent-record) | record | One event of the account's audit log. || [`RelayClientInfo`](/cua-sdk/reference/spaces/host#relayclientinfo-record) | record | Somebody connected to a machine through the relay. |-| [`RelayDevice`](/cua-sdk/reference/spaces/devices#relaydevice-record) | record | A client device of the account, as the relay lists it. |+| [`RelayDevice`](/cua-sdk/reference/spaces/host#relaydevice-record) | record | A client device of the account, as the relay lists it. || [`RelayMachine`](/cua-sdk/reference/spaces/host#relaymachine-record) | record | A machine of the account's relay directory (`relay:<id>`). |-| [`ReplayMode`](/cua-sdk/reference/spacesd/shell#replaymode-enum) | enum | Scrollback replay when attaching. |+| [`ReplayMode`](/cua-sdk/reference/spacesd#replaymode-enum) | enum | Scrollback replay when attaching. || [`resolve_image`](/cua-sdk/reference/image#resolve_image) | function | Resolves `reference` for `backend` (`auto`, `local`, `fleet`, `container`/`docker`/`gvisor`, `vm`/`qemu`/`kubevirt`, `lume`) on `arch` (`amd64`/`arm64`; `None` = this host, or amd64 for `fleet`). || [`resolve_image_with_secret`](/cua-sdk/reference/image#resolve_image_with_secret) | function | `resolve_image` for a private image: `secret` joins the head of the registry auth chain (it is read in this process and never cached or logged). || [`ResolvedImage`](/cua-sdk/reference/image#resolvedimage-record) | record | A reference resolved for a backend. || [`RoutineInfo`](/cua-sdk/reference/spaces/persistent-agents#routineinfo-record) | record | A routine: a recurring turn of a persistent agent, fired by the daemon. |-| [`RuntimeCheck`](/cua-sdk/reference/local#runtimecheck-record) | record | One doctor check (one backend). |-| [`RuntimeCheckStatus`](/cua-sdk/reference/local#runtimecheckstatus-enum) | enum | Status of one local runtime component. |+| [`RuntimeCheck`](/cua-sdk/reference/cua#runtimecheck-record) | record | One doctor check (one backend). |+| [`RuntimeCheckStatus`](/cua-sdk/reference/cua#runtimecheckstatus-enum) | enum | Status of one local runtime component. || [`Sandbox`](/cua-sdk/reference/sandbox#sandbox) | object | A sandbox handle. || [`sandbox_locations`](/cua-sdk/reference/sandbox#sandbox_locations) | function | Every location word `on=` accepts, in display order: `local`, `cloud`, then the contrib providers (`e2b`, `daytona`, `modal`, ...) and your own clouds (`aws`, `gcp`). |-| [`SandboxCreateOptions`](/cua-sdk/reference/sandbox/options#sandboxcreateoptions-record) | record | Options for `Sandboxes.create`. |+| [`SandboxCreateOptions`](/cua-sdk/reference/image#sandboxcreateoptions-record) | record | Options for `Sandboxes.create`. || [`Sandboxes`](/cua-sdk/reference/sandbox#sandboxes) | object | Creates, finds and manages sandboxes. || [`SandboxInfo`](/cua-sdk/reference/sandbox#sandboxinfo-record) | record | A sandbox as listed. || [`SandboxListing`](/cua-sdk/reference/sandbox#sandboxlisting-record) | record | A sandbox listing and what it left out. |@@ -271,20 +269,20 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`ScreenshotOptions`](/cua-sdk/reference/spacesd/computer#screenshotoptions-record) | record | Screenshot options. || [`Service`](/cua-sdk/reference/services#service) | object | A named service of a sandbox. || [`ServiceEndpoint`](/cua-sdk/reference/services#serviceendpoint-record) | record | Where a sandbox service is reachable from this process. |-| [`SetupStep`](/cua-sdk/reference/local#setupstep-record) | record | One setup step. |+| [`SetupStep`](/cua-sdk/reference/cua#setupstep-record) | record | One setup step. || [`SiteLoginOptions`](/cua-sdk/reference/spaces/space#siteloginoptions-record) | record | Options for `Space.request_site_login`. || [`SiteLoginReport`](/cua-sdk/reference/spaces/space#siteloginreport-record) | record | What `Space.request_site_login` did. || [`Space`](/cua-sdk/reference/spaces/space#space) | object | A connected Space. |-| [`SpaceAgentOptions`](/cua-sdk/reference/spaces/agents#spaceagentoptions-record) | record | Options for `Space.agent_start` beyond the harness and prompt. |-| [`SpaceAppIcon`](/cua-sdk/reference/spaces/windows#spaceappicon-record) | record | An app icon from `Space.app_icons`: the icon the guest desktop uses, normalized by the SDK's icon cache. |-| [`SpaceAppIconRequest`](/cua-sdk/reference/spaces/windows#spaceappiconrequest-record) | record | One window's app, for `Space.app_icons`. |+| [`SpaceAgentOptions`](/cua-sdk/reference/spaces#spaceagentoptions-record) | record | Options for `Space.agent_start` beyond the harness and prompt. |+| [`SpaceAppIcon`](/cua-sdk/reference/spaces/space#spaceappicon-record) | record | An app icon from `Space.app_icons`: the icon the guest desktop uses, normalized by the SDK's icon cache. |+| [`SpaceAppIconRequest`](/cua-sdk/reference/spaces/space#spaceappiconrequest-record) | record | One window's app, for `Space.app_icons`. || [`SpaceBashResult`](/cua-sdk/reference/spaces/space#spacebashresult-record) | record | Output of `Space.bash`. |-| [`SpaceCancelOutcome`](/cua-sdk/reference/spaces/create#spacecanceloutcome-record) | record | What `Spaces.cancel_create` did. |-| [`SpaceCreateListener`](/cua-sdk/reference/spaces/create#spacecreatelistener) | object | Receives `SpaceCreateProgress` while `Spaces.create_with_progress` runs, in order, ending with `ready`. |-| [`SpaceCreateOptions`](/cua-sdk/reference/spaces/create#spacecreateoptions-record) | record | Options for `Spaces.create`: the same location / kind / runtime model as sandboxes. |-| [`SpaceCreateProgress`](/cua-sdk/reference/spaces/create#spacecreateprogress-record) | record | What a Space create is doing (see `Spaces.create_with_progress`). |-| [`SpaceCreateResult`](/cua-sdk/reference/spaces/create#spacecreateresult-record) | record | Result of `Spaces.create`. |-| [`SpaceDisplay`](/cua-sdk/reference/spaces/windows#spacedisplay-record) | record | One of a Space's displays (`Space.displays`). |+| [`SpaceCancelOutcome`](/cua-sdk/reference/spaces#spacecanceloutcome-record) | record | What `Spaces.cancel_create` did. |+| [`SpaceCreateListener`](/cua-sdk/reference/spaces#spacecreatelistener) | object | Receives `SpaceCreateProgress` while `Spaces.create_with_progress` runs, in order, ending with `ready`. |+| [`SpaceCreateOptions`](/cua-sdk/reference/spaces#spacecreateoptions-record) | record | Options for `Spaces.create`: the same location / kind / runtime model as sandboxes. |+| [`SpaceCreateProgress`](/cua-sdk/reference/spaces#spacecreateprogress-record) | record | What a Space create is doing (see `Spaces.create_with_progress`). |+| [`SpaceCreateResult`](/cua-sdk/reference/spaces#spacecreateresult-record) | record | Result of `Spaces.create`. |+| [`SpaceDisplay`](/cua-sdk/reference/spaces/space#spacedisplay-record) | record | One of a Space's displays (`Space.displays`). || [`SpaceHotspotStatus`](/cua-sdk/reference/spaces/space#spacehotspotstatus-record) | record | Hotspot state. || [`SpaceInfo`](/cua-sdk/reference/spaces#spaceinfo-record) | record | A registered Space. || [`SpacePowerReport`](/cua-sdk/reference/spaces#spacepowerreport-record) | record | What `Spaces.stop` or `Spaces.start` did. |@@ -294,12 +292,12 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`spaces_tool_methods`](/cua-sdk/reference/spaces#spaces_tool_methods) | function | Which SDK method covers each Spaces contract tool. || [`SpacesdCapabilities`](/cua-sdk/reference/spacesd#spacesdcapabilities-record) | record | `SystemService.GetCapabilities`, summarized. || [`SpacesdClient`](/cua-sdk/reference/spacesd#spacesdclient) | object | Client for one cua-spacesd. |-| [`SpacesdCommand`](/cua-sdk/reference/spacesd/shell#spacesdcommand-record) | record | A command to run in the guest. |+| [`SpacesdCommand`](/cua-sdk/reference/spacesd#spacesdcommand-record) | record | A command to run in the guest. || [`SpacesdFeature`](/cua-sdk/reference/spacesd#spacesdfeature-record) | record | One capability flag. || [`SpacesdHttpHeader`](/cua-sdk/reference/spacesd#spacesdhttpheader-record) | record | One HTTP header (duplicates are kept in order). || [`SpacesdHttpRequest`](/cua-sdk/reference/spacesd#spacesdhttprequest-record) | record | A plain-HTTP request to the spacesd port (for example MCP at `/mcp`). || [`SpacesdHttpResponse`](/cua-sdk/reference/spacesd#spacesdhttpresponse-record) | record | The spacesd's HTTP answer. |-| [`SpacesdProcess`](/cua-sdk/reference/spacesd/shell#spacesdprocess) | object | A guest process, from `spawn` or `attach`. |+| [`SpacesdProcess`](/cua-sdk/reference/spacesd#spacesdprocess) | object | A guest process, from `spawn` or `attach`. || [`SpaceSendFileOptions`](/cua-sdk/reference/spaces/space#spacesendfileoptions-record) | record | Options for `Space.send_file`. || [`SpaceSendFileReport`](/cua-sdk/reference/spaces/space#spacesendfilereport-record) | record | Result of `Space.send_file`. || [`SpaceSentFile`](/cua-sdk/reference/spaces/space#spacesentfile-record) | record | One file placed by `Space.send_file`. |@@ -312,37 +310,37 @@ The 783 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift| [`SpaceStreamSession`](/cua-sdk/reference/spaces/streams#spacestreamsession) | object | A live Space media session (see `Space.stream_session`). || [`SpaceStreamStats`](/cua-sdk/reference/spaces/streams#spacestreamstats-record) | record | Delivery counters of a `SpaceStreamSession`. || [`SpaceStreamTicket`](/cua-sdk/reference/spaces/streams#spacestreamticket-record) | record | A minted media session. |-| [`SpaceThumbnail`](/cua-sdk/reference/spaces/windows#spacethumbnail-record) | record | A Space's latest thumbnail, from the cache every client on this machine shares (`crate.native.spaces.Space.thumbnail`). |+| [`SpaceThumbnail`](/cua-sdk/reference/spaces/space#spacethumbnail-record) | record | A Space's latest thumbnail, from the cache every client on this machine shares (`crate.native.spaces.Space.thumbnail`). || [`SpaceToolInfo`](/cua-sdk/reference/spaces/space#spacetoolinfo-record) | record | A tool of a Space's MCP service. || [`SpaceToolResult`](/cua-sdk/reference/spaces/space#spacetoolresult-record) | record | The result of a tool call (MCP content as JSON). || [`SpaceTransferReport`](/cua-sdk/reference/spaces/space#spacetransferreport-record) | record | Result of `Space.upload` / `Space.download`. |-| [`SpaceUsage`](/cua-sdk/reference/spaces/windows#spaceusage-record) | record | Memory and storage use (`Space.usage`). |+| [`SpaceUsage`](/cua-sdk/reference/spaces/space#spaceusage-record) | record | Memory and storage use (`Space.usage`). || [`SpaceWindow`](/cua-sdk/reference/spaces/space#spacewindow-record) | record | A streamable window. || [`SpaceWriteReport`](/cua-sdk/reference/spaces/space#spacewritereport-record) | record | Result of `Space.write`. |-| [`StorageVolume`](/cua-sdk/reference/local#storagevolume-record) | record | Space on the volume a local engine writes to. |-| [`StreamStatsReport`](/cua-sdk/reference/telemetry#streamstatsreport-record) | record | One stream session's aggregate stats (sampled). |-| [`telemetry_acknowledge_notice`](/cua-sdk/reference/telemetry#telemetry_acknowledge_notice) | function | Records that the first-run notice was shown in the app's UI (nothing is sent from a machine before that). |-| [`telemetry_flush`](/cua-sdk/reference/telemetry#telemetry_flush) | function | Sends queued events now, waiting at most `timeout_ms`; anything left is kept on disk for a later process. |-| [`telemetry_notice_text`](/cua-sdk/reference/telemetry#telemetry_notice_text) | function | The first-run notice text (an app shows it in its own UI, then calls `telemetry_acknowledge_notice`). |-| [`telemetry_record_bench_run`](/cua-sdk/reference/telemetry#telemetry_record_bench_run) | function | Records a finished cua-bench run: the taskset (catalog name, else `custom`), the aggregate success rate (0 to 1, bucketed), the task count (bucketed) and the outcome (`ok`, `error`, `cancelled`). |-| [`telemetry_record_feature`](/cua-sdk/reference/telemetry#telemetry_record_feature) | function | Records use of a Spaces app feature (fixed names: `space_create_local`, `teleport_drop`, ... see the docs). |-| [`telemetry_record_onboarding_step`](/cua-sdk/reference/telemetry#telemetry_record_onboarding_step) | function | Records an install or onboarding funnel step (fixed names: `onboarding_shown`, `signed_in`, `first_space_created`, ...; `first_*` steps count once per install). |-| [`telemetry_record_stream_stats`](/cua-sdk/reference/telemetry#telemetry_record_stream_stats) | function | Records one stream session's aggregate stats (bucketed and sampled). |-| [`telemetry_reset_id`](/cua-sdk/reference/telemetry#telemetry_reset_id) | function | Deletes the anonymous install id and its salt. |-| [`telemetry_schema_json`](/cua-sdk/reference/telemetry#telemetry_schema_json) | function | Every event and property that may be sent, as JSON. |-| [`telemetry_set_enabled`](/cua-sdk/reference/telemetry#telemetry_set_enabled) | function | Turns usage telemetry on or off for this machine (`$CUA_HOME/config.toml`, the same switch as `cua telemetry off` and the Spaces app setting). |-| [`telemetry_set_surface`](/cua-sdk/reference/telemetry#telemetry_set_surface) | function | Names the SDK surface events are attributed to. |-| [`telemetry_show_last`](/cua-sdk/reference/telemetry#telemetry_show_last) | function | The last `limit` events queued or sent from this machine, exactly as sent, as JSON (`[{status, payload}]`). |-| [`telemetry_status`](/cua-sdk/reference/telemetry#telemetry_status) | function | Telemetry state, and exactly what every event carries. |-| [`telemetry_use_app_notice`](/cua-sdk/reference/telemetry#telemetry_use_app_notice) | function | The host app shows the first-run notice itself (no stderr notice). |-| [`TelemetryStatus`](/cua-sdk/reference/telemetry#telemetrystatus-record) | record | Telemetry state. |-| [`TeleportApprover`](/cua-sdk/reference/spaces/teleport#teleportapprover) | object | The consent gate of `Space.teleport`: shown the manifest, returns the human's decision, or `None` to cancel. |-| [`TeleportDecision`](/cua-sdk/reference/spaces/teleport#teleportdecision-record) | record | A human's answer to a teleport manifest. |-| [`TeleportItem`](/cua-sdk/reference/spaces/teleport#teleportitem-record) | record | One item a teleport would move. |-| [`TeleportManifest`](/cua-sdk/reference/spaces/teleport#teleportmanifest-record) | record | Exactly what would leave this machine. |-| [`TeleportReceipt`](/cua-sdk/reference/spaces/teleport#teleportreceipt-record) | record | What a teleport moved, or how to retry a pending Keyvault approval. |+| [`StorageVolume`](/cua-sdk/reference/cua#storagevolume-record) | record | Space on the volume a local engine writes to. |+| [`StreamStatsReport`](/cua-sdk/reference/auth#streamstatsreport-record) | record | One stream session's aggregate stats (sampled). |+| [`telemetry_acknowledge_notice`](/cua-sdk/reference/auth#telemetry_acknowledge_notice) | function | Records that the first-run notice was shown in the app's UI (nothing is sent from a machine before that). |+| [`telemetry_flush`](/cua-sdk/reference/auth#telemetry_flush) | function | Sends queued events now, waiting at most `timeout_ms`; anything left is kept on disk for a later process. |+| [`telemetry_notice_text`](/cua-sdk/reference/auth#telemetry_notice_text) | function | The first-run notice text (an app shows it in its own UI, then calls `telemetry_acknowledge_notice`). |+| [`telemetry_record_bench_run`](/cua-sdk/reference/auth#telemetry_record_bench_run) | function | Records a finished cua-bench run: the taskset (catalog name, else `custom`), the aggregate success rate (0 to 1, bucketed), the task count (bucketed) and the outcome (`ok`, `error`, `cancelled`). |+| [`telemetry_record_feature`](/cua-sdk/reference/auth#telemetry_record_feature) | function | Records use of a Spaces app feature (fixed names: `space_create_local`, `teleport_drop`, ... see the docs). |+| [`telemetry_record_onboarding_step`](/cua-sdk/reference/auth#telemetry_record_onboarding_step) | function | Records an install or onboarding funnel step (fixed names: `onboarding_shown`, `signed_in`, `first_space_created`, ...; `first_*` steps count once per install). |+| [`telemetry_record_stream_stats`](/cua-sdk/reference/auth#telemetry_record_stream_stats) | function | Records one stream session's aggregate stats (bucketed and sampled). |+| [`telemetry_reset_id`](/cua-sdk/reference/auth#telemetry_reset_id) | function | Deletes the anonymous install id and its salt. |+| [`telemetry_schema_json`](/cua-sdk/reference/auth#telemetry_schema_json) | function | Every event and property that may be sent, as JSON. |+| [`telemetry_set_enabled`](/cua-sdk/reference/auth#telemetry_set_enabled) | function | Turns usage telemetry on or off for this machine (`$CUA_HOME/config.toml`, the same switch as `cua telemetry off` and the Spaces app setting). |+| [`telemetry_set_surface`](/cua-sdk/reference/auth#telemetry_set_surface) | function | Names the SDK surface events are attributed to. |+| [`telemetry_show_last`](/cua-sdk/reference/auth#telemetry_show_last) | function | The last `limit` events queued or sent from this machine, exactly as sent, as JSON (`[{status, payload}]`). |+| [`telemetry_status`](/cua-sdk/reference/auth#telemetry_status) | function | Telemetry state, and exactly what every event carries. |+| [`telemetry_use_app_notice`](/cua-sdk/reference/auth#telemetry_use_app_notice) | function | The host app shows the first-run notice itself (no stderr notice). |+| [`TelemetryStatus`](/cua-sdk/reference/auth#telemetrystatus-record) | record | Telemetry state. |+| [`TeleportApprover`](/cua-sdk/reference/spaces/space#teleportapprover) | object | The consent gate of `Space.teleport`: shown the manifest, returns the human's decision, or `None` to cancel. |+| [`TeleportDecision`](/cua-sdk/reference/spaces/space#teleportdecision-record) | record | A human's answer to a teleport manifest. |+| [`TeleportItem`](/cua-sdk/reference/spaces/space#teleportitem-record) | record | One item a teleport would move. |+| [`TeleportManifest`](/cua-sdk/reference/spaces/space#teleportmanifest-record) | record | Exactly what would leave this machine. |+| [`TeleportReceipt`](/cua-sdk/reference/spaces/space#teleportreceipt-record) | record | What a teleport moved, or how to retry a pending Keyvault approval. || [`TransferResult`](/cua-sdk/reference/spacesd/files#transferresult-record) | record | Result of an upload or download. || [`UploadOptions`](/cua-sdk/reference/spacesd/files#uploadoptions-record) | record | Upload options. |-| [`VideoFrame`](/cua-sdk/reference/spacesd/media#videoframe-record) | record | One encoded video access unit. |+| [`VideoFrame`](/cua-sdk/reference/spacesd/computer#videoframe-record) | record | One encoded video access unit. || [`ViewerLink`](/cua-sdk/reference/sandbox#viewerlink-record) | record | A link to the sandbox desktop in the cua-spacesd HTML5 viewer. || [`ViewerOptions`](/cua-sdk/reference/sandbox#vieweroptions-record) | record | Options for `Sandbox.viewer_url`. |diff --git a/docs/content/docs/cua-sdk/reference/typescript/index.mdx b/docs/content/docs/cua-sdk/reference/typescript/index.mdxindex 028016d02b..3f07c6a0a0 100644--- a/docs/content/docs/cua-sdk/reference/typescript/index.mdx+++ b/docs/content/docs/cua-sdk/reference/typescript/index.mdx@@ -1,16 +1,16 @@---title: "TypeScript additions"-description: "The hand-written helpers of @trycua/cua: embedded, connect, Image, probes, sidecars, specs and MCP."+description: "The hand-written helpers of @trycua/cua (embedded, connect, Image, probes, sidecars, specs, MCP), and the Spaces transport and host modules."---{/*AUTO-GENERATED FILE - DO NOT EDIT DIRECTLYGenerated by: pnpm --dir docs docs:generate:cua-sdk-ts- Source: typedoc + typedoc-plugin-markdown over libs/cua/typescript/src/index.ts+ Source: typedoc + typedoc-plugin-markdown over libs/cua/typescript/src/index.ts, libs/cua/typescript/src/spaces/transport/index.ts, libs/cua/typescript/src/spaces/host.tsVersion: @trycua/cua 0.5.0*/}-Import from `@trycua/cua`. This page covers the hand-written TypeScript layer; the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per object in the [Cua SDK reference](/cua-sdk/reference).+Import from `@trycua/cua`. This page covers the hand-written TypeScript layer; the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per module in the [Cua SDK reference](/cua-sdk/reference).`npm install @trycua/cua` (0.5.0) installs the Node package; native code ships as per-platform optional packages (`@trycua/cua-darwin-arm64`, `@trycua/cua-linux-x64-gnu`, ...).@@ -385,3 +385,1127 @@ Ready once a TCP connect to the declared `service` succeeds.#### Returns`ReadinessProbe`++## @trycua/cua/spaces/transport++Import from `@trycua/cua/spaces/transport`. MCP-over-HTTP and Tauri transports for Spaces in webviews and browsers.++## Classes++### McpHttpTransport++The one interface a host has to implement.++Implementations must:+- resolve the reply whose `id` matches the request's, and not some other+ reply that happened to arrive first;+- resolve `null` for a notification;+- reject every in-flight call if the peer dies, rather than leaving callers+ hanging on a reply that is never coming;+- be safe to call again after `close()`, either by restarting or by+ rejecting clearly.++#### Implements++- [`Transport`](#transport)++#### Constructors++##### Constructor++```ts+new McpHttpTransport(options): McpHttpTransport;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `options` | [`McpHttpOptions`](#mcphttpoptions) |++###### Returns++[`McpHttpTransport`](#mcphttptransport)++#### Properties++| Property | Modifier | Type | Default value | Description |+| ------ | ------ | ------ | ------ | ------ |+| <a id="property-kind"></a> `kind` | `readonly` | `"http"` | `"http"` | A short name for diagnostics: `"stdio"`, `"tauri"`. |++#### Accessors++##### sessionId++###### Get Signature++```ts+get sessionId(): string | undefined;+```++The session id the daemon minted, once initialized.++###### Returns++`string` \| `undefined`++#### Methods++##### close()++```ts+close(): Promise<void>;+```++Ends the MCP session (`DELETE /mcp`). Never throws.++###### Returns++`Promise`\<`void`\>++###### Implementation of++[`Transport`](#transport).[`close`](#close-3)++##### send()++```ts+send(message, options?): Promise<RpcResponse | null>;+```++Send one message; resolve its reply, or `null` for a notification.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `message` | [`RpcOutgoing`](#rpcoutgoing) |+| `options` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`RpcResponse`](#rpcresponse) \| `null`\>++###### Implementation of++[`Transport`](#transport).[`send`](#send-2)++***++### McpSession++#### Constructors++##### Constructor++```ts+new McpSession(transport, options?): McpSession;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `transport` | [`Transport`](#transport) |+| `options` | [`SessionOptions`](#sessionoptions) |++###### Returns++[`McpSession`](#mcpsession)++#### Properties++| Property | Modifier | Type |+| ------ | ------ | ------ |+| <a id="property-transport"></a> `transport` | `readonly` | [`Transport`](#transport) |++#### Methods++##### call()++```ts+call(+ name,+ args?,+ options?+): Promise<ContentPart[]>;+```++Call a tool, throwing [ToolError](#toolerror) if it failed.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `name` | `string` |+| `args` | `Record`\<`string`, [`Json`](#json)\> |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`ContentPart`](#contentpart)[]\>++##### callJson()++```ts+callJson<T>(+ name,+ args?,+ options?+): Promise<T>;+```++Call a tool whose text part is JSON, and parse it.++Worth its own method because the parse failure needs to say which tool+produced the unparsable text: without that, a server-side format change+surfaces as a bare `SyntaxError` with no attribution.++###### Type Parameters++| Type Parameter | Default type |+| ------ | ------ |+| `T` | [`Json`](#json) |++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `name` | `string` |+| `args` | `Record`\<`string`, [`Json`](#json)\> |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<`T`\>++##### callRaw()++```ts+callRaw(+ name,+ args?,+ options?+): Promise<ToolResult>;+```++Call a tool and return its envelope, including a failure.++Use this when a caller wants to inspect `isError` itself: for instance a+probe that treats "not available" as an answer rather than an exception.+Most callers want [call](#call).++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `name` | `string` |+| `args` | `Record`\<`string`, [`Json`](#json)\> |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`ToolResult`](#toolresult)\>++##### callText()++```ts+callText(+ name,+ args?,+ options?+): Promise<string>;+```++Call a tool and return its text parts joined: the common case, since+most of these tools answer with one text part.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `name` | `string` |+| `args` | `Record`\<`string`, [`Json`](#json)\> |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<`string`\>++##### close()++```ts+close(): Promise<void>;+```++###### Returns++`Promise`\<`void`\>++##### initialize()++```ts+initialize(options?): Promise<ServerInfo | undefined>;+```++Perform the MCP handshake, at most once per session.++The server does not require this: it builds its dispatch table before the+read loop starts, so `tools/call` works cold. We do it anyway, and we+memoize it: it is what makes this session usable against a *conforming*+MCP server rather than only against this one, and the cost is a single+round trip.++The result is cached as a promise, not a value, so concurrent first calls+share one handshake instead of racing two.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`ServerInfo`](#serverinfo) \| `undefined`\>++##### listTools()++```ts+listTools(options?): Promise<ToolDescriptor[]>;+```++Every tool the server serves, with its input schema.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`ToolDescriptor`](#tooldescriptor)[]\>++***++### TauriTransport++The one interface a host has to implement.++Implementations must:+- resolve the reply whose `id` matches the request's, and not some other+ reply that happened to arrive first;+- resolve `null` for a notification;+- reject every in-flight call if the peer dies, rather than leaving callers+ hanging on a reply that is never coming;+- be safe to call again after `close()`, either by restarting or by+ rejecting clearly.++#### Implements++- [`Transport`](#transport)++#### Constructors++##### Constructor++```ts+new TauriTransport(options): TauriTransport;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `options` | [`TauriOptions`](#taurioptions) |++###### Returns++[`TauriTransport`](#tauritransport)++#### Properties++| Property | Modifier | Type | Default value | Description |+| ------ | ------ | ------ | ------ | ------ |+| <a id="property-kind-1"></a> `kind` | `readonly` | `"tauri"` | `"tauri"` | A short name for diagnostics: `"stdio"`, `"tauri"`. |++#### Methods++##### close()++```ts+close(): Promise<void>;+```++Ask the bridge to close the server's stdin.++A failure here is swallowed: the transport is being torn down, the app may+already be quitting, and turning "could not reach the bridge while closing"+into an exception makes shutdown paths fragile for no gain.++###### Returns++`Promise`\<`void`\>++###### Implementation of++[`Transport`](#transport).[`close`](#close-3)++##### send()++```ts+send(message, options?): Promise<RpcResponse | null>;+```++Send one message; resolve its reply, or `null` for a notification.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `message` | [`RpcOutgoing`](#rpcoutgoing) |+| `options` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`RpcResponse`](#rpcresponse) \| `null`\>++###### Implementation of++[`Transport`](#transport).[`send`](#send-2)++***++### ToolError++A tool that ran and failed.++This is a separate type from [TransportError](#transporterror) on purpose. The server+reports a failing tool as a *successful* JSON-RPC response carrying+`isError: true`; the only JSON-RPC `error` objects it ever sends are+`-32601` for an unknown method or tool. Collapsing the two would make+"the sandbox refused this command" indistinguishable from "the control+plane is not running", and those need different handling by every caller.++#### Extends++- `Error`++#### Constructors++##### Constructor++```ts+new ToolError(+ tool,+ content,+ structured?+): ToolError;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `tool` | `string` |+| `content` | [`ContentPart`](#contentpart)[] |+| `structured?` | [`Json`](#json) |++###### Returns++[`ToolError`](#toolerror)++###### Overrides++```ts+Error.constructor+```++#### Properties++| Property | Modifier | Type | Default value | Description |+| ------ | ------ | ------ | ------ | ------ |+| <a id="property-content"></a> `content` | `readonly` | [`ContentPart`](#contentpart)[] | `undefined` | - |+| <a id="property-kind-2"></a> `kind` | `readonly` | `string` \| `undefined` | `undefined` | The server's stable error kind (`capability_missing`, `teleport_refused`, `not_found`, ...), when it sent one. |+| <a id="property-tag"></a> `tag` | `readonly` | `"ToolError"` | `"ToolError"` | - |+| <a id="property-tool"></a> `tool` | `readonly` | `string` | `undefined` | - |++***++### TransportError++Thrown for anything that goes wrong beneath the tool call: a dead peer, a+timeout, a JSON-RPC `error` object. A failing *tool* is not this: see+`ToolError`, because this server reports tool failure as a successful+response carrying `isError: true`.++#### Extends++- `Error`++#### Constructors++##### Constructor++```ts+new TransportError(message, code?): TransportError;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `message` | `string` |+| `code?` | `number` |++###### Returns++[`TransportError`](#transporterror)++###### Overrides++```ts+Error.constructor+```++#### Properties++| Property | Modifier | Type | Default value |+| ------ | ------ | ------ | ------ |+| <a id="property-code"></a> `code` | `readonly` | `number` \| `undefined` | `undefined` |+| <a id="property-tag-1"></a> `tag` | `readonly` | `"TransportError"` | `"TransportError"` |++## Interfaces++### ClientInfo++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-name"></a> `name` | `string` |+| <a id="property-version"></a> `version` | `string` |++***++### ContentPart++One part of a tool result. `call_tool` passes through `image`,+`audio` and `resource` parts from an in-space tool unchanged, so this is not+only ever text.++#### Indexable++```ts+[key: string]: Json | undefined+```++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-text"></a> `text?` | `string` |+| <a id="property-type"></a> `type` | `string` |++***++### McpHttpOptions++#### Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-fetch"></a> `fetch?` | [`FetchFn`](#fetchfn) | Inject a fetch (tests, a Tauri HTTP plugin). Defaults to `globalThis.fetch`. |+| <a id="property-token"></a> `token?` | `string` | The daemon's loopback bearer token. |+| <a id="property-url"></a> `url` | `string` | Daemon loopback base URL (`http://127.0.0.1:<port>`) or the full `/mcp` URL. |++***++### RpcError++`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that+cannot load the native binding (a Tauri webview, a browser).++Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces+server over any `Transport`:++- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,+ bearer = the daemon's loopback token);+- `TauriTransport`: `invoke()` into the Tauri app's Rust side.++Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See+`types.ts` for why the seam exchanges whole JSON-RPC messages rather than+bytes.++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-code-1"></a> `code` | `number` |+| <a id="property-data"></a> `data?` | [`Json`](#json) |+| <a id="property-message"></a> `message` | `string` |++***++### RpcNotification++A message with no `id`. It gets no reply, and a transport must resolve+`null` for it rather than inventing one.++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-jsonrpc"></a> `jsonrpc` | `"2.0"` |+| <a id="property-method"></a> `method` | `string` |+| <a id="property-params"></a> `params?` | [`Json`](#json) |++***++### RpcRequest++`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that+cannot load the native binding (a Tauri webview, a browser).++Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces+server over any `Transport`:++- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,+ bearer = the daemon's loopback token);+- `TauriTransport`: `invoke()` into the Tauri app's Rust side.++Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See+`types.ts` for why the seam exchanges whole JSON-RPC messages rather than+bytes.++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-id"></a> `id` | [`RpcId`](#rpcid) |+| <a id="property-jsonrpc-1"></a> `jsonrpc` | `"2.0"` |+| <a id="property-method-1"></a> `method` | `string` |+| <a id="property-params-1"></a> `params?` | [`Json`](#json) |++***++### RpcResponse++`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that+cannot load the native binding (a Tauri webview, a browser).++Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces+server over any `Transport`:++- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,+ bearer = the daemon's loopback token);+- `TauriTransport`: `invoke()` into the Tauri app's Rust side.++Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See+`types.ts` for why the seam exchanges whole JSON-RPC messages rather than+bytes.++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-error"></a> `error?` | [`RpcError`](#rpcerror) |+| <a id="property-id-1"></a> `id` | [`RpcId`](#rpcid) |+| <a id="property-jsonrpc-2"></a> `jsonrpc` | `"2.0"` |+| <a id="property-result"></a> `result?` | [`Json`](#json) |++***++### SendOptions++`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that+cannot load the native binding (a Tauri webview, a browser).++Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces+server over any `Transport`:++- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,+ bearer = the daemon's loopback token);+- `TauriTransport`: `invoke()` into the Tauri app's Rust side.++Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See+`types.ts` for why the seam exchanges whole JSON-RPC messages rather than+bytes.++#### Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-signal"></a> `signal?` | `AbortSignal` | Aborts the wait. A transport should still expect the server to finish the work: this server has no `notifications/cancelled` handling, so aborting abandons the reply rather than stopping the call. |+| <a id="property-timeoutseconds"></a> `timeoutSeconds?` | `number` | Seconds to wait for a reply. The default is deliberately long. `teleport_app` and provisioning run with `timeout=900` server-side, and the agent-CLI registration this server ships with sets `requestTimeoutMs: 900000`. A transport that imposed a short deadline would silently break the app's slowest and most valuable operations, so a conformer must not shorten this on its own initiative. |++***++### ServerInfo++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-name-1"></a> `name` | `string` |+| <a id="property-version-1"></a> `version` | `string` |++***++### SessionOptions++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-clientinfo"></a> `clientInfo?` | [`ClientInfo`](#clientinfo) |++***++### TauriOptions++#### Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-invoke"></a> `invoke` | [`InvokeFn`](#invokefn) | Usually `(await import("@tauri-apps/api/core")).invoke`. |+| <a id="property-requestcommand"></a> `requestCommand?` | `string` | The Rust command name (default `spaces_mcp_request`). |+| <a id="property-shutdowncommand"></a> `shutdownCommand?` | `string` | The Rust command that ends the session (default `spaces_mcp_shutdown`). |++***++### ToolDescriptor++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-description"></a> `description?` | `string` |+| <a id="property-inputschema"></a> `inputSchema?` | [`Json`](#json) |+| <a id="property-name-2"></a> `name` | `string` |++***++### ToolResult++#### Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-content-1"></a> `content` | [`ContentPart`](#contentpart)[] | - |+| <a id="property-iserror"></a> `isError` | `boolean` | - |+| <a id="property-structured"></a> `structured?` | [`Json`](#json) | `structuredContent`, when the tool returned one (tool errors carry `{error: {kind, message}}` with a stable `kind`). |++***++### Transport++The one interface a host has to implement.++Implementations must:+- resolve the reply whose `id` matches the request's, and not some other+ reply that happened to arrive first;+- resolve `null` for a notification;+- reject every in-flight call if the peer dies, rather than leaving callers+ hanging on a reply that is never coming;+- be safe to call again after `close()`, either by restarting or by+ rejecting clearly.++#### Properties++| Property | Modifier | Type | Description |+| ------ | ------ | ------ | ------ |+| <a id="property-kind-3"></a> `kind` | `readonly` | `string` | A short name for diagnostics: `"stdio"`, `"tauri"`. |++#### Methods++##### close()++```ts+close(): Promise<void>;+```++Release the peer. Idempotent.++###### Returns++`Promise`\<`void`\>++##### send()++```ts+send(message, options?): Promise<RpcResponse | null>;+```++Send one message; resolve its reply, or `null` for a notification.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `message` | [`RpcOutgoing`](#rpcoutgoing) |+| `options?` | [`SendOptions`](#sendoptions) |++###### Returns++`Promise`\<[`RpcResponse`](#rpcresponse) \| `null`\>++## Type Aliases++### FetchFn++```ts+type FetchFn = (input, init) => Promise<{+ headers: {+ get: string | null;+ };+ ok: boolean;+ status: number;+ text: Promise<string>;+}>;+```++The `fetch` shape this needs (the global one, or an injected fake).++#### Parameters++| Parameter | Type |+| ------ | ------ |+| `input` | `string` |+| `init` | \{ `body?`: `string`; `headers`: `Record`\<`string`, `string`\>; `method`: `string`; `signal?`: `AbortSignal`; \} |+| `init.body?` | `string` |+| `init.headers` | `Record`\<`string`, `string`\> |+| `init.method` | `string` |+| `init.signal?` | `AbortSignal` |++#### Returns++`Promise`\<\{+ `headers`: \{+ `get`: `string` \| `null`;+ \};+ `ok`: `boolean`;+ `status`: `number`;+ `text`: `Promise`\<`string`\>;+\}\>++***++### InvokeFn++```ts+type InvokeFn = <T>(command, args?) => Promise<T>;+```++The shape of Tauri's `invoke`, narrowed to what this needs.++#### Type Parameters++| Type Parameter |+| ------ |+| `T` |++#### Parameters++| Parameter | Type |+| ------ | ------ |+| `command` | `string` |+| `args?` | `Record`\<`string`, `unknown`\> |++#### Returns++`Promise`\<`T`\>++***++### Json++```ts+type Json =+ | null+ | boolean+ | number+ | string+ | Json[]+ | {+[key: string]: Json;+};+```++A JSON value, as it crosses the wire.++***++### RpcId++```ts+type RpcId = number | string;+```++JSON-RPC 2.0 ids: this SDK only ever sends numbers, but a reply echoes+whatever it was given, and a conforming peer may use a string.++***++### RpcOutgoing++```ts+type RpcOutgoing = RpcRequest | RpcNotification;+```++`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that+cannot load the native binding (a Tauri webview, a browser).++Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces+server over any `Transport`:++- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,+ bearer = the daemon's loopback token);+- `TauriTransport`: `invoke()` into the Tauri app's Rust side.++Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See+`types.ts` for why the seam exchanges whole JSON-RPC messages rather than+bytes.++## Variables++### DEFAULT_REQUEST_COMMAND++```ts+const DEFAULT_REQUEST_COMMAND: "spaces_mcp_request" = "spaces_mcp_request";+```++***++### DEFAULT_SHUTDOWN_COMMAND++```ts+const DEFAULT_SHUTDOWN_COMMAND: "spaces_mcp_shutdown" = "spaces_mcp_shutdown";+```++***++### PROTOCOL_VERSION++```ts+const PROTOCOL_VERSION: "2025-06-18" = "2025-06-18";+```++The MCP revision offered. The Rust server accepts 2025-06-18, 2025-03-26+and 2024-11-05, and answers with the one it picked.++***++### SESSION_HEADER++```ts+const SESSION_HEADER: "mcp-session-id" = "mcp-session-id";+```++## Functions++### textOf()++```ts+function textOf(content): string;+```++Concatenate the text parts, which is what almost every caller wants.++#### Parameters++| Parameter | Type |+| ------ | ------ |+| `content` | [`ContentPart`](#contentpart)[] |++#### Returns++`string`++## @trycua/cua/spaces/host++Import from `@trycua/cua/spaces/host`. The @trycua/cua/spaces/host helpers for hosting a Space from Node.++## Classes++### HostPresentation++#### Constructors++##### Constructor++```ts+new HostPresentation(options?): HostPresentation;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `options` | [`HostPresentationOptions`](#hostpresentationoptions) |++###### Returns++[`HostPresentation`](#hostpresentation)++#### Methods++##### available()++```ts+available(): Promise<boolean>;+```++Is the desktop app reachable right now?++###### Returns++`Promise`\<`boolean`\>++##### openViewer()++```ts+openViewer(spaceId): Promise<void>;+```++Open the full viewer window for a Local Space.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `spaceId` | `string` |++###### Returns++`Promise`\<`void`\>++##### pin()++```ts+pin(spaceId): Promise<void>;+```++Pin a Local Space as picture-in-picture on this Mac's desktop.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `spaceId` | `string` |++###### Returns++`Promise`\<`void`\>++##### streamWindow()++```ts+streamWindow(input): Promise<void>;+```++Stream one window of a Local Space back to a bidirectional window here.++`rcdpToken` must be read fresh: a Local Space's rcdp token rotates on every+rcdpd restart, so a cached one silently stops working.++`replica: true` opens an *additional* stream for the same target rather+than focusing the existing one. Note the real limit: only one page per app+can hardware-decode H.264, so a second concurrent stream falls back to an+uncompressed codec and is visibly heavier.++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `input` | \{ `appName?`: `string`; `rcdpToken`: `string`; `replica?`: `boolean`; `spaceId`: `string`; `title?`: `string`; `windowId`: `string`; \} |+| `input.appName?` | `string` |+| `input.rcdpToken` | `string` |+| `input.replica?` | `boolean` |+| `input.spaceId` | `string` |+| `input.title?` | `string` |+| `input.windowId` | `string` |++###### Returns++`Promise`\<`void`\>++##### unpin()++```ts+unpin(spaceId): Promise<void>;+```++###### Parameters++| Parameter | Type |+| ------ | ------ |+| `spaceId` | `string` |++###### Returns++`Promise`\<`void`\>++## Interfaces++### ControlEndpoint++#### Properties++| Property | Type |+| ------ | ------ |+| <a id="property-port"></a> `port` | `number` |+| <a id="property-token"></a> `token` | `string` |++***++### HostPresentationOptions++#### Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-controlfile"></a> `controlFile?` | `string` | Override the discovery file. Mostly for tests. |+| <a id="property-fetch"></a> `fetch?` | (`input`, `init?`) => `Promise`\<`Response`\> | Inject a fetch (tests, or a different agent). |++## Functions++### cuaHome()++```ts+function cuaHome(home, env?): string;+```++`$CUA_HOME` when set and non-empty, else `~/.cua` (the Rust core's rule).++#### Parameters++| Parameter | Type |+| ------ | ------ |+| `home` | `string` |+| `env` | `Record`\<`string`, `string` \| `undefined`\> |++#### Returns++`string`++***++### readControlEndpoint()++```ts+function readControlEndpoint(controlFile?): Promise<ControlEndpoint>;+```++Read `{port, token}` from the app's control file.++#### Parameters++| Parameter | Type |+| ------ | ------ |+| `controlFile?` | `string` |++#### Returns++`Promise`\<[`ControlEndpoint`](#controlendpoint)\>diff --git a/docs/content/docs/cua-sdk/reference/typescript/meta.json b/docs/content/docs/cua-sdk/reference/typescript/meta.jsonindex 18e531d39d..14b925c529 100644--- a/docs/content/docs/cua-sdk/reference/typescript/meta.json+++ b/docs/content/docs/cua-sdk/reference/typescript/meta.json@@ -1,8 +1,6 @@{"title": "TypeScript additions","pages": [- "spaces",- "spaces-transport",- "spaces-host"+ "spaces"]}diff --git a/docs/content/docs/cua-sdk/reference/typescript/spaces-host.mdx b/docs/content/docs/cua-sdk/reference/typescript/spaces-host.mdxdeleted file mode 100644index dd198a29ac..0000000000--- a/docs/content/docs/cua-sdk/reference/typescript/spaces-host.mdx+++ /dev/null@@ -1,196 +0,0 @@-----title: "Spaces host (TypeScript)"-description: "The @trycua/cua/spaces/host helpers for hosting a Space from Node."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk-ts- Source: typedoc + typedoc-plugin-markdown over libs/cua/typescript/src/spaces/host.ts- Version: @trycua/cua 0.5.0-*/}--Import from `@trycua/cua/spaces/host`. This page covers the hand-written TypeScript layer; the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per object in the [Cua SDK reference](/cua-sdk/reference).--## Classes--### HostPresentation--#### Constructors--##### Constructor--```ts-new HostPresentation(options?): HostPresentation;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `options` | [`HostPresentationOptions`](#hostpresentationoptions) |--###### Returns--[`HostPresentation`](#hostpresentation)--#### Methods--##### available()--```ts-available(): Promise<boolean>;-```--Is the desktop app reachable right now?--###### Returns--`Promise`\<`boolean`\>--##### openViewer()--```ts-openViewer(spaceId): Promise<void>;-```--Open the full viewer window for a Local Space.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `spaceId` | `string` |--###### Returns--`Promise`\<`void`\>--##### pin()--```ts-pin(spaceId): Promise<void>;-```--Pin a Local Space as picture-in-picture on this Mac's desktop.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `spaceId` | `string` |--###### Returns--`Promise`\<`void`\>--##### streamWindow()--```ts-streamWindow(input): Promise<void>;-```--Stream one window of a Local Space back to a bidirectional window here.--`rcdpToken` must be read fresh: a Local Space's rcdp token rotates on every-rcdpd restart, so a cached one silently stops working.--`replica: true` opens an *additional* stream for the same target rather-than focusing the existing one. Note the real limit: only one page per app-can hardware-decode H.264, so a second concurrent stream falls back to an-uncompressed codec and is visibly heavier.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `input` | \{ `appName?`: `string`; `rcdpToken`: `string`; `replica?`: `boolean`; `spaceId`: `string`; `title?`: `string`; `windowId`: `string`; \} |-| `input.appName?` | `string` |-| `input.rcdpToken` | `string` |-| `input.replica?` | `boolean` |-| `input.spaceId` | `string` |-| `input.title?` | `string` |-| `input.windowId` | `string` |--###### Returns--`Promise`\<`void`\>--##### unpin()--```ts-unpin(spaceId): Promise<void>;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `spaceId` | `string` |--###### Returns--`Promise`\<`void`\>--## Interfaces--### ControlEndpoint--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-port"></a> `port` | `number` |-| <a id="property-token"></a> `token` | `string` |--***--### HostPresentationOptions--#### Properties--| Property | Type | Description |-| ------ | ------ | ------ |-| <a id="property-controlfile"></a> `controlFile?` | `string` | Override the discovery file. Mostly for tests. |-| <a id="property-fetch"></a> `fetch?` | (`input`, `init?`) => `Promise`\<`Response`\> | Inject a fetch (tests, or a different agent). |--## Functions--### cuaHome()--```ts-function cuaHome(home, env?): string;-```--`$CUA_HOME` when set and non-empty, else `~/.cua` (the Rust core's rule).--#### Parameters--| Parameter | Type |-| ------ | ------ |-| `home` | `string` |-| `env` | `Record`\<`string`, `string` \| `undefined`\> |--#### Returns--`string`--***--### readControlEndpoint()--```ts-function readControlEndpoint(controlFile?): Promise<ControlEndpoint>;-```--Read `{port, token}` from the app's control file.--#### Parameters--| Parameter | Type |-| ------ | ------ |-| `controlFile?` | `string` |--#### Returns--`Promise`\<[`ControlEndpoint`](#controlendpoint)\>diff --git a/docs/content/docs/cua-sdk/reference/typescript/spaces-transport.mdx b/docs/content/docs/cua-sdk/reference/typescript/spaces-transport.mdxdeleted file mode 100644index df15ab3b3d..0000000000--- a/docs/content/docs/cua-sdk/reference/typescript/spaces-transport.mdx+++ /dev/null@@ -1,946 +0,0 @@-----title: "Spaces transport (TypeScript)"-description: "MCP-over-HTTP and Tauri transports for Spaces in webviews and browsers."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:cua-sdk-ts- Source: typedoc + typedoc-plugin-markdown over libs/cua/typescript/src/spaces/transport/index.ts- Version: @trycua/cua 0.5.0-*/}--Import from `@trycua/cua/spaces/transport`. This page covers the hand-written TypeScript layer; the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per object in the [Cua SDK reference](/cua-sdk/reference).--## Classes--### McpHttpTransport--The one interface a host has to implement.--Implementations must:-- resolve the reply whose `id` matches the request's, and not some other- reply that happened to arrive first;-- resolve `null` for a notification;-- reject every in-flight call if the peer dies, rather than leaving callers- hanging on a reply that is never coming;-- be safe to call again after `close()`, either by restarting or by- rejecting clearly.--#### Implements--- [`Transport`](#transport)--#### Constructors--##### Constructor--```ts-new McpHttpTransport(options): McpHttpTransport;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `options` | [`McpHttpOptions`](#mcphttpoptions) |--###### Returns--[`McpHttpTransport`](#mcphttptransport)--#### Properties--| Property | Modifier | Type | Default value | Description |-| ------ | ------ | ------ | ------ | ------ |-| <a id="property-kind"></a> `kind` | `readonly` | `"http"` | `"http"` | A short name for diagnostics: `"stdio"`, `"tauri"`. |--#### Accessors--##### sessionId--###### Get Signature--```ts-get sessionId(): string | undefined;-```--The session id the daemon minted, once initialized.--###### Returns--`string` \| `undefined`--#### Methods--##### close()--```ts-close(): Promise<void>;-```--Ends the MCP session (`DELETE /mcp`). Never throws.--###### Returns--`Promise`\<`void`\>--###### Implementation of--[`Transport`](#transport).[`close`](#close-3)--##### send()--```ts-send(message, options?): Promise<RpcResponse | null>;-```--Send one message; resolve its reply, or `null` for a notification.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `message` | [`RpcOutgoing`](#rpcoutgoing) |-| `options` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`RpcResponse`](#rpcresponse) \| `null`\>--###### Implementation of--[`Transport`](#transport).[`send`](#send-2)--***--### McpSession--#### Constructors--##### Constructor--```ts-new McpSession(transport, options?): McpSession;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `transport` | [`Transport`](#transport) |-| `options` | [`SessionOptions`](#sessionoptions) |--###### Returns--[`McpSession`](#mcpsession)--#### Properties--| Property | Modifier | Type |-| ------ | ------ | ------ |-| <a id="property-transport"></a> `transport` | `readonly` | [`Transport`](#transport) |--#### Methods--##### call()--```ts-call(- name,- args?,- options?-): Promise<ContentPart[]>;-```--Call a tool, throwing [ToolError](#toolerror) if it failed.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `name` | `string` |-| `args` | `Record`\<`string`, [`Json`](#json)\> |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`ContentPart`](#contentpart)[]\>--##### callJson()--```ts-callJson<T>(- name,- args?,- options?-): Promise<T>;-```--Call a tool whose text part is JSON, and parse it.--Worth its own method because the parse failure needs to say which tool-produced the unparsable text: without that, a server-side format change-surfaces as a bare `SyntaxError` with no attribution.--###### Type Parameters--| Type Parameter | Default type |-| ------ | ------ |-| `T` | [`Json`](#json) |--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `name` | `string` |-| `args` | `Record`\<`string`, [`Json`](#json)\> |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<`T`\>--##### callRaw()--```ts-callRaw(- name,- args?,- options?-): Promise<ToolResult>;-```--Call a tool and return its envelope, including a failure.--Use this when a caller wants to inspect `isError` itself: for instance a-probe that treats "not available" as an answer rather than an exception.-Most callers want [call](#call).--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `name` | `string` |-| `args` | `Record`\<`string`, [`Json`](#json)\> |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`ToolResult`](#toolresult)\>--##### callText()--```ts-callText(- name,- args?,- options?-): Promise<string>;-```--Call a tool and return its text parts joined: the common case, since-most of these tools answer with one text part.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `name` | `string` |-| `args` | `Record`\<`string`, [`Json`](#json)\> |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<`string`\>--##### close()--```ts-close(): Promise<void>;-```--###### Returns--`Promise`\<`void`\>--##### initialize()--```ts-initialize(options?): Promise<ServerInfo | undefined>;-```--Perform the MCP handshake, at most once per session.--The server does not require this: it builds its dispatch table before the-read loop starts, so `tools/call` works cold. We do it anyway, and we-memoize it: it is what makes this session usable against a *conforming*-MCP server rather than only against this one, and the cost is a single-round trip.--The result is cached as a promise, not a value, so concurrent first calls-share one handshake instead of racing two.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`ServerInfo`](#serverinfo) \| `undefined`\>--##### listTools()--```ts-listTools(options?): Promise<ToolDescriptor[]>;-```--Every tool the server serves, with its input schema.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`ToolDescriptor`](#tooldescriptor)[]\>--***--### TauriTransport--The one interface a host has to implement.--Implementations must:-- resolve the reply whose `id` matches the request's, and not some other- reply that happened to arrive first;-- resolve `null` for a notification;-- reject every in-flight call if the peer dies, rather than leaving callers- hanging on a reply that is never coming;-- be safe to call again after `close()`, either by restarting or by- rejecting clearly.--#### Implements--- [`Transport`](#transport)--#### Constructors--##### Constructor--```ts-new TauriTransport(options): TauriTransport;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `options` | [`TauriOptions`](#taurioptions) |--###### Returns--[`TauriTransport`](#tauritransport)--#### Properties--| Property | Modifier | Type | Default value | Description |-| ------ | ------ | ------ | ------ | ------ |-| <a id="property-kind-1"></a> `kind` | `readonly` | `"tauri"` | `"tauri"` | A short name for diagnostics: `"stdio"`, `"tauri"`. |--#### Methods--##### close()--```ts-close(): Promise<void>;-```--Ask the bridge to close the server's stdin.--A failure here is swallowed: the transport is being torn down, the app may-already be quitting, and turning "could not reach the bridge while closing"-into an exception makes shutdown paths fragile for no gain.--###### Returns--`Promise`\<`void`\>--###### Implementation of--[`Transport`](#transport).[`close`](#close-3)--##### send()--```ts-send(message, options?): Promise<RpcResponse | null>;-```--Send one message; resolve its reply, or `null` for a notification.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `message` | [`RpcOutgoing`](#rpcoutgoing) |-| `options` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`RpcResponse`](#rpcresponse) \| `null`\>--###### Implementation of--[`Transport`](#transport).[`send`](#send-2)--***--### ToolError--A tool that ran and failed.--This is a separate type from [TransportError](#transporterror) on purpose. The server-reports a failing tool as a *successful* JSON-RPC response carrying-`isError: true`; the only JSON-RPC `error` objects it ever sends are-`-32601` for an unknown method or tool. Collapsing the two would make-"the sandbox refused this command" indistinguishable from "the control-plane is not running", and those need different handling by every caller.--#### Extends--- `Error`--#### Constructors--##### Constructor--```ts-new ToolError(- tool,- content,- structured?-): ToolError;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `tool` | `string` |-| `content` | [`ContentPart`](#contentpart)[] |-| `structured?` | [`Json`](#json) |--###### Returns--[`ToolError`](#toolerror)--###### Overrides--```ts-Error.constructor-```--#### Properties--| Property | Modifier | Type | Default value | Description |-| ------ | ------ | ------ | ------ | ------ |-| <a id="property-content"></a> `content` | `readonly` | [`ContentPart`](#contentpart)[] | `undefined` | - |-| <a id="property-kind-2"></a> `kind` | `readonly` | `string` \| `undefined` | `undefined` | The server's stable error kind (`capability_missing`, `teleport_refused`, `not_found`, ...), when it sent one. |-| <a id="property-tag"></a> `tag` | `readonly` | `"ToolError"` | `"ToolError"` | - |-| <a id="property-tool"></a> `tool` | `readonly` | `string` | `undefined` | - |--***--### TransportError--Thrown for anything that goes wrong beneath the tool call: a dead peer, a-timeout, a JSON-RPC `error` object. A failing *tool* is not this: see-`ToolError`, because this server reports tool failure as a successful-response carrying `isError: true`.--#### Extends--- `Error`--#### Constructors--##### Constructor--```ts-new TransportError(message, code?): TransportError;-```--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `message` | `string` |-| `code?` | `number` |--###### Returns--[`TransportError`](#transporterror)--###### Overrides--```ts-Error.constructor-```--#### Properties--| Property | Modifier | Type | Default value |-| ------ | ------ | ------ | ------ |-| <a id="property-code"></a> `code` | `readonly` | `number` \| `undefined` | `undefined` |-| <a id="property-tag-1"></a> `tag` | `readonly` | `"TransportError"` | `"TransportError"` |--## Interfaces--### ClientInfo--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-name"></a> `name` | `string` |-| <a id="property-version"></a> `version` | `string` |--***--### ContentPart--One part of a tool result. `call_tool` passes through `image`,-`audio` and `resource` parts from an in-space tool unchanged, so this is not-only ever text.--#### Indexable--```ts-[key: string]: Json | undefined-```--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-text"></a> `text?` | `string` |-| <a id="property-type"></a> `type` | `string` |--***--### McpHttpOptions--#### Properties--| Property | Type | Description |-| ------ | ------ | ------ |-| <a id="property-fetch"></a> `fetch?` | [`FetchFn`](#fetchfn) | Inject a fetch (tests, a Tauri HTTP plugin). Defaults to `globalThis.fetch`. |-| <a id="property-token"></a> `token?` | `string` | The daemon's loopback bearer token. |-| <a id="property-url"></a> `url` | `string` | Daemon loopback base URL (`http://127.0.0.1:<port>`) or the full `/mcp` URL. |--***--### RpcError--`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that-cannot load the native binding (a Tauri webview, a browser).--Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces-server over any `Transport`:--- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,- bearer = the daemon's loopback token);-- `TauriTransport`: `invoke()` into the Tauri app's Rust side.--Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See-`types.ts` for why the seam exchanges whole JSON-RPC messages rather than-bytes.--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-code-1"></a> `code` | `number` |-| <a id="property-data"></a> `data?` | [`Json`](#json) |-| <a id="property-message"></a> `message` | `string` |--***--### RpcNotification--A message with no `id`. It gets no reply, and a transport must resolve-`null` for it rather than inventing one.--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-jsonrpc"></a> `jsonrpc` | `"2.0"` |-| <a id="property-method"></a> `method` | `string` |-| <a id="property-params"></a> `params?` | [`Json`](#json) |--***--### RpcRequest--`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that-cannot load the native binding (a Tauri webview, a browser).--Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces-server over any `Transport`:--- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,- bearer = the daemon's loopback token);-- `TauriTransport`: `invoke()` into the Tauri app's Rust side.--Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See-`types.ts` for why the seam exchanges whole JSON-RPC messages rather than-bytes.--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-id"></a> `id` | [`RpcId`](#rpcid) |-| <a id="property-jsonrpc-1"></a> `jsonrpc` | `"2.0"` |-| <a id="property-method-1"></a> `method` | `string` |-| <a id="property-params-1"></a> `params?` | [`Json`](#json) |--***--### RpcResponse--`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that-cannot load the native binding (a Tauri webview, a browser).--Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces-server over any `Transport`:--- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,- bearer = the daemon's loopback token);-- `TauriTransport`: `invoke()` into the Tauri app's Rust side.--Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See-`types.ts` for why the seam exchanges whole JSON-RPC messages rather than-bytes.--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-error"></a> `error?` | [`RpcError`](#rpcerror) |-| <a id="property-id-1"></a> `id` | [`RpcId`](#rpcid) |-| <a id="property-jsonrpc-2"></a> `jsonrpc` | `"2.0"` |-| <a id="property-result"></a> `result?` | [`Json`](#json) |--***--### SendOptions--`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that-cannot load the native binding (a Tauri webview, a browser).--Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces-server over any `Transport`:--- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,- bearer = the daemon's loopback token);-- `TauriTransport`: `invoke()` into the Tauri app's Rust side.--Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See-`types.ts` for why the seam exchanges whole JSON-RPC messages rather than-bytes.--#### Properties--| Property | Type | Description |-| ------ | ------ | ------ |-| <a id="property-signal"></a> `signal?` | `AbortSignal` | Aborts the wait. A transport should still expect the server to finish the work: this server has no `notifications/cancelled` handling, so aborting abandons the reply rather than stopping the call. |-| <a id="property-timeoutseconds"></a> `timeoutSeconds?` | `number` | Seconds to wait for a reply. The default is deliberately long. `teleport_app` and provisioning run with `timeout=900` server-side, and the agent-CLI registration this server ships with sets `requestTimeoutMs: 900000`. A transport that imposed a short deadline would silently break the app's slowest and most valuable operations, so a conformer must not shorten this on its own initiative. |--***--### ServerInfo--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-name-1"></a> `name` | `string` |-| <a id="property-version-1"></a> `version` | `string` |--***--### SessionOptions--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-clientinfo"></a> `clientInfo?` | [`ClientInfo`](#clientinfo) |--***--### TauriOptions--#### Properties--| Property | Type | Description |-| ------ | ------ | ------ |-| <a id="property-invoke"></a> `invoke` | [`InvokeFn`](#invokefn) | Usually `(await import("@tauri-apps/api/core")).invoke`. |-| <a id="property-requestcommand"></a> `requestCommand?` | `string` | The Rust command name (default `spaces_mcp_request`). |-| <a id="property-shutdowncommand"></a> `shutdownCommand?` | `string` | The Rust command that ends the session (default `spaces_mcp_shutdown`). |--***--### ToolDescriptor--#### Properties--| Property | Type |-| ------ | ------ |-| <a id="property-description"></a> `description?` | `string` |-| <a id="property-inputschema"></a> `inputSchema?` | [`Json`](#json) |-| <a id="property-name-2"></a> `name` | `string` |--***--### ToolResult--#### Properties--| Property | Type | Description |-| ------ | ------ | ------ |-| <a id="property-content-1"></a> `content` | [`ContentPart`](#contentpart)[] | - |-| <a id="property-iserror"></a> `isError` | `boolean` | - |-| <a id="property-structured"></a> `structured?` | [`Json`](#json) | `structuredContent`, when the tool returned one (tool errors carry `{error: {kind, message}}` with a stable `kind`). |--***--### Transport--The one interface a host has to implement.--Implementations must:-- resolve the reply whose `id` matches the request's, and not some other- reply that happened to arrive first;-- resolve `null` for a notification;-- reject every in-flight call if the peer dies, rather than leaving callers- hanging on a reply that is never coming;-- be safe to call again after `close()`, either by restarting or by- rejecting clearly.--#### Properties--| Property | Modifier | Type | Description |-| ------ | ------ | ------ | ------ |-| <a id="property-kind-3"></a> `kind` | `readonly` | `string` | A short name for diagnostics: `"stdio"`, `"tauri"`. |--#### Methods--##### close()--```ts-close(): Promise<void>;-```--Release the peer. Idempotent.--###### Returns--`Promise`\<`void`\>--##### send()--```ts-send(message, options?): Promise<RpcResponse | null>;-```--Send one message; resolve its reply, or `null` for a notification.--###### Parameters--| Parameter | Type |-| ------ | ------ |-| `message` | [`RpcOutgoing`](#rpcoutgoing) |-| `options?` | [`SendOptions`](#sendoptions) |--###### Returns--`Promise`\<[`RpcResponse`](#rpcresponse) \| `null`\>--## Type Aliases--### FetchFn--```ts-type FetchFn = (input, init) => Promise<{- headers: {- get: string | null;- };- ok: boolean;- status: number;- text: Promise<string>;-}>;-```--The `fetch` shape this needs (the global one, or an injected fake).--#### Parameters--| Parameter | Type |-| ------ | ------ |-| `input` | `string` |-| `init` | \{ `body?`: `string`; `headers`: `Record`\<`string`, `string`\>; `method`: `string`; `signal?`: `AbortSignal`; \} |-| `init.body?` | `string` |-| `init.headers` | `Record`\<`string`, `string`\> |-| `init.method` | `string` |-| `init.signal?` | `AbortSignal` |--#### Returns--`Promise`\<\{- `headers`: \{- `get`: `string` \| `null`;- \};- `ok`: `boolean`;- `status`: `number`;- `text`: `Promise`\<`string`\>;-\}\>--***--### InvokeFn--```ts-type InvokeFn = <T>(command, args?) => Promise<T>;-```--The shape of Tauri's `invoke`, narrowed to what this needs.--#### Type Parameters--| Type Parameter |-| ------ |-| `T` |--#### Parameters--| Parameter | Type |-| ------ | ------ |-| `command` | `string` |-| `args?` | `Record`\<`string`, `unknown`\> |--#### Returns--`Promise`\<`T`\>--***--### Json--```ts-type Json =- | null- | boolean- | number- | string- | Json[]- | {-[key: string]: Json;-};-```--A JSON value, as it crosses the wire.--***--### RpcId--```ts-type RpcId = number | string;-```--JSON-RPC 2.0 ids: this SDK only ever sends numbers, but a reply echoes-whatever it was given, and a conforming peer may use a string.--***--### RpcOutgoing--```ts-type RpcOutgoing = RpcRequest | RpcNotification;-```--`@trycua/cua/spaces/transport`: the Spaces control plane for hosts that-cannot load the native binding (a Tauri webview, a browser).--Dependency-free TypeScript: `McpSession` speaks MCP to the Rust Spaces-server over any `Transport`:--- `McpHttpTransport`: the `cua daemon` loopback `/mcp` (streamable HTTP,- bearer = the daemon's loopback token);-- `TauriTransport`: `invoke()` into the Tauri app's Rust side.--Node code should use `@trycua/cua/spaces` (the typed SDK) instead. See-`types.ts` for why the seam exchanges whole JSON-RPC messages rather than-bytes.--## Variables--### DEFAULT_REQUEST_COMMAND--```ts-const DEFAULT_REQUEST_COMMAND: "spaces_mcp_request" = "spaces_mcp_request";-```--***--### DEFAULT_SHUTDOWN_COMMAND--```ts-const DEFAULT_SHUTDOWN_COMMAND: "spaces_mcp_shutdown" = "spaces_mcp_shutdown";-```--***--### PROTOCOL_VERSION--```ts-const PROTOCOL_VERSION: "2025-06-18" = "2025-06-18";-```--The MCP revision offered. The Rust server accepts 2025-06-18, 2025-03-26-and 2024-11-05, and answers with the one it picked.--***--### SESSION_HEADER--```ts-const SESSION_HEADER: "mcp-session-id" = "mcp-session-id";-```--## Functions--### textOf()--```ts-function textOf(content): string;-```--Concatenate the text parts, which is what almost every caller wants.--#### Parameters--| Parameter | Type |-| ------ | ------ |-| `content` | [`ContentPart`](#contentpart)[] |--#### Returns--`string`diff --git a/docs/content/docs/cua-sdk/reference/typescript/spaces.mdx b/docs/content/docs/cua-sdk/reference/typescript/spaces.mdxindex f4794e02e2..32fb5df2d4 100644--- a/docs/content/docs/cua-sdk/reference/typescript/spaces.mdx+++ b/docs/content/docs/cua-sdk/reference/typescript/spaces.mdx@@ -10,7 +10,7 @@ description: "The @trycua/cua/spaces helpers: threads, events, teleport approvalVersion: @trycua/cua 0.5.0*/}-Import from `@trycua/cua/spaces`. This page covers the hand-written TypeScript layer; the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per object in the [Cua SDK reference](/cua-sdk/reference).+Import from `@trycua/cua/spaces`. This page covers the hand-written TypeScript layer; the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per module in the [Cua SDK reference](/cua-sdk/reference).## Classesdiff --git a/docs/content/docs/redirects.json b/docs/content/docs/redirects.jsonindex 9487b0fc56..fc3e96c225 100644--- a/docs/content/docs/redirects.json+++ b/docs/content/docs/redirects.json@@ -140,7 +140,7 @@"cua-sdk/guides/share-service-with-signed-url": "cua-sdk/guides/services","cua-sdk/guides/tunneling": "cua-sdk/guides/services","cua-sdk/reference/api": "cua-sdk/reference",- "cua-sdk/reference/api/agents": "cua-sdk/reference/agent-setup",+ "cua-sdk/reference/api/agents": "cua-sdk/reference/agents#agent-setup","cua-sdk/reference/api/auth": "cua-sdk/reference/auth","cua-sdk/reference/api/cua": "cua-sdk/reference/cua","cua-sdk/reference/api/errors": "cua-sdk/reference/errors",@@ -148,24 +148,24 @@"cua-sdk/reference/api/guest": "cua-sdk/reference/spacesd","cua-sdk/reference/api/host": "cua-sdk/reference/spaces/host","cua-sdk/reference/api/images": "cua-sdk/reference/image",- "cua-sdk/reference/api/local": "cua-sdk/reference/local",- "cua-sdk/reference/api/media": "cua-sdk/reference/spacesd/media",+ "cua-sdk/reference/api/local": "cua-sdk/reference/cua#local-runtimes",+ "cua-sdk/reference/api/media": "cua-sdk/reference/spacesd/computer#media","cua-sdk/reference/api/sandboxes": "cua-sdk/reference/sandbox","cua-sdk/reference/api/spaces": "cua-sdk/reference/spaces",- "cua-sdk/reference/api/teleport": "cua-sdk/reference/spaces/teleport",+ "cua-sdk/reference/api/teleport": "cua-sdk/reference/spaces/space#teleport","cua-sdk/reference/api/types": "cua-sdk/reference/types","cua-sdk/reference/disk-usage": "cua-sdk/guides/lifecycle#disk-usage-and-cleanup","cua-sdk/reference/rust/cua-sdk-guest": "cua-sdk/reference/rust/cua-sdk","cua-sdk/reference/rust/cua-sdk-sandboxes": "cua-sdk/reference/rust/cua-sdk","cua-sdk/reference/rust/cua-sdk-spaces": "cua-sdk/reference/rust/cua-sdk",- "cua-sdk/reference/sandbox/api/configuration": "cua-sdk/reference/python/configuration",- "cua-sdk/reference/sandbox/api/image": "cua-sdk/reference/python/image",+ "cua-sdk/reference/sandbox/api/configuration": "cua-sdk/reference/python/runtimes#configuration-and-errors",+ "cua-sdk/reference/sandbox/api/image": "cua-sdk/reference/python/sandbox#images-and-registries","cua-sdk/reference/sandbox/api/interfaces": "cua-sdk/reference/python/interfaces","cua-sdk/reference/sandbox/api/pool": "cua-sdk/guides/cua-cloud-ended","cua-sdk/reference/sandbox/api/runtimes": "cua-sdk/reference/python/runtimes","cua-sdk/reference/sandbox/api/sandbox": "cua-sdk/reference/python/sandbox",- "cua-sdk/reference/sandbox/api/services": "cua-sdk/reference/python/services",- "cua-sdk/reference/sandbox/image": "cua-sdk/reference/python/image",+ "cua-sdk/reference/sandbox/api/services": "cua-sdk/reference/python/sandbox#services-tunnels-and-mcp",+ "cua-sdk/reference/sandbox/image": "cua-sdk/reference/python/sandbox#images-and-registries","cua-sdk/reference/sandbox/interfaces": "cua-sdk/reference/python/interfaces","cua-sdk/reference/sandbox/os-image-catalog": "cua-sdk/reference/os-image-catalog","cua-sdk/reference/sandbox/pool": "cua-sdk/guides/cua-cloud-ended",@@ -337,17 +337,17 @@"reference/cua-driver/telemetry": "cua-driver/guides/operate","reference/cua-spacesd": "cua-sdk/reference/protocol","reference/cua-spacesd/api": "cua-sdk/reference/protocol",- "reference/cua-spacesd/api/daemon-sandboxes": "cua-sdk/reference/protocol/daemon-sandboxes",- "reference/cua-spacesd/api/daemon-spaces": "cua-sdk/reference/protocol/daemon-spaces",+ "reference/cua-spacesd/api/daemon-sandboxes": "cua-sdk/reference/protocol/daemon",+ "reference/cua-spacesd/api/daemon-spaces": "cua-sdk/reference/protocol/daemon","reference/cua-spacesd/api/env-computer": "cua-sdk/reference/protocol/env-computer",- "reference/cua-spacesd/api/env-filesystem": "cua-sdk/reference/protocol/env-filesystem",+ "reference/cua-spacesd/api/env-filesystem": "cua-sdk/reference/protocol/env-process","reference/cua-spacesd/api/env-process": "cua-sdk/reference/protocol/env-process","reference/cua-spacesd/api/env-stream": "cua-sdk/reference/protocol/env-stream","reference/cua-spacesd/api/env-system": "cua-sdk/reference/protocol/env-system",- "reference/cua-spacesd/api/env-teleport-tunnel": "cua-sdk/reference/protocol/env-teleport-tunnel",+ "reference/cua-spacesd/api/env-teleport-tunnel": "cua-sdk/reference/protocol/env-stream","reference/cua-sdk": "cua-sdk/reference","reference/cua-sdk/api": "cua-sdk/reference",- "reference/cua-sdk/api/agents": "cua-sdk/reference/agent-setup",+ "reference/cua-sdk/api/agents": "cua-sdk/reference/agents#agent-setup","reference/cua-sdk/api/auth": "cua-sdk/reference/auth","reference/cua-sdk/api/cua": "cua-sdk/reference/cua","reference/cua-sdk/api/errors": "cua-sdk/reference/errors",@@ -355,29 +355,29 @@"reference/cua-sdk/api/guest": "cua-sdk/reference/spacesd","reference/cua-sdk/api/host": "cua-sdk/reference/spaces/host","reference/cua-sdk/api/images": "cua-sdk/reference/image",- "reference/cua-sdk/api/local": "cua-sdk/reference/local",- "reference/cua-sdk/api/media": "cua-sdk/reference/spacesd/media",+ "reference/cua-sdk/api/local": "cua-sdk/reference/cua#local-runtimes",+ "reference/cua-sdk/api/media": "cua-sdk/reference/spacesd/computer#media","reference/cua-sdk/api/sandboxes": "cua-sdk/reference/sandbox","reference/cua-sdk/api/spaces": "cua-sdk/reference/spaces",- "reference/cua-sdk/api/teleport": "cua-sdk/reference/spaces/teleport",+ "reference/cua-sdk/api/teleport": "cua-sdk/reference/spaces/space#teleport","reference/cua-sdk/api/types": "cua-sdk/reference/types","reference/cua-sdk/disk-usage": "cua-sdk/guides/lifecycle#disk-usage-and-cleanup","reference/cua-sdk/python": "cua-sdk/reference/python","reference/cua-sdk/rust": "cua-sdk/reference/rust","reference/cua-sdk/rust/cua-fleet": "cua-sdk/guides/cua-cloud-ended","reference/cua-sdk/rust/cua-spacesd-client": "cua-sdk/reference/rust/cua-spacesd-client",- "reference/cua-sdk/rust/cua-sandbox-core": "cua-sdk/reference/rust/cua-sandbox-core",+ "reference/cua-sdk/rust/cua-sandbox-core": "cua-sdk/reference/rust","reference/cua-sdk/rust/cua-sdk": "cua-sdk/reference/rust/cua-sdk","reference/cua-sdk/rust/cua-sdk-guest": "cua-sdk/reference/rust/cua-sdk","reference/cua-sdk/rust/cua-sdk-sandboxes": "cua-sdk/reference/rust/cua-sdk","reference/cua-sdk/rust/cua-sdk-spaces": "cua-sdk/reference/rust/cua-sdk",- "reference/cua-sdk/rust/cua-spaces": "cua-sdk/reference/rust/cua-spaces",- "reference/cua-sdk/rust/cua-spaces-agents-mcp": "cua-sdk/reference/rust/cua-spaces-agents-mcp",- "reference/cua-sdk/rust/cua-spaces-client": "cua-sdk/reference/rust/cua-spaces-client",+ "reference/cua-sdk/rust/cua-spaces": "cua-sdk/reference/rust",+ "reference/cua-sdk/rust/cua-spaces-agents-mcp": "cua-sdk/reference/rust",+ "reference/cua-sdk/rust/cua-spaces-client": "cua-sdk/reference/rust","reference/cua-sdk/typescript": "cua-sdk/reference/typescript","reference/cua-sdk/typescript/spaces": "cua-sdk/reference/typescript/spaces",- "reference/cua-sdk/typescript/spaces-host": "cua-sdk/reference/typescript/spaces-host",- "reference/cua-sdk/typescript/spaces-transport": "cua-sdk/reference/typescript/spaces-transport",+ "reference/cua-sdk/typescript/spaces-host": "cua-sdk/reference/typescript#trycuacuaspaceshost",+ "reference/cua-sdk/typescript/spaces-transport": "cua-sdk/reference/typescript#trycuacuaspacestransport","reference/docs-code-mcp": "docs-for-agents","reference/lume/cli-reference": "lume/reference/cli","reference/lume/http-api": "lume/reference/http-api",@@ -385,14 +385,14 @@"reference/lume/mcp-tools": "lume/reference/http-api#mcp-tools","reference/lume/telemetry": "lume/concepts/how-lume-works","reference/sandbox-sdk": "cua-sdk/reference/sandbox",- "reference/sandbox-sdk/api/configuration": "cua-sdk/reference/python/configuration",- "reference/sandbox-sdk/api/image": "cua-sdk/reference/python/image",+ "reference/sandbox-sdk/api/configuration": "cua-sdk/reference/python/runtimes#configuration-and-errors",+ "reference/sandbox-sdk/api/image": "cua-sdk/reference/python/sandbox#images-and-registries","reference/sandbox-sdk/api/interfaces": "cua-sdk/reference/python/interfaces","reference/sandbox-sdk/api/pool": "cua-sdk/guides/cua-cloud-ended","reference/sandbox-sdk/api/runtimes": "cua-sdk/reference/python/runtimes","reference/sandbox-sdk/api/sandbox": "cua-sdk/reference/python/sandbox",- "reference/sandbox-sdk/api/services": "cua-sdk/reference/python/services",- "reference/sandbox-sdk/image": "cua-sdk/reference/python/image",+ "reference/sandbox-sdk/api/services": "cua-sdk/reference/python/sandbox#services-tunnels-and-mcp",+ "reference/sandbox-sdk/image": "cua-sdk/reference/python/sandbox#images-and-registries","reference/sandbox-sdk/interfaces": "cua-sdk/reference/python/interfaces","reference/sandbox-sdk/os-image-catalog": "cua-sdk/reference/os-image-catalog","reference/sandbox-sdk/pool": "cua-sdk/guides/cua-cloud-ended",@@ -436,11 +436,11 @@"use-cua-with/xai": "cua-driver/guides/connect-your-agent","cua-bench/guides/third-party-benchmarks": "cua-bench/guides/adapter-benchmarks","spaces/guides/cua-drive": "spaces/guides/cua-volume",- "spaces/reference/drive": "spaces/reference/volume",+ "spaces/reference/drive": "spaces/reference/agents#cua-volume","cua-cli/reference/cli/drive": "cua-cli/reference/cli/files-teleport-and-keys#cua-volume","cua-sdk/reference/spaces/drive": "cua-sdk/reference/spaces/volume",- "cua-sdk/reference/spaces/drive-sync": "cua-sdk/reference/spaces/volume-sync",- "cua-sdk/reference/spaces/drive-app-core": "cua-sdk/reference/spaces/volume-app-core",+ "cua-sdk/reference/spaces/drive-sync": "cua-sdk/reference/spaces/volume#cua-volume-storage-and-sync",+ "cua-sdk/reference/spaces/drive-app-core": "cua-sdk/reference/spaces/volume","use-cua-with/iflytek": "cua-driver/guides/connect-your-agent","spaces/teams": "spaces/guides/teams","spaces/teams/machines": "spaces/guides/teams#team-computers",@@ -553,6 +553,90 @@"cua-bench/reference/cli/env": "cua-bench/reference/cli#sandboxes-and-account","cua-bench/reference/cli/agent": "cua-bench/reference/cli#cb-agent","cua-bench/reference/cli/images": "cua-bench/reference/cli#images-and-platforms",- "cua-bench/reference/results": "cua-bench/reference/task-definition#result-files"+ "cua-bench/reference/results": "cua-bench/reference/task-definition#result-files",+ "cua-sdk/reference/agent-setup": "cua-sdk/reference/agents#agent-setup",+ "cua-sdk/reference/local": "cua-sdk/reference/cua#local-runtimes",+ "cua-sdk/reference/protocol/daemon-runtimes": "cua-sdk/reference/protocol/daemon",+ "cua-sdk/reference/protocol/daemon-sandboxes": "cua-sdk/reference/protocol/daemon",+ "cua-sdk/reference/protocol/daemon-service": "cua-sdk/reference/protocol/daemon",+ "cua-sdk/reference/protocol/daemon-spaces": "cua-sdk/reference/protocol/daemon",+ "cua-sdk/reference/protocol/env-common": "cua-sdk/reference/protocol/env-system",+ "cua-sdk/reference/protocol/env-diagnose": "cua-sdk/reference/protocol/env-system",+ "cua-sdk/reference/protocol/env-filesystem": "cua-sdk/reference/protocol/env-process",+ "cua-sdk/reference/protocol/env-host-spaces": "cua-sdk/reference/protocol/env-stream",+ "cua-sdk/reference/protocol/env-teleport-tunnel": "cua-sdk/reference/protocol/env-stream",+ "cua-sdk/reference/protocol/env-windows": "cua-sdk/reference/protocol/env-computer",+ "cua-sdk/reference/python/configuration": "cua-sdk/reference/python/runtimes#configuration-and-errors",+ "cua-sdk/reference/python/image": "cua-sdk/reference/python/sandbox#images-and-registries",+ "cua-sdk/reference/python/pool": "cua-sdk/guides/cua-cloud-ended",+ "cua-sdk/reference/python/services": "cua-sdk/reference/python/sandbox#services-tunnels-and-mcp",+ "cua-sdk/reference/rust/cua-fleet": "cua-sdk/guides/cua-cloud-ended",+ "cua-sdk/reference/rust/cua-sandbox-core": "cua-sdk/reference/rust",+ "cua-sdk/reference/rust/cua-spaces": "cua-sdk/reference/rust",+ "cua-sdk/reference/rust/cua-spaces-agents-mcp": "cua-sdk/reference/rust",+ "cua-sdk/reference/rust/cua-spaces-client": "cua-sdk/reference/rust",+ "cua-sdk/reference/sandbox/lifecycle": "cua-sdk/reference/sandbox#lifecycle",+ "cua-sdk/reference/sandbox/options": "cua-sdk/reference/image#create-options",+ "cua-sdk/reference/sandbox/without-spacesd": "cua-sdk/reference/spacesd#without-cua-spacesd",+ "cua-sdk/reference/spaces/account-app-core": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/agents": "cua-sdk/reference/spaces#agents-in-a-space",+ "cua-sdk/reference/spaces/agents-app-core": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-checklist-palette": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/about": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/agent-keys": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/cloud": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/creates": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/devices": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/drag-trigger": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/experiments": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/images": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/keyvault": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/keyvault-screens": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/new-space": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/notch": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/onboarding-previews": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/onboarding-settings": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/power": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/run-on": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/share": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/spaces": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/stream": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/telemetry": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/teleport": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/teleport-grid": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/teleport-review": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/teleport-run": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/teleport-transfer": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/this-machine": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/app-core/window": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/cloud": "cua-sdk/reference/spaces/persistent-agents#your-cloud",+ "cua-sdk/reference/spaces/create": "cua-sdk/reference/spaces#create-options",+ "cua-sdk/reference/spaces/decoded-media": "cua-sdk/reference/spacesd/computer#media",+ "cua-sdk/reference/spaces/devices": "cua-sdk/reference/spaces/host#this-device-on-the-relay",+ "cua-sdk/reference/spaces/machines-app-core": "cua-sdk/reference/spaces",+ "cua-sdk/reference/spaces/teleport": "cua-sdk/reference/spaces/space#teleport",+ "cua-sdk/reference/spaces/teleport-apps": "cua-sdk/reference/spaces/space#teleport",+ "cua-sdk/reference/spaces/teleport-host": "cua-sdk/reference/spaces/space#teleport",+ "cua-sdk/reference/spaces/volume-app-core": "cua-sdk/reference/spaces/volume",+ "cua-sdk/reference/spaces/volume-sync": "cua-sdk/reference/spaces/volume#cua-volume-storage-and-sync",+ "cua-sdk/reference/spaces/windows": "cua-sdk/reference/spaces/space#windows-icons-and-displays",+ "cua-sdk/reference/spacesd/media": "cua-sdk/reference/spacesd/computer#media",+ "cua-sdk/reference/spacesd/shell": "cua-sdk/reference/spacesd#processes",+ "cua-sdk/reference/telemetry": "cua-sdk/reference/auth#telemetry",+ "cua-sdk/reference/typescript/spaces-host": "cua-sdk/reference/typescript#trycuacuaspaceshost",+ "cua-sdk/reference/typescript/spaces-transport": "cua-sdk/reference/typescript#trycuacuaspacestransport",+ "spaces/reference/cloud": "spaces/reference/spaces#your-cloud",+ "spaces/reference/commands-and-files": "spaces/reference/spaces#commands-and-files",+ "spaces/reference/errors": "spaces/reference#errors",+ "spaces/reference/hotspot": "spaces/reference/spaces#hotspot",+ "spaces/reference/keyvault": "spaces/reference/agents#keyvault",+ "spaces/reference/lifecycle": "spaces/reference/spaces#space-lifecycle",+ "spaces/reference/persistent-agents": "spaces/reference/agents#persistent-agents",+ "spaces/reference/services": "spaces/reference/spaces#services",+ "spaces/reference/sharing": "spaces/reference/spaces#sharing",+ "spaces/reference/streams-and-display": "spaces/reference/spaces#streams-and-display",+ "spaces/reference/teleport": "spaces/reference/agents#session-teleport",+ "spaces/reference/volume": "spaces/reference/agents#cua-volume"}}diff --git a/docs/content/docs/spaces/guides/cua-volume.mdx b/docs/content/docs/spaces/guides/cua-volume.mdxindex 7b07d510ee..eae144d81c 100644--- a/docs/content/docs/spaces/guides/cua-volume.mdx+++ b/docs/content/docs/spaces/guides/cua-volume.mdx@@ -85,7 +85,7 @@ print([e.path for e in (await spaces.volume_ls("agents/", ada)).entries])```Every tool is also on the Spaces MCP server (`volume_ls`, `volume_read`,-`volume_write`, ...): see the [volume tools reference](/spaces/reference/volume)+`volume_write`, ...): see the [volume tools reference](/spaces/reference/agents#cua-volume)and the [SDK reference](/cua-sdk/reference/spaces/volume).## Secrets stay in the Keyvault@@ -258,7 +258,7 @@ From [the examples in other languages](/spaces/guides/create-a-space-with-the-sdPython: `await space.send_file(path, cua.SpaceSendFileOptions(target_directory="inbox"))`.Agents use the MCP tool `send_file` ([what your agent can do](/spaces/guides/connect-your-agent#what-your-agent-can-do)).-The options are in the [`send_file` reference](/spaces/reference/commands-and-files#send_file).+The options are in the [`send_file` reference](/spaces/reference/spaces#send_file).## Sync across devicesdiff --git a/docs/content/docs/spaces/guides/keyvault.mdx b/docs/content/docs/spaces/guides/keyvault.mdxindex 09f14d3a89..f7966528ed 100644--- a/docs/content/docs/spaces/guides/keyvault.mdx+++ b/docs/content/docs/spaces/guides/keyvault.mdx@@ -148,7 +148,7 @@ Keyvault refuses before typing anything.From the SDK the same call is `space.request_site_login(url, options)`(`requestSiteLogin` in Swift, TypeScript and Kotlin). See the-[Keyvault tool reference](/spaces/reference/keyvault) for the full result shape.+[Keyvault tool reference](/spaces/reference/agents#keyvault) for the full result shape.Requests also show up in the CLI, for a computer without the app open:@@ -280,5 +280,5 @@ Scripts can pass the passphrase on stdin with `--passphrase-stdin`. See the[`cua keyvault` reference](/cua-cli/reference/cli/files-teleport-and-keys#cua-keyvault).See [Teleport an app](/spaces/guides/teleport-an-app) for what moves, and the-[teleport reference](/spaces/reference/teleport) for the `teleport_app` consent+[teleport reference](/spaces/reference/agents#session-teleport) for the `teleport_app` consentflow.diff --git a/docs/content/docs/spaces/guides/persistent-agents.mdx b/docs/content/docs/spaces/guides/persistent-agents.mdxindex 4d3626bde7..20f67a38e9 100644--- a/docs/content/docs/spaces/guides/persistent-agents.mdx+++ b/docs/content/docs/spaces/guides/persistent-agents.mdx@@ -118,6 +118,6 @@ cua agent revoke-computer ada`agent_start` with `home` runs a persistent agent (created on first use), andthe `persistent_agent_*`, `agent_pause`, `agent_resume`, `routine_*`,`notifications_*` and `computer_access_*` tools cover the rest; see-[Persistent agents](/spaces/reference/persistent-agents) in the Spaces+[Persistent agents](/spaces/reference/agents#persistent-agents) in the Spacesreference and the SDK's [`Spaces`](/cua-sdk/reference/spaces/persistent-agents)methods.diff --git a/docs/content/docs/spaces/guides/teleport-an-app.mdx b/docs/content/docs/spaces/guides/teleport-an-app.mdxindex 9ee14d2b93..f3171b0d43 100644--- a/docs/content/docs/spaces/guides/teleport-an-app.mdx+++ b/docs/content/docs/spaces/guides/teleport-an-app.mdx@@ -99,7 +99,7 @@ TypeScript, Swift or Kotlin reach session teleport through `Space.teleport`against the Cua Spaces daemon ([below](#session-teleport)).To build your own Spaces UI in Swift, the Cua Spaces app export-(`CuaSpacesFFI`, [reference](/cua-sdk/reference/spaces/teleport-apps)) has the+(`CuaSpacesFFI`, [reference](/cua-sdk/reference/spaces/space#teleport)) has thecalls the apps use: `Teleport.catalog`, `plan` and `run`.```swift skip="no-runner"diff --git a/docs/content/docs/spaces/guides/troubleshoot.mdx b/docs/content/docs/spaces/guides/troubleshoot.mdxindex 201d638e9f..d597b9bb11 100644--- a/docs/content/docs/spaces/guides/troubleshoot.mdx+++ b/docs/content/docs/spaces/guides/troubleshoot.mdx@@ -84,7 +84,7 @@ system, and the Cua Spaces version from **Settings, About**.|---|---|| The agent has no `cua` tools, or can't reach a Space | [If it doesn't work](/spaces/guides/connect-your-agent#if-it-doesnt-work) in Connect your agent || A computer never appears, or shows **Offline** | [If it doesn't work](/spaces/guides/add-a-computer#if-it-doesnt-work) in Add a computer |-| An error name such as `capability_missing` or `permission_denied` | [Errors](/spaces/reference/errors) in the Spaces reference |+| An error name such as `capability_missing` or `permission_denied` | [Errors](/spaces/reference#errors) in the Spaces reference || You want Cua Spaces gone, or a clean reinstall | [Uninstall Cua Spaces](/spaces/guides/uninstall), then [Install](/spaces/guides/install) || Something else | Email [email protected] as described above |diff --git a/docs/content/docs/spaces/reference/agents.mdx b/docs/content/docs/spaces/reference/agents.mdxindex f2c0141a36..0274f2da74 100644--- a/docs/content/docs/spaces/reference/agents.mdx+++ b/docs/content/docs/spaces/reference/agents.mdx@@ -1,6 +1,6 @@----title: "Agents"-description: "Run coding agents inside a Space."+title: "Agent, teleport and storage tools"+description: "Run agents in a Space, teleport apps, and use Keyvault and Cua Volume: the tools with their parameters, results and errors."---{/*@@ -10,6 +10,10 @@ description: "Run coding agents inside a Space."Version: 0.7.0*/}+## Agents++Run coding agents inside a Space.+| Tool | Description || --- | --- || [`agent_start`](#agent_start) | Start a coding agent in the Space. |@@ -21,7 +25,7 @@ description: "Run coding agents inside a Space."| [`agent_list`](#agent_list) | List agent runs in the Space. || [`agent_capabilities`](#agent_capabilities) | Report what the agent harnesses support. |-## agent_start+### agent_startStart a coding agent in the Space.@@ -36,7 +40,7 @@ Installs the harness if needed (pinned, checksum-verified), gives it the Space's| Swift SDK | `space.agents.start(...)` || Rust | `Agents::start` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- |@@ -64,19 +68,19 @@ Installs the harness if needed (pinned, checksum-verified), gives it the Space's| `space` | `string` | required | Space id or name. || `wire` | `string` | none | The wire format of `base_url`: `anthropic`, `openai-responses`, `openai-chat` or `gemini`. Default: the harness's own. |-### Result+#### ResultJSON: `run_id`, `agent`, `space`, `process_tag`, `cwd`, `notes` and `hint`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-### Notes+#### Notes- Runs auto-approved: the Space is the sandbox, which is why approvalsAreEnforced is false.-## agent_message+### agent_messageSend a follow-up to an agent run.@@ -91,7 +95,7 @@ Continues the same session. While a turn runs the message is queued (or, with fo| Swift SDK | `AgentRun.send(_:)` || Rust | `Agents::send` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- |@@ -100,15 +104,15 @@ Continues the same session. While a turn runs the message is queued (or, with fo| `space` | `string` | required | Space id or name. || `text` | `string` | required | The message. |-### Result+#### ResultJSON: `delivered`, `run_id`, `status`, `phase` and `reason`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-## agent_events+### agent_eventsRead an agent run's events after a cursor.@@ -123,7 +127,7 @@ Normalized events (install, session, turn_started, message, thought, tool_call,| Swift SDK | `AgentRun.events(cursor:)` || Rust | `Agents::events` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- |@@ -133,15 +137,15 @@ Normalized events (install, session, turn_started, message, thought, tool_call,| `run_id` | `string` | required | `run_id` from `agent_start`. || `space` | `string` | required | Space id or name. |-### Result+#### ResultJSON: `run_id`, `status`, `phase`, `events` (each `seq`, `ts_ms`, `turn`, `kind`, and `text`, `tool_id`, `tool_title`, `tool_kind`, `tool_status`, `stop_reason` when present; `category`: `message`, `user`, `activity` or `hidden`, and a one-line `summary` for activity; `raw` on request), `cursor` and `caught_up`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-## agent_status+### agent_statusRead an agent run's status and result.@@ -156,7 +160,7 @@ status is running, idle, failed, crashed or unknown ('unknown' is never a guess)| Swift SDK | `AgentRun.status()` || Rust | `Agents::status` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- |@@ -164,15 +168,15 @@ status is running, idle, failed, crashed or unknown ('unknown' is never a guess)| `space` | `string` | required | Space id or name. || `tail` | `integer` | `40` | Rendered output lines to return. Default 40. At least 0. |-### Result+#### ResultJSON: `run_id`, `agent`, `status`, `phase`, `reason`, `turn`, `alive`, `accepts_message`, `summary`, `created_at`, `result` (`text`, `stop_reason`, `usage`, `error`, `tool_calls`), `output_tail` and `space`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-## agent_interrupt+### agent_interruptInterrupt an agent run's current turn.@@ -187,22 +191,22 @@ Cancels the turn in flight (ACP session/cancel); the session stays open for agen| Swift SDK | `AgentRun.interrupt()` || Rust | `Agents::interrupt` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- || `run_id` | `string` | required | `run_id` from `agent_start`. || `space` | `string` | required | Space id or name. |-### Result+#### ResultJSON: `run_id`, `interrupted` and `status`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-## agent_stop+### agent_stopStop an agent run.@@ -217,22 +221,22 @@ Ends the run, then verifies its process is gone; reports stopped=false rather th| Swift SDK | `AgentRun.stop()` || Rust | `Agents::stop` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- || `run_id` | `string` | required | `run_id` from `agent_start`. || `space` | `string` | required | Space id or name. |-### Result+#### ResultJSON: `run_id`, `stopped`, `alive` and `reason`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-## agent_list+### agent_listList agent runs in the Space.@@ -247,21 +251,21 @@ Every run in the Space, newest first, including runs another client started.| Swift SDK | `space.agents.list()` || Rust | `Agents::list` |-### Parameters+#### Parameters| Parameter | Type | Default | Description || --- | --- | --- | --- || `space` | `string` | required | Space id or name. |-### Result+#### ResultJSON: `{"space", "runs"}`, each run with `run_id`, `agent`, `status`, `phase`, `reason`, `turn`, `alive`, `accepts_message`, `summary`, `created_at` and `label`.-### Errors+#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)+[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)-## agent_capabilities+### agent_capabilitiesReport what the agent harnesses support.@@ -276,14 +280,1452 @@ Every harness: readiness (including whether a credential is available, with a hi| Swift SDK | `space.agents.harnessCapabilities()` || Rust | `agents::capabilities` |-### Parameters+#### ParametersNo parameters.-### Result+#### ResultJSON: `protocol`, `statuses`, `event_kinds`, `harnesses` (each `id`, `name`, `ready` (supported and not `auth: missing`), `supported`, `auth` (`ok`: a key saved in Cua Spaces (Settings → Agents) or one this server can forward with env_from_host; `missing`: none, so a run needs a sign-in inside its Space; `unknown`: the harness may be set up through its own config), `auth_hint`, `installs`, `keys`, `endpoint_wires`, `sandbox_mcp`, `interactive_cli`, `notes`), `forwardable_env` and `runner`.-### Errors+#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++## Persistent agents++Named agents whose memory outlives their Space: homes in Cua Volume, routines, notifications, pause and resume, access to the user's computers.++| Tool | Description |+| --- | --- |+| [`persistent_agent_create`](#persistent_agent_create) | Create a named agent whose memory outlives its Space. |+| [`persistent_agent_list`](#persistent_agent_list) | List persistent agents. |+| [`persistent_agent_remove`](#persistent_agent_remove) | Forget a persistent agent. |+| [`persistent_agent_send`](#persistent_agent_send) | Give a persistent agent a turn. |+| [`persistent_agent_save`](#persistent_agent_save) | Save a persistent agent's home now. |+| [`agent_pause`](#agent_pause) | Pause a persistent agent: its run, its routines and its Space. |+| [`agent_resume`](#agent_resume) | Resume a paused persistent agent. |+| [`routine_add`](#routine_add) | Schedule a recurring turn for a persistent agent. |+| [`routine_list`](#routine_list) | List routines. |+| [`routine_remove`](#routine_remove) | Delete a routine. |+| [`routine_set_enabled`](#routine_set_enabled) | Turn a routine on or off. |+| [`notify_user`](#notify_user) | Tell the user something in the Cua app. |+| [`notifications_list`](#notifications_list) | Read the notifications feed. |+| [`notifications_ack`](#notifications_ack) | Mark notifications read. |+| [`computer_access_grant`](#computer_access_grant) | Let a persistent agent use one of the user's computers. |+| [`computer_access_revoke`](#computer_access_revoke) | Take back a persistent agent's access to a computer. |+| [`computer_access_list`](#computer_access_list) | List per-agent computer access. |++### persistent_agent_create++Create a named agent whose memory outlives its Space.++A persistent agent is a harness with a name, a Space and a home in the Cua Volume (agents/<name>/). Its harness keeps its memory in the home (Claude Code auto memory, Codex memories, Hermes MEMORY.md, the OpenClaw workspace), which is restored into the Space before each run and saved after each turn, so the agent remembers across runs, Space releases and machines. One run writes a home at a time. Start it with persistent_agent_send (or agent_start with home=<name>); the daemon notifies the user when a turn ends. Inside the Space the agent gets the `cua` bridge: notify_user, the drive, and the user's computers it was granted.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:persistent_agent_create`; destructive |+| Swift SDK | `spaces.persistentAgents.create(...)` |+| Rust | `Persistent::create` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `"claude-code" \| "gemini-cli" \| "google-antigravity" \| "goose" \| "hermes" \| "openai-codex" \| "openclaw" \| "opencode" \| "pi"` | required | Harness id. `agent_capabilities` lists what each needs. |+| `base_url` | `string` | none | A custom model endpoint base URL. |+| `env` | `map of string` | `{}` | More environment for every run (not secrets; see `env_from_host`). |+| `env_from_host` | `string[]` | `[]` | Provider key variables forwarded from this server's environment (or the keys saved in Cua Spaces) at every start, for example ["ANTHROPIC_API_KEY"]. Names only. |+| `model` | `string` | none | Model id. |+| `name` | `string` | required | The agent's name: 1-63 of a-z, 0-9, `.`, `_`, `-`. Its home is `agents/<name>/` in the Cua Volume. |+| `space` | `string` | required | The Space it works in (id or name). |++#### Result++JSON: the agent record: `name`, `harness`, `space`, `model`, `base_url`, `env_from_host`, `paused`, `space_state` and `created_ms`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`agent`](/spaces/reference#agent)++### persistent_agent_list++List persistent agents.++Every persistent agent of this machine's cua home, with its Space, its current run and when its home was last saved.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:persistent_agent_list`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.persistentAgents.list()` |+| Rust | `Persistent::list` |++#### Parameters++No parameters.++#### Result++JSON: `{"agents"}`, each with `name`, `harness`, `space`, `paused`, `space_state`, `run_id`, `saved_ms` and `last_error`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### persistent_agent_remove++Forget a persistent agent.++Stops its run, removes its routines and forgets it. Its home (agents/<name>/) stays in the Cua Volume; delete it there.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:persistent_agent_remove`; destructive |+| Swift SDK | `spaces.persistentAgents.remove(_:)` |+| Rust | `Persistent::remove` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | required | The persistent agent's name. |++#### Result++JSON: `removed` (the record). The home stays in the Cua Volume.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`agent`](/spaces/reference#agent)++### persistent_agent_send++Give a persistent agent a turn.++A follow-up to the agent's idle run, or a new run with its home restored when it has none. Refused while a turn runs (never interrupts) and while paused. Follow the run with agent_events on the agent's Space.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:persistent_agent_send`; destructive |+| Swift SDK | `spaces.persistentAgents.send(_:_:)` |+| Rust | `Persistent::send` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | required | The persistent agent's name. |+| `text` | `string` | required | The message (the prompt of a new run, or a follow-up). |++#### Result++JSON: `run_id`, `started` (a new run, with the home restored) and `restored` (`files`, `bytes`, `millis`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`agent`](/spaces/reference#agent), [`lease_held`](/spaces/reference#lease_held)++### persistent_agent_save++Save a persistent agent's home now.++Saves the agent's home from its Space into the Cua Volume now (the daemon also saves after every turn): only files whose SHA-256 changed move.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:persistent_agent_save`; mutating, idempotent |+| Swift SDK | `spaces.persistentAgents.save(_:)` |+| Rust | `Persistent::save` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | required | The persistent agent's name. |++#### Result++JSON: `files`, `bytes`, `unchanged`, `removed`, `blocked` (files the secret scanner kept out) and `millis`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`agent`](/spaces/reference#agent), [`secret_detected`](/spaces/reference#secret_detected)++### agent_pause++Pause a persistent agent: its run, its routines and its Space.++One call: stops the run, saves the home, releases the home's lease, keeps the agent's routines from firing, and suspends its Space when it is local. A cloud Space cannot be suspended (Fleet has no per-claim pause), so pausing releases it after the home is saved; agent_resume creates it again from the same image and restores the home. Apps open in a released cloud Space do not come back. The user's own machines are never suspended.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:agent_pause`; mutating, idempotent |+| Swift SDK | `spaces.persistentAgents.pause(_:)` |+| Rust | `Persistent::pause` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | required | The persistent agent's name. |++#### Result++JSON: `stopped_run`, `saved` (the home save), `space_state` (`suspended`, `released` or `running`) and `millis`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`agent`](/spaces/reference#agent), [`sandbox`](/spaces/reference#sandbox)++### agent_resume++Resume a paused persistent agent.++Resumes a suspended local Space, or creates a released cloud Space again from the same image, restores the home and lets routines fire again. With `prompt`, starts a run on it.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | cloud |+| Approval | permission `spaces:agent_resume`; destructive |+| Swift SDK | `spaces.persistentAgents.resume(_:prompt:)` |+| Rust | `Persistent::resume` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | required | The persistent agent's name. |+| `prompt` | `string` | none | Start a run on this prompt once the agent is back. Default: none (the next message or routine starts one). |++#### Result++JSON: `space` (it can change when a cloud Space is created again), `recreated`, `restored`, `run_id` and `ready_ms` (from the call to the home being back in a ready Space).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`agent`](/spaces/reference#agent), [`sandbox`](/spaces/reference#sandbox), [`fleet`](/spaces/reference#fleet)++### routine_add++Schedule a recurring turn for a persistent agent.++Fired by `cua daemon` whether or not an app is open, as a turn of the agent (`[routine] <title>: <prompt>`). A routine never interrupts a turn: a busy or paused agent skips that slot. A daemon that was asleep fires a missed routine once on waking.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:routine_add`; destructive |+| Swift SDK | `spaces.persistentAgents.addRoutine(...)` |+| Rust | `Persistent::routine_add` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | required | The persistent agent that runs it. |+| `daily_at` | `string` | none | Every day at `HH:MM` (local time). |+| `enabled` | `boolean` | `true` | Default true. |+| `every_minutes` | `integer` | none | Every N minutes. |+| `prompt` | `string` | required | What the agent is asked each time. |+| `title` | `string` | required | A short title (shown in the app and prefixed to the turn). |+| `weekly_on` | `string` | none | Every week at `<weekday> HH:MM` (local time), for example `mon 09:00`. |++#### Result++JSON: the routine: `id`, `botID` (the agent), `title`, `prompt`, `schedule`, `isEnabled` and `createdAt`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### routine_list++List routines.++Routines with their next firing and what the last one did.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:routine_list`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.persistentAgents.routines(agent:)` |+| Rust | `Persistent::routines` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | none | Only this persistent agent's routines. Default: all. |++#### Result++JSON: `{"routines"}`, each with `id`, `botID`, `title`, `prompt`, `schedule`, `label`, `isEnabled`, `lastFiredAt`, `lastRunID`, `lastOutcome` and `next_fire`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### routine_remove++Delete a routine.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:routine_remove`; mutating, idempotent |+| Swift SDK | `spaces.persistentAgents.removeRoutine(_:)` |+| Rust | `Persistent::routine_remove` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `id` | `string` | required | The routine's id. |++#### Result++JSON: `removed` (the id).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### routine_set_enabled++Turn a routine on or off.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:routine_set_enabled`; mutating, idempotent |+| Swift SDK | `spaces.persistentAgents.setRoutineEnabled(_:_:)` |+| Rust | `Persistent::routine_set_enabled` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `enabled` | `boolean` | required | On or off. |+| `id` | `string` | required | The routine's id. |++#### Result++JSON: the routine.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### notify_user++Tell the user something in the Cua app.++Posts a notification the Cua app shows ("Your research is ready"). Agents inside a Space get the same tool on their `cua` bridge.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:notify_user`; destructive |+| Swift SDK | `spaces.notifications.post(...)` |+| Rust | `notify::Feed::post` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | none | The persistent agent it is about, if any. |+| `body` | `string` | none | The details. Default empty. |+| `title` | `string` | required | One short line. |++#### Result++JSON: `notified` and `id`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### notifications_list++Read the notifications feed.++The feed the Cua app turns into system notifications: turn ends of persistent agents, notify_user calls, access requests and failures. It persists while no app is open.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:notifications_list`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.notifications.list(...)` |+| Rust | `notify::Feed::list` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `since_ms` | `integer` | none | Only ones newer than this (Unix ms). At least 0. |+| `unread_only` | `boolean` | `false` | Only unread ones. Default false. |++#### Result++JSON: `{"notifications"}`, newest first, each with `id`, `at_ms`, `agent`, `kind` (`turn_ended`, `message`, `approval`, `error`), `title`, `body`, `run_id`, `space` and `read`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### notifications_ack++Mark notifications read.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:notifications_ack`; mutating, idempotent |+| Swift SDK | `spaces.notifications.markRead(_:)` |+| Rust | `notify::Feed::ack` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `ids` | `string[]` | `[]` | Ids to mark read. Default: every notification. |++#### Result++JSON: `marked` (how many changed).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### computer_access_grant++Let a persistent agent use one of the user's computers.++Lets one persistent agent use one of the user's machines (its computer-use tools, through the agent's bridge). Asks the user for presence (Touch ID or passphrase) first. Other agents of the account get nothing.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:computer_access_grant`; destructive |+| Swift SDK | `spaces.persistentAgents.allowComputer(_:machine:)` |+| Rust | `access::Access::grant` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | required | The persistent agent. |+| `expires_in_secs` | `integer` | none | End the grant after this many seconds. Default: until revoked. At least 0. |+| `machine` | `string` | required | The machine (a Space id, usually `relay:<machine-id>` from `cua host setup`). |++#### Result++JSON: the grant: `id`, `agent`, `machine`, `created_ms`, `expires_ms`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_confirmed`](/spaces/reference#not_confirmed)++### computer_access_revoke++Take back a persistent agent's access to a computer.++Takes the access back at once: the agent's next call is refused. No presence needed.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:computer_access_revoke`; mutating, idempotent |+| Swift SDK | `spaces.persistentAgents.revokeComputer(_:machine:)` |+| Rust | `access::Access::revoke` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | required | The persistent agent. |+| `machine` | `string` | none | The machine. Default: every machine. |++#### Result++JSON: `revoked` (how many grants).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### computer_access_list++List per-agent computer access.++Which agents may use which of the user's computers, and the audited record of grants, uses and refusals.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:computer_access_list`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.persistentAgents.computerAccess(agent:)` |+| Rust | `access::Access::grants` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | none | Only this persistent agent's grants. Default: all. |+| `audit` | `integer` | `0` | Include the audit log's newest entries (this many). Default 0. At least 0. |++#### Result++JSON: `{"grants"}` (each `id`, `agent`, `machine`, `created_ms`, `expires_ms`, `revoked`) and, with `audit`, `audit` (newest first: `ts_ms`, `principal`, `action`, `path` (the machine), `detail`) plus `audit_verified`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++## Session teleport++Move a signed-in app session from this machine into a Space.++| Tool | Description |+| --- | --- |+| [`teleport_manifest`](#teleport_manifest) | Describe what a session teleport would move. |+| [`teleport_app`](#teleport_app) | Move an app session into the Space. |++### teleport_manifest++Describe what a session teleport would move.++Read on this machine from the app's own provider: items, sizes, which are sensitive and which are checked by default. With `space`, also reports whether the Space can import the app.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:teleport_manifest`, in `spaces:readonly`; read-only, idempotent |+| Requires (this machine) | `app_sessions` |+| Swift SDK | `space.sessions.manifest(for:scope:)` |+| Rust | `Teleport::manifest` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `app` | `string` | required | App id, e.g. `firefox`, `chrome`, `claude-code`. |+| `scope` | `string` | `full` | `full` (the profile) or `tabs`. Default `full`. |+| `space` | `string` | none | Space to check the receiving side of (`GetManifest`). Optional. |++#### Result++JSON: `app`, `display_name`, `scope`, `items` (each `relative_path`, `label`, `estimated_bytes`, `is_sensitive`, `is_checked_by_default`), `total_estimated_bytes`, `notes`; with `space`, a `receiver` (`supported`, `limitation`, `app_installed`, `supported_apps`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing)++#### Notes++- The manifest is the thing an Approval is minted from: the SDK will not send a teleport the caller has not seen a manifest for.++### teleport_app++Move an app session into the Space.++Moves the app's signed-in session into the Space, but only through the Cua Keyvault and only with the user's consent. This tool never delivers on its own: the first call files a Keyvault access request and returns a request_id; the user approves it in Cua (Touch ID or the login password) or an unattended rule matches; a later call with the same request_id has the Keyvault broker perform the delivery over the daemon's authenticated channel. Without `include` the manifest's default-checked items move, never everything.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:teleport_app`; destructive |+| Requires (spacesd) | `teleport.*` |+| Requires (this machine) | `app_sessions` |+| Swift SDK | `space.sessions.send(_ approval:)` |+| Rust | `Teleport::send` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `acknowledge_sensitive` | `boolean` | none | Must be true when the selection holds a sensitive item (credentials, cookies). The consent is explicit rather than defaulted. |+| `app` | `string` | required | App id, e.g. `firefox`, `chrome`, `claude-code`. |+| `include` | `string[]` | none | Manifest `rel_path`s to send. Default: the manifest's default-checked items, never everything. An empty list is refused as ambiguous. |+| `request_id` | `string` | none | The Keyvault request id returned by a previous call. Present on a retry after the user approved the teleport in Cua; the broker then performs the delivery. Absent on the first call. |+| `scope` | `string` | `full` | `full` or `tabs`. Default `full`. |+| `space` | `string` | required | Space id or name. |++#### Result++JSON. First call: `consent_required: true`, a `request_id`, `would_send` and `approve`. Retry with `request_id` once the user approved: `moved: true` with `transferred_paths` (what the Space imported), `import_ids` and `expires_ms`; or still `consent_required` while pending; or an `error` with the Keyvault code (`requires_cua_app`, `denied`, `disabled`) when it cannot proceed.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`teleport_refused`](/spaces/reference#teleport_refused), [`transfer_failed`](/spaces/reference#transfer_failed)++#### Notes++- Works on every provider. A comment in the SDK claiming teleport was cloud-only was stale and was a real bug: callers were being told to provision a metered Space for work a free Local Space does.+- Consent is owned by the Keyvault broker, not this tool: the automation caller is treated as an unverified third party, so a delivery needs a live consent or an audited unattended rule and can never be self-approved (red-team E2).++## Keyvault++Use the user's saved credentials in a Space, only with their approval.++| Tool | Description |+| --- | --- |+| [`request_site_login`](#request_site_login) | Sign in to a site in the Space with the user's saved password. |++### request_site_login++Sign in to a site in the Space with the user's saved password.++Signs in to a website in the Space's browser with a password the user saved in the Cua Keyvault (imported from their browser). The first call files a Keyvault request and returns a request_id; the user approves it in Cua (Touch ID or the login password), once per sign-in by default. Call again with the same space, url and request_id: the Keyvault checks the page is on the saved login's exact origin, types the username and password through the Space's cua-driver, submits the form and returns what it did, never the password. Pass the browser tab you opened (session, target_id, tab_id from get_browser_state on the same Space) to sign in there; without one the Keyvault opens its own browser in the Space on `url` and returns its target_id and tab_id. `agent` names the persistent agent asking, shown to the user.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:request_site_login`; destructive |+| Requires (spacesd) | `driver` |+| Swift SDK | `space.requestSiteLogin(url:)` |+| Rust | `site_login::request_site_login` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `agent` | `string` | none | The persistent agent asking (shown to the user in the approval). |+| `relay_plaintext_ack` | `boolean` | `false` | Sends the password over a relay connection that predates end-to-end sealing even though the relay could read it in transit. Default `false`: such a Space refuses the fill instead (S1). |+| `request_id` | `string` | none | The request id a previous call returned. Present on the retry after the user approved; absent on the first call. |+| `session` | `string` | none | cua-driver lifecycle session label of the browser tab to sign in. |+| `space` | `string` | required | Space id or name. |+| `tab_id` | `string` | none | cua-driver tab id (from `get_browser_state`). |+| `target_id` | `string` | none | cua-driver browser target id (from `get_browser_state`). |+| `url` | `string` | required | The site's sign-in page (http or https), for example `https://github.com/login`. |+| `username` | `string` | none | Which saved username, when the site has several. |+| `wait_secs` | `integer` | `20` | Seconds to wait for the user's decision on a retry. Default 20, at most 120. At least 0. |++#### Result++JSON. First call: `status: "pending"`, a `request_id`, `site` and `space`. Retry with `request_id`: `status: "filled"` with `site`, `origin`, `username_hint` (masked), `submitted`, `page_url` and the browser `target_id`/`tab_id` it signed in; `status: "pending"` while the user decides; `status: "denied"` when they declined. Never the password.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing), [`login_refused`](/spaces/reference#login_refused)++#### Notes++- The password never reaches the caller: the Keyvault fills the form through the Space's cua-driver and returns only a masked username.+- Approval is required by default for every sign-in (one use per approval); only an unattended rule the user wrote skips it.++## Cua Volume++Read and write the volume every Space and agent shares, decide who may reach what, and see where it is stored and how it syncs.++| Tool | Description |+| --- | --- |+| [`volume_ls`](#volume_ls) | List a folder of the Cua Volume. |+| [`volume_read`](#volume_read) | Read a file from the Cua Volume. |+| [`volume_write`](#volume_write) | Write a file to the Cua Volume. |+| [`volume_delete`](#volume_delete) | Delete a file from the Cua Volume. |+| [`volume_history`](#volume_history) | List a Cua Volume file's versions. |+| [`volume_restore`](#volume_restore) | Restore an old version of a Cua Volume file. |+| [`volume_grant`](#volume_grant) | Grant an agent or Space more Cua Volume access. |+| [`volume_revoke`](#volume_revoke) | Revoke a Cua Volume grant. |+| [`volume_grants`](#volume_grants) | List Cua Volume grants. |+| [`volume_request_access`](#volume_request_access) | Ask the user for more Cua Volume access. |+| [`volume_requests`](#volume_requests) | List Cua Volume access requests waiting for the user. |+| [`volume_approve`](#volume_approve) | Approve a Cua Volume access request. |+| [`volume_deny`](#volume_deny) | Decline a Cua Volume access request. |+| [`volume_audit`](#volume_audit) | Read the Cua Volume audit log. |+| [`volume_storage`](#volume_storage) | Show where the Cua Volume keeps its bytes. |+| [`volume_storage_set`](#volume_storage_set) | Test or change where the Cua Volume keeps its bytes. |+| [`volume_mount_status`](#volume_mount_status) | Show whether the Cua Volume is mounted as a volume. |+| [`volume_mount`](#volume_mount) | Mount the Cua Volume as a volume. |+| [`volume_unmount`](#volume_unmount) | Unmount the Cua Volume volume. |+| [`volume_sync_status`](#volume_sync_status) | Show the Cua Volume's sync state across devices. |+| [`volume_sync_events`](#volume_sync_events) | Wait for Cua Volume sync events. |+| [`volume_sync_resolve`](#volume_sync_resolve) | Mark a Cua Volume sync conflict as seen. |+| [`volume_cache_stats`](#volume_cache_stats) | Show the Cua Volume block cache. |+| [`volume_cache_set`](#volume_cache_set) | Set the Cua Volume block cache's size cap. |+| [`volume_cache_clear`](#volume_cache_clear) | Clear the Cua Volume block cache. |++### volume_ls++List a folder of the Cua Volume.++Cua Volume is one versioned drive per account, shared by every Space and agent: public/ (shared reference, read by everyone), agents/<agent>/ (a persistent agent's home: memory, outputs, inbox) and spaces/<space>/ (per-Space scratch). As the user (the default) you see everything. With as_agent (and in_space) you see exactly what that agent sees: it reads public/, writes its own home and its Space's folder, and anything wider needs a grant the user approves.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_ls`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeLs(path:asAgent:inSpace:)` |+| Rust | `cua_volume::Session::ls` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | See the drive as this persistent agent does (`ada`). Only narrows: the agent's defaults and grants apply. Default: the user (the whole drive). |+| `in_space` | `string` | none | With `as_agent`: the Space id the agent is in, whose `spaces/<space>/` folder it may write. |+| `path` | `string` | none | Folder, for example `agents/ada/` or `public/`. Default: the root. |++#### Result++JSON: `path`, `principal` and `entries` (each `path`, `name`, `folder`, `size`, `modified_ms`, `etag`, `mode`, and `sync` when a file has something to say: `state` `pending_upload`, `conflict` (with `conflict_path`) or `conflict_copy`, and `written_by` when another device wrote it last).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`volume_backend`](/spaces/reference#volume_backend)++### volume_read++Read a file from the Cua Volume.++Reads at most 8 MiB. Text comes back as utf8, anything else as base64.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_read`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeRead(path:version:asAgent:inSpace:)` |+| Rust | `cua_volume::Session::read` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | See `volume_ls`. |+| `in_space` | `string` | none | See `volume_ls`. |+| `path` | `string` | required | File path, for example `agents/ada/memory/MEMORY.md`. |+| `version` | `string` | none | A version id from `volume_history`. Default: the current version. |++#### Result++JSON: `path`, `size`, `etag`, `version`, `modified_ms`, `encoding` (`utf8` or `base64`), `content`, and `sync` while the drive's services run (`state` `synced`, `pending_upload`, `conflict` or `conflict_copy`; `written_by`, `conflict_path`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`volume_backend`](/spaces/reference#volume_backend)++### volume_write++Write a file to the Cua Volume.++Every write is a new version (history is kept). if_etag makes it a compare-and-swap, create_only makes it create-only. Writes under agents/ are scanned for secrets and refused by kind and line; keep credentials in the Keyvault.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_write`; destructive |+| Swift SDK | `spaces.volumeWrite(path:content:encoding:ifEtag:createOnly:asAgent:inSpace:)` |+| Rust | `cua_volume::Session::write` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | See `volume_ls`. |+| `content` | `string` | required | The content, as text or base64 (see `encoding`). At most 8 MiB. |+| `create_only` | `boolean` | `false` | Write only if nothing is at `path` yet. Default false. |+| `encoding` | `string` | `utf8` | `utf8` or `base64`. Default `utf8`. |+| `if_etag` | `string` | none | Write only if the current version has this etag (from `volume_read` or `volume_ls`): a compare-and-swap. |+| `in_space` | `string` | none | See `volume_ls`. |+| `path` | `string` | required | File path. |++#### Result++JSON: the new version's `key`, `size`, `etag`, `version` and `modified_ms`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`precondition_failed`](/spaces/reference#precondition_failed), [`secret_detected`](/spaces/reference#secret_detected), [`volume_backend`](/spaces/reference#volume_backend)++### volume_delete++Delete a file from the Cua Volume.++Adds a delete marker; volume_history and volume_restore still reach the old versions.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_delete`; destructive |+| Swift SDK | `spaces.volumeDelete(path:ifEtag:asAgent:inSpace:)` |+| Rust | `cua_volume::Session::delete` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | See `volume_ls`. |+| `if_etag` | `string` | none | Delete only if the current version has this etag. |+| `in_space` | `string` | none | See `volume_ls`. |+| `path` | `string` | required | File path. |++#### Result++JSON: `{"deleted": <path>}`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`precondition_failed`](/spaces/reference#precondition_failed), [`volume_backend`](/spaces/reference#volume_backend)++### volume_history++List a Cua Volume file's versions.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_history`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeHistory(path:asAgent:inSpace:)` |+| Rust | `cua_volume::Session::history` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | See `volume_ls`. |+| `in_space` | `string` | none | See `volume_ls`. |+| `path` | `string` | required | File path. |++#### Result++JSON: `path` and `versions` (each `version`, `size`, `modified_ms`, `deleted`, `latest`), newest first.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`volume_backend`](/spaces/reference#volume_backend)++### volume_restore++Restore an old version of a Cua Volume file.++Writes the old version's content as a new version, so the restore itself can be undone.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_restore`; destructive |+| Swift SDK | `spaces.volumeRestore(path:version:asAgent:inSpace:)` |+| Rust | `cua_volume::Session::restore` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | See `volume_ls`. |+| `in_space` | `string` | none | See `volume_ls`. |+| `path` | `string` | required | File path. |+| `version` | `string` | required | The version id to restore (from `volume_history`). |++#### Result++JSON: the new current version's `key`, `size`, `etag`, `version` and `modified_ms`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`secret_detected`](/spaces/reference#secret_detected), [`volume_backend`](/spaces/reference#volume_backend)++### volume_grant++Grant an agent or Space more Cua Volume access.++Only for the user: widens an agent's or a Space's access past the defaults (an agent reads public/ and writes its own home and its Space's folder). The user confirms with presence (Touch ID, the login password or the vault passphrase) before anything widens; a grant that widens nothing is refused.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_grant`; destructive |+| Swift SDK | `spaces.volumeGrant(principal:prefix:mode:expiresInSecs:note:)` |+| Rust | `cua_volume::Drive::grant` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `expires_in_secs` | `integer` | none | Lifetime in seconds. Default: until revoked. At least 0. |+| `mode` | `string` | required | `r` (read) or `rw` (read and write). |+| `note` | `string` | none | A note shown next to the grant. |+| `prefix` | `string` | required | A folder (`agents/writer/outputs/`) or one file. |+| `principal` | `string` | required | `agent:<name>` or `space:<id>`. |++#### Result++JSON: the grant (`id`, `principal`, `prefix`, `mode`, `created_ms`, `expires_ms`, `revoked`, `note`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_confirmed`](/spaces/reference#not_confirmed), [`forbidden`](/spaces/reference#forbidden)++### volume_revoke++Revoke a Cua Volume grant.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_revoke`; mutating, idempotent |+| Swift SDK | `spaces.volumeRevoke(grantId:)` |+| Rust | `cua_volume::Drive::revoke` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `grant_id` | `string` | required | The grant id (from `volume_grants`). |++#### Result++JSON: the revoked grant.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_grants++List Cua Volume grants.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_grants`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeGrants(all:)` |+| Rust | `cua_volume::Drive::grants` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `all` | `boolean` | `false` | Include expired and revoked grants. Default false. |++#### Result++JSON: `{"grants": [...]}`, live grants only unless `all`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_request_access++Ask the user for more Cua Volume access.++Files a request the user sees in Cua; it grants nothing by itself. Poll volume_ls or volume_read to see when access arrives.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_request_access`; destructive |+| Swift SDK | `spaces.volumeRequestAccess(prefix:mode:reason:asAgent:inSpace:)` |+| Rust | `cua_volume::Drive::request_access` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `as_agent` | `string` | none | The agent asking. |+| `in_space` | `string` | none | See `volume_ls`. |+| `mode` | `string` | required | `r` or `rw`. |+| `prefix` | `string` | required | The folder or file wanted. |+| `reason` | `string` | none | Why (shown to the user as the agent's words). |++#### Result++JSON: the request (`id`, `principal`, `prefix`, `mode`, `reason`, `created_ms`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_requests++List Cua Volume access requests waiting for the user.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_requests`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeRequests()` |+| Rust | `cua_volume::Drive::requests` |++#### Parameters++No parameters.++#### Result++JSON: `{"requests": [...]}`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_approve++Approve a Cua Volume access request.++Only for the user, with presence.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_approve`; destructive |+| Swift SDK | `spaces.volumeApprove(requestId:expiresInSecs:)` |+| Rust | `cua_volume::Drive::approve` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `expires_in_secs` | `integer` | none | Lifetime in seconds. Default: until revoked. At least 0. |+| `request_id` | `string` | required | The request id (from `volume_requests`). |++#### Result++JSON: the grant the request became.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_confirmed`](/spaces/reference#not_confirmed), [`forbidden`](/spaces/reference#forbidden)++### volume_deny++Decline a Cua Volume access request.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_deny`; destructive |+| Swift SDK | `spaces.volumeDeny(requestId:)` |+| Rust | `cua_volume::Drive::deny` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `request_id` | `string` | required | The request id. |++#### Result++JSON: `{"denied": <request id>}`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_audit++Read the Cua Volume audit log.++Every grant, revocation, request, refusal, blocked secret, sync, lease and agent access, from a hash-chained log; an edited or truncated log reports verified=false.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_audit`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeAudit(limit:)` |+| Rust | `cua_volume::audit::AuditLog::tail` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `limit` | `integer` | `50` | How many. Default 50, at most 1000. At least 0. |++#### Result++JSON: `events` (each `seq`, `ts_ms`, `principal`, `action`, `path`, `detail`), newest first, and `verified` (with `error` when the hash chain does not verify).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_storage++Show where the Cua Volume keeps its bytes.++Only for the user. Keys are never returned; `has_keys` says whether the credential store holds them.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_storage`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeStorage()` |+| Rust | `cua_volume::service::DriveService::storage` |++#### Parameters++No parameters.++#### Result++JSON: `backend` (`fs` or `s3`), `fs_path`, `s3` (`endpoint`, `region`, `bucket`, `root`, `path_style`), `has_keys`, `cloud_available`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_storage_set++Test or change where the Cua Volume keeps its bytes.++Only for the user. Tests the storage first (bucket versioning, list, then write, read back and delete a probe object; retries path-style addressing to tell when a self-hosted store needs it); with dry_run nothing else happens. Otherwise, when the test passes, saves the setting and the keys (credential store) and switches the running drive to it without a restart. The bucket must have versioning on. cloud is refused.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_storage_set`; mutating, idempotent |+| Swift SDK | `spaces.volumeStorageSet(update:)` |+| Rust | `cua_volume::service::DriveService::set_storage` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `access_key_id` | `string` | none | The access key id (with the secret; both or neither). Saved in the credential store, never in a file. |+| `backend` | `string` | required | `fs` (this machine) or `s3` (an S3-compatible bucket: AWS S3, R2, MinIO). `cloud` is refused. |+| `dry_run` | `boolean` | `false` | Only test the connection; change nothing. Default false. |+| `s3` | `object` | none | The bucket, for `s3`. |+| `s3.bucket` | `string` | required | |+| `s3.endpoint` | `string` | `null` | `http://127.0.0.1:9000`, `https://<account>.r2.cloudflarestorage.com`; absent for AWS. |+| `s3.path_style` | `boolean` | `null` | Path-style addressing (MinIO and most self-hosted stores). |+| `s3.region` | `string` | `null` | `us-east-1`; `auto` for R2. Default `us-east-1`. |+| `s3.root` | `string` | `null` | A key prefix inside the bucket. Default none. |+| `secret_access_key` | `string` | none | The secret access key. |++#### Result++JSON: `ok`, `reachable`, `authorized`, `versioning`, `detail` (a sentence when not ok saying how to fix it), `problem` (`unreachable`, `bad_keys`, `forbidden`, `bucket_missing`, `versioning_off`, `path_style_needed`) and `applied` (saved and switched live).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_mount_status++Show whether the Cua Volume is mounted as a volume.++Only for the user. The drive can appear as a volume (Finder on macOS, a FUSE mount on Linux); it is off until the user turns it on with volume_mount.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_mount_status`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeMountStatus()` |+| Rust | `cua_volume::service::DriveService::mount_status` |++#### Parameters++No parameters.++#### Result++JSON: `enabled`, `state` (`off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`), `method` (`nfs`, `fuse`, `fskit`, `none`), `path`, `volume_name`, `detail`, `settings_url`; plus the Spaces' own: `volumes` (mounted in a Space: `space`, `mount_path`, `backend`, `principal`) and `volume_errors` (each `space` and `error`: why a Space has no Cua Volume, for example no /dev/fuse in a container on runc).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_mount++Mount the Cua Volume as a volume.++Only for the user. Turns the mount on (kept across restarts) and mounts. Idempotent.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_mount`; mutating, idempotent |+| Swift SDK | `spaces.volumeMount()` |+| Rust | `cua_volume::service::DriveService::mount` |++#### Parameters++No parameters.++#### Result++JSON: the mount status after the attempt (see volume_mount_status).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_unmount++Unmount the Cua Volume volume.++Only for the user. Turns the mount off; files still uploading land first.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_unmount`; mutating, idempotent |+| Swift SDK | `spaces.volumeUnmount()` |+| Rust | `cua_volume::service::DriveService::unmount` |++#### Parameters++No parameters.++#### Result++JSON: the mount status after unmounting.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`volume_backend`](/spaces/reference#volume_backend)++### volume_sync_status++Show the Cua Volume's sync state across devices.++Devices sharing one bucket learn each other's changes through a change log in the bucket itself. A write that lost to a later one is never dropped: it stays in the file's history and as the visible conflict copy. A persistent agent may call it too (through its bridge): it sees the pending uploads and conflicts of files it can read and its own Space's volume. In a Space it reports this machine's view.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_sync_status`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeSyncStatus()` |+| Rust | `cua_volume::service::DriveService::sync_status` |++#### Parameters++No parameters.++#### Result++JSON: `device_id`, `device_name`, `feed` (`live`, `off` for a store on this machine, `offline` when the bucket stops answering, with `last_error`), `poll_interval_ms`, `last_poll_ms`, `last_remote_change_ms`, `pending_uploads`, `pending_bytes`, `conflicts` (each `path`, `conflict_path`, `winner_device`, `loser_device`, `winner_version`, `loser_version`, `ts_ms`), `devices` (each `id`, `name`, `this_device`, `last_seen_ms`, `last_change_ms`, `changes`), `last_error`, `pending` (each `path`, `bytes`: files still uploading), `backend` (`fs` or `s3`), `mount` (this machine's mount: `off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`), `cache` (a bucket's block cache, when there is one) and `volumes` (the volume mounted in Spaces: each `space`, `mount_path`, `backend`, `principal`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_sync_events++Wait for Cua Volume sync events.++Only for the user. A long poll: answers at once when events newer than since_seq exist, else waits up to wait_ms for one. Kinds: remote_change, remote_delete, upload_started, upload_done, upload_failed, conflict, error.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_sync_events`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeSyncEvents(sinceSeq:waitMs:)` |+| Rust | `cua_volume::service::DriveService::sync_events` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `since_seq` | `integer` | none | Return events after this `seq` (default 0: all kept). At least 0. |+| `wait_ms` | `integer` | none | Wait up to this long for one when none is newer (default 0, at most 30000). At least 0. |++#### Result++JSON: `events` (each `seq`, `ts_ms`, `kind`, `path`, `device`, `size`, `version`, `detail`) and `next_seq`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_sync_resolve++Mark a Cua Volume sync conflict as seen.++Only for the user. Clears the conflict from the list; both files stay.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_sync_resolve`; mutating, idempotent |+| Swift SDK | `spaces.volumeSyncResolve(path:)` |+| Rust | `cua_volume::service::DriveService::sync_resolve` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `path` | `string` | required | The file (or its conflict copy). |++#### Result++JSON: `{"resolved": <path>}`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden), [`not_found`](/spaces/reference#not_found)++### volume_cache_stats++Show the Cua Volume block cache.++Only for the user. Reads of a remote store go through a local block cache; counters are since the runtime started.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_cache_stats`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.volumeCacheStats()` |+| Rust | `cua_volume::service::DriveService::cache_stats` |++#### Parameters++No parameters.++#### Result++JSON: `dir`, `size_bytes`, `capacity_bytes`, `block_bytes`, `blocks`, `hits`, `misses`, `hit_rate`, `prefetched_bytes`, `evictions`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_cache_set++Set the Cua Volume block cache's size cap.++Only for the user. Evicts down to the new cap at once; kept across restarts.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_cache_set`; mutating, idempotent |+| Swift SDK | `spaces.volumeCacheSet(capacityBytes:)` |+| Rust | `cua_volume::service::DriveService::cache_set` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `capacity_bytes` | `integer` | required | Bytes (at least 268435456, 256 MiB). At least 0. |++#### Result++JSON: the cache stats after the change.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)++### volume_cache_clear++Clear the Cua Volume block cache.++Only for the user. Drops every cached block; files stay in the drive.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:volume_cache_clear`; mutating, idempotent |+| Swift SDK | `spaces.volumeCacheClear()` |+| Rust | `cua_volume::service::DriveService::cache_clear` |++#### Parameters++No parameters.++#### Result++JSON: the cache stats after clearing.++#### Errors-[`invalid_argument`](/spaces/reference/errors#invalid_argument)+[`invalid_argument`](/spaces/reference#invalid_argument), [`forbidden`](/spaces/reference#forbidden)diff --git a/docs/content/docs/spaces/reference/cloud.mdx b/docs/content/docs/spaces/reference/cloud.mdxdeleted file mode 100644index e7d026d8ea..0000000000--- a/docs/content/docs/spaces/reference/cloud.mdx+++ /dev/null@@ -1,178 +0,0 @@-----title: "Your cloud"-description: "Create Spaces in your own AWS, Google Cloud or Modal account: connect it, check it, and clean up what Cua created there."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`cloud_status`](#cloud_status) | List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. |-| [`cloud_connect`](#cloud_connect) | Connect a cloud account Spaces can be created in. |-| [`cloud_test`](#cloud_test) | Check a cloud account without creating anything. |-| [`cloud_disconnect`](#cloud_disconnect) | Forget a connected cloud account. |-| [`cloud_sweep`](#cloud_sweep) | Find and delete what Cua left in your clouds. |--## cloud_status--List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there.--Sandboxes and Spaces can run in the user's own cloud account: on="aws" (EC2), "gcp" (Compute Engine) or "modal" (Modal Sandboxes). EC2 and Compute Engine start one small VM per sandbox that runs the image with Docker; Modal runs one Modal sandbox. Either way the guest's cua-spacesd dials out to the cua.ai relay as a machine of the signed-in account (no inbound port), and the Space is that machine, relay:<machine>. Each cloud uses its own CLI sign-in; connect it first with cloud_connect (the user decides; it costs money in their account). Everything Cua creates is tagged cua-managed=true with this cua home's cua-owner and an expiry, recorded under the cua home, deleted with its sandbox, and ends itself at its expiry; cloud_sweep removes leftovers.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:cloud_status`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.cloud.status(provider:)` |-| Rust | `cua_cloud::Clouds::status` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `string` | none | Only this cloud (`aws`, `gcp`, `modal`). Default: every one. |--### Result--JSON: `default_on`, `providers` (each `name`, `title`, `tier` (`vm`: a VM that provides Spaces, `sandbox`: one sandbox per Space), `connected`, `default`, `credentials` (`found`, `source`), `account`, `profile`, `region`, `zone`, `project`, `environment`, `label` ("AWS · us-west-2"), `ttl_hours` and `kinds` (each `image`, `kind`, `supported`, `reason`, `machine_type`, `usd_per_hour`)) and `resources` (what Cua created: `provider`, `id`, `type`, `space`, `region`, `state`, `created`, `expires`, `expired`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## cloud_connect--Connect a cloud account Spaces can be created in.--Runs cloud_test first and connects only when every check passes. Stores the profile, region, project or environment names under the cua home (never a key: the cloud's own CLI sign-in stays where it is). With make_default, create_space without `on` creates there (`default.on`).--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:cloud_connect`; mutating, idempotent |-| Swift SDK | `spaces.cloud.connect(_:makeDefault:ttlHours:)` |-| Rust | `cua_cloud::Clouds::connect` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `environment` | `string` | none | Modal environment (default: the profile's). |-| `make_default` | `boolean` | `false` | Also make it the default location (`default.on`). Default false. |-| `profile` | `string` | none | AWS: the profile in `~/.aws/config` (default: `default`, or `AWS_PROFILE`). Modal: the profile in `~/.modal.toml` (default: the active one). |-| `project` | `string` | none | GCP project id (default: `gcloud config get project`). |-| `provider` | `string` | required | `aws`, `gcp` or `modal`. |-| `region` | `string` | none | AWS region (default: the profile's, else `us-west-2`) or GCP region (default `us-central1`). |-| `ttl_hours` | `integer` | `8` | Every Space created there deletes itself after this many hours (the instance or sandbox terminates, the sweeper removes what is left). Default 8; 0 keeps Spaces until you delete them (Modal caps a sandbox at 24). At least 0. |-| `zone` | `string` | none | GCP zone in the region (default: its `-a` zone). |--### Result--JSON: the connected cloud as `cloud_status` lists it, plus `checks` (each `name`, `ok`, `detail`) from the test it ran first.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`cloud`](/spaces/reference/errors#cloud)--## cloud_test--Check a cloud account without creating anything.--Creates nothing: it signs in with the cloud's own CLI credentials, asks the cloud to validate a create without doing it (AWS DryRun, Google Cloud permission checks), and reads quotas. A failed check says what to fix.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:cloud_test`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.cloud.test(_:)` |-| Rust | `cua_cloud::Clouds::test` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `environment` | `string` | none | Modal environment (default: the profile's). |-| `profile` | `string` | none | AWS: the profile in `~/.aws/config` (default: `default`, or `AWS_PROFILE`). Modal: the profile in `~/.modal.toml` (default: the active one). |-| `project` | `string` | none | GCP project id (default: `gcloud config get project`). |-| `provider` | `string` | required | `aws`, `gcp` or `modal`. |-| `region` | `string` | none | AWS region (default: the profile's, else `us-west-2`) or GCP region (default `us-central1`). |-| `zone` | `string` | none | GCP zone in the region (default: its `-a` zone). |--### Result--JSON: `provider`, `ok`, `account` (the account, project or workspace the credentials reach) and `checks` (each `name`, `ok`, `detail`: credentials, permissions by dry run, quota, the region and machine types).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`cloud`](/spaces/reference/errors#cloud)--## cloud_disconnect--Forget a connected cloud account.--Forgets the connection (and `default.on` when it named this cloud). Nothing in the cloud is deleted.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:cloud_disconnect`; mutating, idempotent |-| Swift SDK | `spaces.cloud.disconnect(_:)` |-| Rust | `cua_cloud::Clouds::disconnect` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `provider` | `string` | required | `aws`, `gcp` or `modal`. |--### Result--JSON: `provider`, `disconnected` and `left` (resources Cua still records there; delete their Spaces, or cloud_sweep with all=true, to remove them).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## cloud_sweep--Find and delete what Cua left in your clouds.--Acts only on resources that carry Cua's tags (cua-managed=true and this device's cua-owner) and that this cua home recorded, or that carry this device's owner id: never on anything else in the account. Default dry_run=true lists what it would delete: expired Spaces (past their ttl), resources whose Space is gone, and with all=true every Cua resource there.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:cloud_sweep`; destructive |-| Swift SDK | `spaces.cloud.sweep(provider:dryRun:all:)` |-| Rust | `cua_cloud::Clouds::sweep` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `all` | `boolean` | `false` | Also delete Cua resources that have not expired yet (every Space in that cloud). Default false: only expired ones, and resources no Space refers to any more. |-| `dry_run` | `boolean` | `true` | List what would be deleted without deleting it. Default true. |-| `provider` | `string` | none | Only this cloud. Default: every connected one. |--### Result--JSON: `dry_run` and `resources`, each `provider`, `id`, `type`, `space`, `expires`, `action` (`delete`, `deleted`, `keep` or `failed`) and `reason`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`cloud`](/spaces/reference/errors#cloud)diff --git a/docs/content/docs/spaces/reference/commands-and-files.mdx b/docs/content/docs/spaces/reference/commands-and-files.mdxdeleted file mode 100644index 7fdd4bfb1c..0000000000--- a/docs/content/docs/spaces/reference/commands-and-files.mdx+++ /dev/null@@ -1,195 +0,0 @@-----title: "Commands and files"-description: "Run shell commands and move files in and out of a Space."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`space_bash`](#space_bash) | Run a shell command inside the Space. |-| [`space_write`](#space_write) | Write literal text to a path inside the Space. |-| [`upload`](#upload) | Send a local file or folder into the Space. |-| [`send_file`](#send_file) | Send a host file or folder into the Space's Downloads, verified by sha256 on arrival. |-| [`download`](#download) | Fetch a file or folder out of the Space. |--## space_bash--Run a shell command inside the Space.--Runs through the spacesd's ProcessService with `/bin/sh -c`. Output is stdout, then `[stderr]` and stderr, then `[exit N]`; each stream keeps its last 16000 characters when longer.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:space_bash`; destructive |-| Swift SDK | `Space.bash(_:)` |-| Rust | `Space::bash` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `command` | `string` | required | Command line, run with `/bin/sh -c` (`cmd.exe /C` on Windows guests). |-| `space` | `string` | required | Space id or name. |-| `timeout` | `integer` | `60` | Seconds before the command is killed. Default 60. At least 0. |--### Result--Text: stdout, then `[stderr]` and stderr, then `[exit N]`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`timeout`](/spaces/reference/errors#timeout)--## space_write--Write literal text to a path inside the Space.--Written through FilesystemService, verified by sha256; no shell is involved, so nothing needs quoting.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:space_write`; destructive |-| Swift SDK | `Space.write(_:to:)` |-| Rust | `Space::write` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `content` | `string` | required | The exact file contents. |-| `path` | `string` | required | Absolute path in the Space. Parent directories are created. |-| `space` | `string` | required | Space id or name. |--### Result--Text: `wrote <path> (<n> bytes, sha256 <hex> verified in Space)`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`transfer_failed`](/spaces/reference/errors#transfer_failed)--### Notes--- Literal text: no local file is read and nothing is shell-quoted, which is the whole reason it exists next to space_bash.--## upload--Send a local file or folder into the Space.--Files stream through FilesystemService in chunks with a sha256 check; a folder is copied file by file (empty directories included, symlinks skipped). No size cap.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:upload`; destructive |-| Swift SDK | `space.files.send(_:to:within:)` |-| Rust | `Space::upload` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `dest` | `string` | `<guest home>/<name>` | Absolute destination path in the Space; an existing file there is replaced. Default: `<guest home>/<name>`, or `<name> (1).ext` when that is taken (nothing is replaced). |-| `path` | `string` | required | Host path (file or folder). |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `source`, `dest`, `kind` (`file` or `folder`), `files`, `directories`, `bytes`, `sha256` (single file) and `verified`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`transfer_failed`](/spaces/reference/errors#transfer_failed), [`io`](/spaces/reference/errors#io)--### Notes--- Without `dest` nothing in the Space is replaced: a taken `<home>/<name>` lands as `<name> (1).ext`. An explicit `dest` is written as given and replaces a file already there.--## send_file--Send a host file or folder into the Space's Downloads, verified by sha256 on arrival.--The same transfer the Cua Spaces pop-out's Teleport drop zone performs: files land in the Space user's ~/Downloads through the spacesd's TeleportService (chunked, resumable, every file verified by sha256 before it is published). A transfer that does not land, or lands corrupted, is an error and not a reported success.--respect_ignorefiles (default true) applies ONLY when `path` is a folder. It honors `.gitignore` and `.ignore` at the folder root and in every subdirectory (each scoped to its own subtree, so a nested ignore file overrides its parent), plus `.dockerignore` at the root only. All three use gitignore semantics: negation (`!`), directory-only patterns (`foo/`), anchoring, `*`/`?`/`[...]`, `**`, comments, last-matching-rule-wins. As in git, an excluded directory is pruned and `!` cannot re-include anything beneath it. `.git/` is always skipped and symlinks are never followed. For a single named file it has NO effect.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:send_file`; destructive |-| Swift SDK | `Space.sendFile(_:into:respectingIgnoreFiles:)` |-| Rust | `Space::send_file` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `string` | required | Host path (file or folder) to send. |-| `respect_ignorefiles` | `boolean` | `true` | Honor `.gitignore` / `.ignore` (nested) and `.dockerignore` (root only) when sending a folder. Default true. No effect on a single named file. |-| `space` | `string` | required | Space id or name. |-| `target_directory` | `string` | `~/Downloads` | Subdirectory of the Space user's `~/Downloads` to land in. `~/Downloads` and `~/Downloads/<sub>` are accepted too. Default: `~/Downloads` itself. |--### Result--JSON: `source`, `destination`, `dest`, `kind`, `files` (each `path`, `size`, `sha256`), `bytes`, `respect_ignorefiles`, `skipped_by_ignorefiles`, `skipped_count`, `skipped_by_guest` and `verified`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`transfer_failed`](/spaces/reference/errors#transfer_failed), [`io`](/spaces/reference/errors#io)--### Notes--- Unlike `upload`, the copy is verified in the Space by sha256 before the call returns: a transfer that does not land, or lands corrupted, is an error and not a reported success.-- `respect_ignorefiles` applies only when the path is a folder, with gitignore semantics; a file named explicitly is always sent.-- A file of the same name already in the Space is kept: the new copy lands as `name (1).ext` and its path is in `files`.--## download--Fetch a file or folder out of the Space.--Files stream through FilesystemService and are verified by sha256; a folder is copied recursively.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:download`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `Space.download(_:into:)` |-| Rust | `Space::download` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `dest` | `string` | `~/Downloads/cua-spaces` | Host destination directory. Default `~/Downloads/cua-spaces`. |-| `path` | `string` | required | Absolute path in the Space (file or folder). |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `source`, `dest`, `kind`, `files`, `bytes`, `sha256` (single file) and `verified`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`transfer_failed`](/spaces/reference/errors#transfer_failed), [`io`](/spaces/reference/errors#io)--### Notes--- Nothing on the host is overwritten: when `dest` already has an entry of that name the copy lands as `name (1).ext` (or `name (1)` for a folder), and `dest` in the result is the path used.diff --git a/docs/content/docs/spaces/reference/errors.mdx b/docs/content/docs/spaces/reference/errors.mdxdeleted file mode 100644index 51ea04fb1f..0000000000--- a/docs/content/docs/spaces/reference/errors.mdx+++ /dev/null@@ -1,340 +0,0 @@-----title: "Errors"-description: "Tool error kinds and JSON-RPC protocol errors of the Spaces tools."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json; cua-spaces src/mcp/mod.rs- Version: 0.7.0-*/}--A tool that fails returns a normal result with `isError: true`, never a protocol error:--```json-{- "content": [{ "type": "text", "text": "error: <message>" }],- "isError": true,- "structuredContent": { "error": { "kind": "<kind>", "message": "<message>" } }-}-```--Branch on `kind`; the message is for people. Every tool can return `invalid_argument`. A tool that takes `space` can also return `not_found` and `ambiguous_sandbox`; one with spacesd `requires`, `spacesd_not_available` and `capability_missing`; one with host requirements, `host_capability_missing`. Each tool lists the rest.--## Error kinds--| Kind | Meaning |-| --- | --- |-| [`invalid_argument`](#invalid_argument) | An argument is missing, malformed or out of range. |-| [`not_found`](#not_found) | No Space, run, window, service, tool or file with that id. |-| [`spacesd_not_available`](#spacesd_not_available) | The machine answered but runs no cua-spacesd, so the spacesd primitives cannot work. |-| [`capability_missing`](#capability_missing) | The Space's cua-spacesd reports a feature this tool needs as unsupported; the message names it and the driver's limitation. |-| [`host_capability_missing`](#host_capability_missing) | A prerequisite on this machine is missing: Fleet credentials, a local runtime, an operator display or app-session providers. |-| [`wrong_provider`](#wrong_provider) | The operation does not apply to this kind of Space. |-| [`unauthenticated`](#unauthenticated) | The Space's spacesd or the cua.ai relay rejected the token. |-| [`permission_denied`](#permission_denied) | The signed-in account may not reach that relay machine. |-| [`ambiguous_host`](#ambiguous_host) | The machine name given to on="host:<name>" fits several of your machines equally well; the message lists them. |-| [`limit_exceeded`](#limit_exceeded) | The host is at a capacity limit: two macOS VMs per Mac (Apple's macOS license, enforced by Apple Virtualization) or the host's own Space limit. |-| [`ambiguous_sandbox`](#ambiguous_sandbox) | A short name matches more than one sandbox. |-| [`transfer_failed`](#transfer_failed) | A file transfer did not land, or landed with a different sha256. |-| [`teleport_refused`](#teleport_refused) | The teleport consent gate refused: a sensitive item without acknowledge_sensitive, a declined approval, or a Space that cannot import the app. |-| [`login_refused`](#login_refused) | The Keyvault refused a site login: the user declined, no saved password matches the page's origin, the tab is on another origin, or the Keyvault is locked or off. |-| [`agent`](#agent) | An agent run failed outside the transport: install, configuration or a refused message. |-| [`timeout`](#timeout) | A wait ran out: a claim that never bound, a Space that never became ready, or a command past its timeout. |-| [`cancelled`](#cancelled) | The create was cancelled (cancel_create, or its caller went away); what it made is gone. |-| [`stream`](#stream) | The media plane failed to open or run the stream. |-| [`env`](#env) | A cua-spacesd call failed. |-| [`fleet`](#fleet) | Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The Fleet control plane failed a cloud Space call. |-| [`fleet_admission_denied`](#fleet_admission_denied) | Retired: no longer returned since Cua Cloud ended (cua 0.4.2). Fleet's admission refused the cloud Space: a size over this account's limits, or a template its policy does not admit. |-| [`cloud_credit_exhausted`](#cloud_credit_exhausted) | Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The account was out of Cua Cloud credit and Fleet refused the new cloud Space. |-| [`invalid_placement`](#invalid_placement) | The location, kind or runtime does not exist, or the combination (with the image) does not. |-| [`sandbox`](#sandbox) | Starting, stopping or deleting the Space's sandbox failed. |-| [`cloud`](#cloud) | Your cloud account refused or failed a call Cua made for a Space there (AWS, Google Cloud, Modal): a missing permission, a quota, a region without the instance type. The message names the cloud's own error. |-| [`relay`](#relay) | The cua.ai relay directory failed. |-| [`mcp`](#mcp) | An MCP service inside the Space failed. |-| [`io`](#io) | Reading or writing a local file failed. |-| [`json`](#json) | A reply could not be parsed. |-| [`forbidden`](#forbidden) | The drive's access rules refuse this principal on this path (an agent outside its own home, its Space's folder, read-only public/ and its grants). |-| [`precondition_failed`](#precondition_failed) | A drive write or delete with if_etag or create_only found a different version at the path. |-| [`secret_detected`](#secret_detected) | A write under agents/ carries something that looks like a secret (an API key, a token, a private key); it was not stored. The message names the kind and line, never the value. |-| [`lease_held`](#lease_held) | Another run holds the persistent agent's home (one writer at a time). |-| [`not_confirmed`](#not_confirmed) | The user did not confirm with presence (Touch ID, the login password or the vault passphrase), so no access was widened. |-| [`volume_backend`](#volume_backend) | The drive's store failed or is not configured (a bucket that refused, missing keys, or a backend this build cannot serve). |--### invalid_argument--An argument is missing, malformed or out of range.--Fix: Check the call against the tool's input schema; the message names the argument.--Listed by [`volume_storage_set`](/spaces/reference/volume#volume_storage_set), [`volume_cache_set`](/spaces/reference/volume#volume_cache_set), [`relay_unregister_space`](/spaces/reference/sharing#relay_unregister_space).--### not_found--No Space, run, window, service, tool or file with that id.--Fix: List what exists first (list_spaces, agent_list, list_space_windows, list_tools).--Listed by [`volume_sync_resolve`](/spaces/reference/volume#volume_sync_resolve).--### spacesd_not_available--The machine answered but runs no cua-spacesd, so the spacesd primitives cannot work.--Fix: Use an image that runs cua-spacesd (for example ghcr.io/trycua/linux:24.04), or reach the Space's own services with list_tools and call_tool.--### capability_missing--The Space's cua-spacesd reports a feature this tool needs as unsupported; the message names it and the driver's limitation.--Fix: Use a Space whose spacesd supports the feature (see the tool's `requires`).--### host_capability_missing--A prerequisite on this machine is missing: Fleet credentials, a local runtime, an operator display or app-session providers.--Fix: Set up what the message names (see the tool's `host_requires`).--### wrong_provider--The operation does not apply to this kind of Space.--Fix: Use a tool that serves the Space's provider (see the tool's `providers`).--Listed by [`stop_space`](/spaces/reference/lifecycle#stop_space), [`start_space`](/spaces/reference/lifecycle#start_space).--### unauthenticated--The Space's spacesd or the cua.ai relay rejected the token.--Fix: Re-add the Space with a valid token, or sign in again with `cua auth login`.--Listed by [`add_space`](/spaces/reference/lifecycle#add_space), [`list_spaces`](/spaces/reference/lifecycle#list_spaces), [`share_space`](/spaces/reference/sharing#share_space), [`unshare_space`](/spaces/reference/sharing#unshare_space), [`space_shares`](/spaces/reference/sharing#space_shares), [`relay_register_space`](/spaces/reference/sharing#relay_register_space), [`relay_unregister_space`](/spaces/reference/sharing#relay_unregister_space).--### permission_denied--The signed-in account may not reach that relay machine.--Fix: Sign in with the account that owns the machine.--Listed by [`stop_space`](/spaces/reference/lifecycle#stop_space), [`start_space`](/spaces/reference/lifecycle#start_space), [`share_space`](/spaces/reference/sharing#share_space), [`unshare_space`](/spaces/reference/sharing#unshare_space), [`relay_unregister_space`](/spaces/reference/sharing#relay_unregister_space).--### ambiguous_host--The machine name given to on="host:<name>" fits several of your machines equally well; the message lists them.--Fix: Ask the user which machine they meant, then pass on="host:<machine id>" from the list.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space).--### limit_exceeded--The host is at a capacity limit: two macOS VMs per Mac (Apple's macOS license, enforced by Apple Virtualization) or the host's own Space limit.--Fix: Delete a Space on that host (delete_space), pick another machine, or create a Linux Space instead.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space).--### ambiguous_sandbox--A short name matches more than one sandbox.--Fix: Use the full id (`local:<name>` or `cloud:<name>`).--### transfer_failed--A file transfer did not land, or landed with a different sha256.--Fix: Retry; check free space and permissions at the destination.--Listed by [`space_write`](/spaces/reference/commands-and-files#space_write), [`upload`](/spaces/reference/commands-and-files#upload), [`send_file`](/spaces/reference/commands-and-files#send_file), [`download`](/spaces/reference/commands-and-files#download), [`teleport_app`](/spaces/reference/teleport#teleport_app).--### teleport_refused--The teleport consent gate refused: a sensitive item without acknowledge_sensitive, a declined approval, or a Space that cannot import the app.--Fix: Read teleport_manifest, then pass the items to move and acknowledge_sensitive=true for sensitive ones.--Listed by [`teleport_app`](/spaces/reference/teleport#teleport_app).--### login_refused--The Keyvault refused a site login: the user declined, no saved password matches the page's origin, the tab is on another origin, or the Keyvault is locked or off.--Fix: Ask the user to approve the sign-in in Cua, import the site's saved password, or open the site's sign-in page and try again.--Listed by [`request_site_login`](/spaces/reference/keyvault#request_site_login).--### agent--An agent run failed outside the transport: install, configuration or a refused message.--Fix: Read agent_status and its output_tail for the reason.--Listed by [`agent_start`](/spaces/reference/agents#agent_start), [`agent_message`](/spaces/reference/agents#agent_message), [`agent_events`](/spaces/reference/agents#agent_events), [`agent_status`](/spaces/reference/agents#agent_status), [`agent_interrupt`](/spaces/reference/agents#agent_interrupt), [`agent_stop`](/spaces/reference/agents#agent_stop), [`agent_list`](/spaces/reference/agents#agent_list), [`persistent_agent_create`](/spaces/reference/persistent-agents#persistent_agent_create), [`persistent_agent_remove`](/spaces/reference/persistent-agents#persistent_agent_remove), [`persistent_agent_send`](/spaces/reference/persistent-agents#persistent_agent_send), [`persistent_agent_save`](/spaces/reference/persistent-agents#persistent_agent_save), [`agent_pause`](/spaces/reference/persistent-agents#agent_pause), [`agent_resume`](/spaces/reference/persistent-agents#agent_resume).--### timeout--A wait ran out: a claim that never bound, a Space that never became ready, or a command past its timeout.--Fix: Retry, or raise the tool's timeout.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space), [`start_space`](/spaces/reference/lifecycle#start_space), [`space_bash`](/spaces/reference/commands-and-files#space_bash).--### cancelled--The create was cancelled (cancel_create, or its caller went away); what it made is gone.--Fix: Nothing to clean up; create it again when you want it.--### stream--The media plane failed to open or run the stream.--Fix: Check that the Space's spacesd supports desktop_stream or window_stream, then retry.--Listed by [`stream_endpoint`](/spaces/reference/streams-and-display#stream_endpoint), [`stream_space_window`](/spaces/reference/streams-and-display#stream_space_window).--### env--A cua-spacesd call failed.--Fix: Retry; if it persists, check the spacesd log in the Space.--### fleet--Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The Fleet control plane failed a cloud Space call.--Fix: Create the Space locally or on one of your machines; see https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space), [`delete_space`](/spaces/reference/lifecycle#delete_space), [`agent_resume`](/spaces/reference/persistent-agents#agent_resume).--### fleet_admission_denied--Retired: no longer returned since Cua Cloud ended (cua 0.4.2). Fleet's admission refused the cloud Space: a size over this account's limits, or a template its policy does not admit.--Fix: Create the Space locally or on one of your machines; see https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space).--### cloud_credit_exhausted--Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The account was out of Cua Cloud credit and Fleet refused the new cloud Space.--Fix: Create the Space locally or on one of your machines; see https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space).--### invalid_placement--The location, kind or runtime does not exist, or the combination (with the image) does not.--Fix: Use one of the values the message lists, or leave kind and runtime unset (auto).--Listed by [`create_space`](/spaces/reference/lifecycle#create_space).--### sandbox--Starting, stopping or deleting the Space's sandbox failed.--Fix: Check the local runtime (`cua doctor`) or the cloud pool, then retry.--Listed by [`create_space`](/spaces/reference/lifecycle#create_space), [`delete_space`](/spaces/reference/lifecycle#delete_space), [`stop_space`](/spaces/reference/lifecycle#stop_space), [`start_space`](/spaces/reference/lifecycle#start_space), [`agent_pause`](/spaces/reference/persistent-agents#agent_pause), [`agent_resume`](/spaces/reference/persistent-agents#agent_resume).--### cloud--Your cloud account refused or failed a call Cua made for a Space there (AWS, Google Cloud, Modal): a missing permission, a quota, a region without the instance type. The message names the cloud's own error.--Fix: Fix what the message names in that account (`cua cloud test <provider>` checks without creating anything), or connect another region or project.--Listed by [`stop_space`](/spaces/reference/lifecycle#stop_space), [`start_space`](/spaces/reference/lifecycle#start_space), [`cloud_connect`](/spaces/reference/cloud#cloud_connect), [`cloud_test`](/spaces/reference/cloud#cloud_test), [`cloud_sweep`](/spaces/reference/cloud#cloud_sweep).--### relay--The cua.ai relay directory failed.--Fix: Retry; check `cua auth status`.--Listed by [`list_spaces`](/spaces/reference/lifecycle#list_spaces), [`stop_space`](/spaces/reference/lifecycle#stop_space), [`start_space`](/spaces/reference/lifecycle#start_space), [`share_space`](/spaces/reference/sharing#share_space), [`unshare_space`](/spaces/reference/sharing#unshare_space), [`space_shares`](/spaces/reference/sharing#space_shares), [`relay_register_space`](/spaces/reference/sharing#relay_register_space), [`relay_unregister_space`](/spaces/reference/sharing#relay_unregister_space).--### mcp--An MCP service inside the Space failed.--Fix: Check the service with list_tools; the message carries its error.--Listed by [`list_tools`](/spaces/reference/services#list_tools), [`call_tool`](/spaces/reference/services#call_tool).--### io--Reading or writing a local file failed.--Fix: Check the path and its permissions on this machine.--Listed by [`upload`](/spaces/reference/commands-and-files#upload), [`send_file`](/spaces/reference/commands-and-files#send_file), [`download`](/spaces/reference/commands-and-files#download).--### json--A reply could not be parsed.--Fix: Retry; report it if it persists.--### forbidden--The drive's access rules refuse this principal on this path (an agent outside its own home, its Space's folder, read-only public/ and its grants).--Fix: Ask for access with volume_request_access; the user approves it in Cua.--Listed by [`volume_ls`](/spaces/reference/volume#volume_ls), [`volume_read`](/spaces/reference/volume#volume_read), [`volume_write`](/spaces/reference/volume#volume_write), [`volume_delete`](/spaces/reference/volume#volume_delete), [`volume_history`](/spaces/reference/volume#volume_history), [`volume_restore`](/spaces/reference/volume#volume_restore), [`volume_grant`](/spaces/reference/volume#volume_grant), [`volume_revoke`](/spaces/reference/volume#volume_revoke), [`volume_grants`](/spaces/reference/volume#volume_grants), [`volume_request_access`](/spaces/reference/volume#volume_request_access), [`volume_requests`](/spaces/reference/volume#volume_requests), [`volume_approve`](/spaces/reference/volume#volume_approve), [`volume_deny`](/spaces/reference/volume#volume_deny), [`volume_audit`](/spaces/reference/volume#volume_audit), [`volume_storage`](/spaces/reference/volume#volume_storage), [`volume_storage_set`](/spaces/reference/volume#volume_storage_set), [`volume_mount_status`](/spaces/reference/volume#volume_mount_status), [`volume_mount`](/spaces/reference/volume#volume_mount), [`volume_unmount`](/spaces/reference/volume#volume_unmount), [`volume_sync_status`](/spaces/reference/volume#volume_sync_status), [`volume_sync_events`](/spaces/reference/volume#volume_sync_events), [`volume_sync_resolve`](/spaces/reference/volume#volume_sync_resolve), [`volume_cache_stats`](/spaces/reference/volume#volume_cache_stats), [`volume_cache_set`](/spaces/reference/volume#volume_cache_set), [`volume_cache_clear`](/spaces/reference/volume#volume_cache_clear).--### precondition_failed--A drive write or delete with if_etag or create_only found a different version at the path.--Fix: Read the file again and retry with its current etag.--Listed by [`volume_write`](/spaces/reference/volume#volume_write), [`volume_delete`](/spaces/reference/volume#volume_delete).--### secret_detected--A write under agents/ carries something that looks like a secret (an API key, a token, a private key); it was not stored. The message names the kind and line, never the value.--Fix: Remove the secret from the file; keep credentials in the Keyvault.--Listed by [`persistent_agent_save`](/spaces/reference/persistent-agents#persistent_agent_save), [`volume_write`](/spaces/reference/volume#volume_write), [`volume_restore`](/spaces/reference/volume#volume_restore).--### lease_held--Another run holds the persistent agent's home (one writer at a time).--Fix: Wait for that run to stop, or stop it; the lease expires on its own.--Listed by [`persistent_agent_send`](/spaces/reference/persistent-agents#persistent_agent_send).--### not_confirmed--The user did not confirm with presence (Touch ID, the login password or the vault passphrase), so no access was widened.--Fix: Ask the user to approve it in Cua.--Listed by [`computer_access_grant`](/spaces/reference/persistent-agents#computer_access_grant), [`volume_grant`](/spaces/reference/volume#volume_grant), [`volume_approve`](/spaces/reference/volume#volume_approve).--### volume_backend--The drive's store failed or is not configured (a bucket that refused, missing keys, or a backend this build cannot serve).--Fix: Check `cua volume config show` and the message.--Listed by [`volume_ls`](/spaces/reference/volume#volume_ls), [`volume_read`](/spaces/reference/volume#volume_read), [`volume_write`](/spaces/reference/volume#volume_write), [`volume_delete`](/spaces/reference/volume#volume_delete), [`volume_history`](/spaces/reference/volume#volume_history), [`volume_restore`](/spaces/reference/volume#volume_restore), [`volume_unmount`](/spaces/reference/volume#volume_unmount).--## Protocol errors--JSON-RPC errors are about the message, not the tool.--| Code | Name | When |-| --- | --- | --- |-| `-32700` | `PARSE_ERROR` | The message is not valid JSON. |-| `-32600` | `INVALID_REQUEST` | The message is not a JSON-RPC request: an empty batch, or no `method`. |-| `-32601` | `METHOD_NOT_FOUND` | An unknown method, or `tools/call` of a tool this server does not expose (not in the contract, or filtered out by permissions). |-| `-32602` | `INVALID_PARAMS` | `tools/call` without a tool `name`. |diff --git a/docs/content/docs/spaces/reference/hotspot.mdx b/docs/content/docs/spaces/reference/hotspot.mdxdeleted file mode 100644index 87d3341115..0000000000--- a/docs/content/docs/spaces/reference/hotspot.mdx+++ /dev/null@@ -1,109 +0,0 @@-----title: "Hotspot"-description: "Share this machine's network with a Space."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`hotspot_start`](#hotspot_start) | Start sharing this machine's network with a Space. |-| [`hotspot_stop`](#hotspot_stop) | Stop sharing this machine's network. |-| [`hotspot_status`](#hotspot_status) | Report which Spaces are sharing this machine's network, with counters. |--## hotspot_start--Start sharing this machine's network with a Space.--Starts the Space's reverse-SOCKS hotspot (TunnelService.StartHotspot) and serves its egress from this machine, so the Space browses as this machine. Runs until hotspot_stop, delete_space, or this server exiting.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:hotspot_start`; destructive |-| Requires (spacesd) | `hotspot` |-| Swift SDK | `connection.hotspot.start(sharingWith:)` |-| Rust | `Spaces::hotspot_start` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `bypass` | `string[]` | none | Destinations (CIDRs or host suffixes) that keep using the Space's own network. |-| `set_system_proxy` | `boolean` | `true` | Point the Space's system proxy (and `HTTP(S)_PROXY` for new processes) at the hotspot. Default true. |-| `space` | `string` | required | Space id or name. |--### Result--JSON: the hotspot (`space`, `state`, `hotspot_id`, `socks_address`, `active_connections`, `bytes_out`, `bytes_in`, `served_here`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing)--### Notes--- Capability-gated rather than cloud-only: any Space whose spacesd supports `hotspot` can borrow this machine's network.--## hotspot_stop--Stop sharing this machine's network.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:hotspot_stop`; destructive |-| Requires (spacesd) | `hotspot` |-| Swift SDK | `connection.hotspot.stop()` |-| Rust | `Spaces::hotspot_stop` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | none | Space id or name. Default: every Space with an active hotspot. |--### Result--JSON: `{"stopped": [...]}`, the hotspots that were stopped.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing)--## hotspot_status--Report which Spaces are sharing this machine's network, with counters.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:hotspot_status`, in `spaces:readonly`; read-only, idempotent |-| Requires (spacesd) | `hotspot` |-| Swift SDK | `connection.hotspot.status()` |-| Rust | `Spaces::hotspot_statuses` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | none | Space id or name. Default: every Space with an active hotspot. |--### Result--JSON: `{"hotspots": [...]}`, each shaped like hotspot_start's result.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing)diff --git a/docs/content/docs/spaces/reference/index.mdx b/docs/content/docs/spaces/reference/index.mdxindex 39daa897e5..48b1fac7b7 100644--- a/docs/content/docs/spaces/reference/index.mdx+++ b/docs/content/docs/spaces/reference/index.mdx@@ -14,55 +14,55 @@ The Spaces contract: 86 tools with the same names and schemas on every surface:## Tools-### [Space lifecycle](/spaces/reference/lifecycle)+### [Space lifecycle](/spaces/reference/spaces#space-lifecycle)Register, provision, list and release Spaces.| Tool | Description | Effect || --- | --- | --- |-| [`add_space`](/spaces/reference/lifecycle#add_space) | Add an existing machine as a Space by address and token. | mutating, idempotent |-| [`remove_space`](/spaces/reference/lifecycle#remove_space) | Forget a registered Space without touching it. | mutating, idempotent |-| [`list_spaces`](/spaces/reference/lifecycle#list_spaces) | List the Spaces this connection can see. | read-only, idempotent |-| [`create_space`](/spaces/reference/lifecycle#create_space) | Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud. | destructive |-| [`delete_space`](/spaces/reference/lifecycle#delete_space) | Delete a Space's sandbox and forget it. | destructive |-| [`stop_space`](/spaces/reference/lifecycle#stop_space) | Turn a Space off: suspend it (memory kept) or stop it (disk kept). | mutating, idempotent |-| [`start_space`](/spaces/reference/lifecycle#start_space) | Turn a Space back on: resume or boot it. | mutating, idempotent |+| [`add_space`](/spaces/reference/spaces#add_space) | Add an existing machine as a Space by address and token. | mutating, idempotent |+| [`remove_space`](/spaces/reference/spaces#remove_space) | Forget a registered Space without touching it. | mutating, idempotent |+| [`list_spaces`](/spaces/reference/spaces#list_spaces) | List the Spaces this connection can see. | read-only, idempotent |+| [`create_space`](/spaces/reference/spaces#create_space) | Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud. | destructive |+| [`delete_space`](/spaces/reference/spaces#delete_space) | Delete a Space's sandbox and forget it. | destructive |+| [`stop_space`](/spaces/reference/spaces#stop_space) | Turn a Space off: suspend it (memory kept) or stop it (disk kept). | mutating, idempotent |+| [`start_space`](/spaces/reference/spaces#start_space) | Turn a Space back on: resume or boot it. | mutating, idempotent |-### [Commands and files](/spaces/reference/commands-and-files)+### [Commands and files](/spaces/reference/spaces#commands-and-files)Run shell commands and move files in and out of a Space.| Tool | Description | Effect || --- | --- | --- |-| [`space_bash`](/spaces/reference/commands-and-files#space_bash) | Run a shell command inside the Space. | destructive |-| [`space_write`](/spaces/reference/commands-and-files#space_write) | Write literal text to a path inside the Space. | destructive |-| [`upload`](/spaces/reference/commands-and-files#upload) | Send a local file or folder into the Space. | destructive |-| [`send_file`](/spaces/reference/commands-and-files#send_file) | Send a host file or folder into the Space's Downloads, verified by sha256 on arrival. | destructive |-| [`download`](/spaces/reference/commands-and-files#download) | Fetch a file or folder out of the Space. | read-only, idempotent |+| [`space_bash`](/spaces/reference/spaces#space_bash) | Run a shell command inside the Space. | destructive |+| [`space_write`](/spaces/reference/spaces#space_write) | Write literal text to a path inside the Space. | destructive |+| [`upload`](/spaces/reference/spaces#upload) | Send a local file or folder into the Space. | destructive |+| [`send_file`](/spaces/reference/spaces#send_file) | Send a host file or folder into the Space's Downloads, verified by sha256 on arrival. | destructive |+| [`download`](/spaces/reference/spaces#download) | Fetch a file or folder out of the Space. | read-only, idempotent |-### [Streams and display](/spaces/reference/streams-and-display)+### [Streams and display](/spaces/reference/spaces#streams-and-display)Stream a Space's desktop or windows, and show a Space to the operator.| Tool | Description | Effect || --- | --- | --- |-| [`stream_endpoint`](/spaces/reference/streams-and-display#stream_endpoint) | Return a ticketed media endpoint for the Space's desktop or one window. | mutating, idempotent |-| [`list_space_windows`](/spaces/reference/streams-and-display#list_space_windows) | List the windows open inside the Space. | read-only, idempotent |-| [`stream_space_window`](/spaces/reference/streams-and-display#stream_space_window) | Draw one Space window on the operator's desktop. | mutating, idempotent |-| [`show_space_pip`](/spaces/reference/streams-and-display#show_space_pip) | Pin the Space as picture-in-picture on the operator's desktop. | mutating, idempotent |-| [`hide_space_pip`](/spaces/reference/streams-and-display#hide_space_pip) | Unpin the picture-in-picture window. | mutating, idempotent |-| [`open_space_viewer`](/spaces/reference/streams-and-display#open_space_viewer) | Open the full Space viewer on the operator's desktop. | mutating, idempotent |+| [`stream_endpoint`](/spaces/reference/spaces#stream_endpoint) | Return a ticketed media endpoint for the Space's desktop or one window. | mutating, idempotent |+| [`list_space_windows`](/spaces/reference/spaces#list_space_windows) | List the windows open inside the Space. | read-only, idempotent |+| [`stream_space_window`](/spaces/reference/spaces#stream_space_window) | Draw one Space window on the operator's desktop. | mutating, idempotent |+| [`show_space_pip`](/spaces/reference/spaces#show_space_pip) | Pin the Space as picture-in-picture on the operator's desktop. | mutating, idempotent |+| [`hide_space_pip`](/spaces/reference/spaces#hide_space_pip) | Unpin the picture-in-picture window. | mutating, idempotent |+| [`open_space_viewer`](/spaces/reference/spaces#open_space_viewer) | Open the full Space viewer on the operator's desktop. | mutating, idempotent |-### [Services](/spaces/reference/services)+### [Services](/spaces/reference/spaces#services)Discover and call the MCP services inside a Space.| Tool | Description | Effect || --- | --- | --- |-| [`list_tools`](/spaces/reference/services#list_tools) | List the MCP services and tools reachable inside the Space. | read-only, idempotent |-| [`call_tool`](/spaces/reference/services#call_tool) | Call a service tool inside the Space. | destructive |+| [`list_tools`](/spaces/reference/spaces#list_tools) | List the MCP services and tools reachable inside the Space. | read-only, idempotent |+| [`call_tool`](/spaces/reference/spaces#call_tool) | Call a service tool inside the Space. | destructive |-### [Agents](/spaces/reference/agents)+### [Agents](/spaces/reference/agents#agents)Run coding agents inside a Space.@@ -77,112 +77,112 @@ Run coding agents inside a Space.| [`agent_list`](/spaces/reference/agents#agent_list) | List agent runs in the Space. | read-only, idempotent || [`agent_capabilities`](/spaces/reference/agents#agent_capabilities) | Report what the agent harnesses support. | read-only, idempotent |-### [Persistent agents](/spaces/reference/persistent-agents)+### [Persistent agents](/spaces/reference/agents#persistent-agents)Named agents whose memory outlives their Space: homes in Cua Volume, routines, notifications, pause and resume, access to the user's computers.| Tool | Description | Effect || --- | --- | --- |-| [`persistent_agent_create`](/spaces/reference/persistent-agents#persistent_agent_create) | Create a named agent whose memory outlives its Space. | destructive |-| [`persistent_agent_list`](/spaces/reference/persistent-agents#persistent_agent_list) | List persistent agents. | read-only, idempotent |-| [`persistent_agent_remove`](/spaces/reference/persistent-agents#persistent_agent_remove) | Forget a persistent agent. | destructive |-| [`persistent_agent_send`](/spaces/reference/persistent-agents#persistent_agent_send) | Give a persistent agent a turn. | destructive |-| [`persistent_agent_save`](/spaces/reference/persistent-agents#persistent_agent_save) | Save a persistent agent's home now. | mutating, idempotent |-| [`agent_pause`](/spaces/reference/persistent-agents#agent_pause) | Pause a persistent agent: its run, its routines and its Space. | mutating, idempotent |-| [`agent_resume`](/spaces/reference/persistent-agents#agent_resume) | Resume a paused persistent agent. | destructive |-| [`routine_add`](/spaces/reference/persistent-agents#routine_add) | Schedule a recurring turn for a persistent agent. | destructive |-| [`routine_list`](/spaces/reference/persistent-agents#routine_list) | List routines. | read-only, idempotent |-| [`routine_remove`](/spaces/reference/persistent-agents#routine_remove) | Delete a routine. | mutating, idempotent |-| [`routine_set_enabled`](/spaces/reference/persistent-agents#routine_set_enabled) | Turn a routine on or off. | mutating, idempotent |-| [`notify_user`](/spaces/reference/persistent-agents#notify_user) | Tell the user something in the Cua app. | destructive |-| [`notifications_list`](/spaces/reference/persistent-agents#notifications_list) | Read the notifications feed. | read-only, idempotent |-| [`notifications_ack`](/spaces/reference/persistent-agents#notifications_ack) | Mark notifications read. | mutating, idempotent |-| [`computer_access_grant`](/spaces/reference/persistent-agents#computer_access_grant) | Let a persistent agent use one of the user's computers. | destructive |-| [`computer_access_revoke`](/spaces/reference/persistent-agents#computer_access_revoke) | Take back a persistent agent's access to a computer. | mutating, idempotent |-| [`computer_access_list`](/spaces/reference/persistent-agents#computer_access_list) | List per-agent computer access. | read-only, idempotent |--### [Session teleport](/spaces/reference/teleport)+| [`persistent_agent_create`](/spaces/reference/agents#persistent_agent_create) | Create a named agent whose memory outlives its Space. | destructive |+| [`persistent_agent_list`](/spaces/reference/agents#persistent_agent_list) | List persistent agents. | read-only, idempotent |+| [`persistent_agent_remove`](/spaces/reference/agents#persistent_agent_remove) | Forget a persistent agent. | destructive |+| [`persistent_agent_send`](/spaces/reference/agents#persistent_agent_send) | Give a persistent agent a turn. | destructive |+| [`persistent_agent_save`](/spaces/reference/agents#persistent_agent_save) | Save a persistent agent's home now. | mutating, idempotent |+| [`agent_pause`](/spaces/reference/agents#agent_pause) | Pause a persistent agent: its run, its routines and its Space. | mutating, idempotent |+| [`agent_resume`](/spaces/reference/agents#agent_resume) | Resume a paused persistent agent. | destructive |+| [`routine_add`](/spaces/reference/agents#routine_add) | Schedule a recurring turn for a persistent agent. | destructive |+| [`routine_list`](/spaces/reference/agents#routine_list) | List routines. | read-only, idempotent |+| [`routine_remove`](/spaces/reference/agents#routine_remove) | Delete a routine. | mutating, idempotent |+| [`routine_set_enabled`](/spaces/reference/agents#routine_set_enabled) | Turn a routine on or off. | mutating, idempotent |+| [`notify_user`](/spaces/reference/agents#notify_user) | Tell the user something in the Cua app. | destructive |+| [`notifications_list`](/spaces/reference/agents#notifications_list) | Read the notifications feed. | read-only, idempotent |+| [`notifications_ack`](/spaces/reference/agents#notifications_ack) | Mark notifications read. | mutating, idempotent |+| [`computer_access_grant`](/spaces/reference/agents#computer_access_grant) | Let a persistent agent use one of the user's computers. | destructive |+| [`computer_access_revoke`](/spaces/reference/agents#computer_access_revoke) | Take back a persistent agent's access to a computer. | mutating, idempotent |+| [`computer_access_list`](/spaces/reference/agents#computer_access_list) | List per-agent computer access. | read-only, idempotent |++### [Session teleport](/spaces/reference/agents#session-teleport)Move a signed-in app session from this machine into a Space.| Tool | Description | Effect || --- | --- | --- |-| [`teleport_manifest`](/spaces/reference/teleport#teleport_manifest) | Describe what a session teleport would move. | read-only, idempotent |-| [`teleport_app`](/spaces/reference/teleport#teleport_app) | Move an app session into the Space. | destructive |+| [`teleport_manifest`](/spaces/reference/agents#teleport_manifest) | Describe what a session teleport would move. | read-only, idempotent |+| [`teleport_app`](/spaces/reference/agents#teleport_app) | Move an app session into the Space. | destructive |-### [Keyvault](/spaces/reference/keyvault)+### [Keyvault](/spaces/reference/agents#keyvault)Use the user's saved credentials in a Space, only with their approval.| Tool | Description | Effect || --- | --- | --- |-| [`request_site_login`](/spaces/reference/keyvault#request_site_login) | Sign in to a site in the Space with the user's saved password. | destructive |+| [`request_site_login`](/spaces/reference/agents#request_site_login) | Sign in to a site in the Space with the user's saved password. | destructive |-### [Hotspot](/spaces/reference/hotspot)+### [Hotspot](/spaces/reference/spaces#hotspot)Share this machine's network with a Space.| Tool | Description | Effect || --- | --- | --- |-| [`hotspot_start`](/spaces/reference/hotspot#hotspot_start) | Start sharing this machine's network with a Space. | destructive |-| [`hotspot_stop`](/spaces/reference/hotspot#hotspot_stop) | Stop sharing this machine's network. | destructive |-| [`hotspot_status`](/spaces/reference/hotspot#hotspot_status) | Report which Spaces are sharing this machine's network, with counters. | read-only, idempotent |+| [`hotspot_start`](/spaces/reference/spaces#hotspot_start) | Start sharing this machine's network with a Space. | destructive |+| [`hotspot_stop`](/spaces/reference/spaces#hotspot_stop) | Stop sharing this machine's network. | destructive |+| [`hotspot_status`](/spaces/reference/spaces#hotspot_status) | Report which Spaces are sharing this machine's network, with counters. | read-only, idempotent |-### [Cua Volume](/spaces/reference/volume)+### [Cua Volume](/spaces/reference/agents#cua-volume)Read and write the volume every Space and agent shares, decide who may reach what, and see where it is stored and how it syncs.| Tool | Description | Effect || --- | --- | --- |-| [`volume_ls`](/spaces/reference/volume#volume_ls) | List a folder of the Cua Volume. | read-only, idempotent |-| [`volume_read`](/spaces/reference/volume#volume_read) | Read a file from the Cua Volume. | read-only, idempotent |-| [`volume_write`](/spaces/reference/volume#volume_write) | Write a file to the Cua Volume. | destructive |-| [`volume_delete`](/spaces/reference/volume#volume_delete) | Delete a file from the Cua Volume. | destructive |-| [`volume_history`](/spaces/reference/volume#volume_history) | List a Cua Volume file's versions. | read-only, idempotent |-| [`volume_restore`](/spaces/reference/volume#volume_restore) | Restore an old version of a Cua Volume file. | destructive |-| [`volume_grant`](/spaces/reference/volume#volume_grant) | Grant an agent or Space more Cua Volume access. | destructive |-| [`volume_revoke`](/spaces/reference/volume#volume_revoke) | Revoke a Cua Volume grant. | mutating, idempotent |-| [`volume_grants`](/spaces/reference/volume#volume_grants) | List Cua Volume grants. | read-only, idempotent |-| [`volume_request_access`](/spaces/reference/volume#volume_request_access) | Ask the user for more Cua Volume access. | destructive |-| [`volume_requests`](/spaces/reference/volume#volume_requests) | List Cua Volume access requests waiting for the user. | read-only, idempotent |-| [`volume_approve`](/spaces/reference/volume#volume_approve) | Approve a Cua Volume access request. | destructive |-| [`volume_deny`](/spaces/reference/volume#volume_deny) | Decline a Cua Volume access request. | destructive |-| [`volume_audit`](/spaces/reference/volume#volume_audit) | Read the Cua Volume audit log. | read-only, idempotent |-| [`volume_storage`](/spaces/reference/volume#volume_storage) | Show where the Cua Volume keeps its bytes. | read-only, idempotent |-| [`volume_storage_set`](/spaces/reference/volume#volume_storage_set) | Test or change where the Cua Volume keeps its bytes. | mutating, idempotent |-| [`volume_mount_status`](/spaces/reference/volume#volume_mount_status) | Show whether the Cua Volume is mounted as a volume. | read-only, idempotent |-| [`volume_mount`](/spaces/reference/volume#volume_mount) | Mount the Cua Volume as a volume. | mutating, idempotent |-| [`volume_unmount`](/spaces/reference/volume#volume_unmount) | Unmount the Cua Volume volume. | mutating, idempotent |-| [`volume_sync_status`](/spaces/reference/volume#volume_sync_status) | Show the Cua Volume's sync state across devices. | read-only, idempotent |-| [`volume_sync_events`](/spaces/reference/volume#volume_sync_events) | Wait for Cua Volume sync events. | read-only, idempotent |-| [`volume_sync_resolve`](/spaces/reference/volume#volume_sync_resolve) | Mark a Cua Volume sync conflict as seen. | mutating, idempotent |-| [`volume_cache_stats`](/spaces/reference/volume#volume_cache_stats) | Show the Cua Volume block cache. | read-only, idempotent |-| [`volume_cache_set`](/spaces/reference/volume#volume_cache_set) | Set the Cua Volume block cache's size cap. | mutating, idempotent |-| [`volume_cache_clear`](/spaces/reference/volume#volume_cache_clear) | Clear the Cua Volume block cache. | mutating, idempotent |--### [Sharing](/spaces/reference/sharing)+| [`volume_ls`](/spaces/reference/agents#volume_ls) | List a folder of the Cua Volume. | read-only, idempotent |+| [`volume_read`](/spaces/reference/agents#volume_read) | Read a file from the Cua Volume. | read-only, idempotent |+| [`volume_write`](/spaces/reference/agents#volume_write) | Write a file to the Cua Volume. | destructive |+| [`volume_delete`](/spaces/reference/agents#volume_delete) | Delete a file from the Cua Volume. | destructive |+| [`volume_history`](/spaces/reference/agents#volume_history) | List a Cua Volume file's versions. | read-only, idempotent |+| [`volume_restore`](/spaces/reference/agents#volume_restore) | Restore an old version of a Cua Volume file. | destructive |+| [`volume_grant`](/spaces/reference/agents#volume_grant) | Grant an agent or Space more Cua Volume access. | destructive |+| [`volume_revoke`](/spaces/reference/agents#volume_revoke) | Revoke a Cua Volume grant. | mutating, idempotent |+| [`volume_grants`](/spaces/reference/agents#volume_grants) | List Cua Volume grants. | read-only, idempotent |+| [`volume_request_access`](/spaces/reference/agents#volume_request_access) | Ask the user for more Cua Volume access. | destructive |+| [`volume_requests`](/spaces/reference/agents#volume_requests) | List Cua Volume access requests waiting for the user. | read-only, idempotent |+| [`volume_approve`](/spaces/reference/agents#volume_approve) | Approve a Cua Volume access request. | destructive |+| [`volume_deny`](/spaces/reference/agents#volume_deny) | Decline a Cua Volume access request. | destructive |+| [`volume_audit`](/spaces/reference/agents#volume_audit) | Read the Cua Volume audit log. | read-only, idempotent |+| [`volume_storage`](/spaces/reference/agents#volume_storage) | Show where the Cua Volume keeps its bytes. | read-only, idempotent |+| [`volume_storage_set`](/spaces/reference/agents#volume_storage_set) | Test or change where the Cua Volume keeps its bytes. | mutating, idempotent |+| [`volume_mount_status`](/spaces/reference/agents#volume_mount_status) | Show whether the Cua Volume is mounted as a volume. | read-only, idempotent |+| [`volume_mount`](/spaces/reference/agents#volume_mount) | Mount the Cua Volume as a volume. | mutating, idempotent |+| [`volume_unmount`](/spaces/reference/agents#volume_unmount) | Unmount the Cua Volume volume. | mutating, idempotent |+| [`volume_sync_status`](/spaces/reference/agents#volume_sync_status) | Show the Cua Volume's sync state across devices. | read-only, idempotent |+| [`volume_sync_events`](/spaces/reference/agents#volume_sync_events) | Wait for Cua Volume sync events. | read-only, idempotent |+| [`volume_sync_resolve`](/spaces/reference/agents#volume_sync_resolve) | Mark a Cua Volume sync conflict as seen. | mutating, idempotent |+| [`volume_cache_stats`](/spaces/reference/agents#volume_cache_stats) | Show the Cua Volume block cache. | read-only, idempotent |+| [`volume_cache_set`](/spaces/reference/agents#volume_cache_set) | Set the Cua Volume block cache's size cap. | mutating, idempotent |+| [`volume_cache_clear`](/spaces/reference/agents#volume_cache_clear) | Clear the Cua Volume block cache. | mutating, idempotent |++### [Sharing](/spaces/reference/spaces#sharing)Let other cua.ai accounts watch or edit a Space, through the relay.| Tool | Description | Effect || --- | --- | --- |-| [`share_space`](/spaces/reference/sharing#share_space) | Let another cua.ai account watch or edit a Space. | mutating, idempotent |-| [`unshare_space`](/spaces/reference/sharing#unshare_space) | Stop sharing a Space with an account, or with everyone. | mutating, idempotent |-| [`space_shares`](/spaces/reference/sharing#space_shares) | List who a Space is shared with. | read-only, idempotent |-| [`relay_register_space`](/spaces/reference/sharing#relay_register_space) | Publish a Space on the relay for the account's other devices. | mutating, idempotent |-| [`relay_unregister_space`](/spaces/reference/sharing#relay_unregister_space) | Take a Space off the relay. | mutating, idempotent |+| [`share_space`](/spaces/reference/spaces#share_space) | Let another cua.ai account watch or edit a Space. | mutating, idempotent |+| [`unshare_space`](/spaces/reference/spaces#unshare_space) | Stop sharing a Space with an account, or with everyone. | mutating, idempotent |+| [`space_shares`](/spaces/reference/spaces#space_shares) | List who a Space is shared with. | read-only, idempotent |+| [`relay_register_space`](/spaces/reference/spaces#relay_register_space) | Publish a Space on the relay for the account's other devices. | mutating, idempotent |+| [`relay_unregister_space`](/spaces/reference/spaces#relay_unregister_space) | Take a Space off the relay. | mutating, idempotent |-### [Your cloud](/spaces/reference/cloud)+### [Your cloud](/spaces/reference/spaces#your-cloud)Create Spaces in your own AWS, Google Cloud or Modal account: connect it, check it, and clean up what Cua created there.| Tool | Description | Effect || --- | --- | --- |-| [`cloud_status`](/spaces/reference/cloud#cloud_status) | List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. | read-only, idempotent |-| [`cloud_connect`](/spaces/reference/cloud#cloud_connect) | Connect a cloud account Spaces can be created in. | mutating, idempotent |-| [`cloud_test`](/spaces/reference/cloud#cloud_test) | Check a cloud account without creating anything. | read-only, idempotent |-| [`cloud_disconnect`](/spaces/reference/cloud#cloud_disconnect) | Forget a connected cloud account. | mutating, idempotent |-| [`cloud_sweep`](/spaces/reference/cloud#cloud_sweep) | Find and delete what Cua left in your clouds. | destructive |+| [`cloud_status`](/spaces/reference/spaces#cloud_status) | List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. | read-only, idempotent |+| [`cloud_connect`](/spaces/reference/spaces#cloud_connect) | Connect a cloud account Spaces can be created in. | mutating, idempotent |+| [`cloud_test`](/spaces/reference/spaces#cloud_test) | Check a cloud account without creating anything. | read-only, idempotent |+| [`cloud_disconnect`](/spaces/reference/spaces#cloud_disconnect) | Forget a connected cloud account. | mutating, idempotent |+| [`cloud_sweep`](/spaces/reference/spaces#cloud_sweep) | Find and delete what Cua left in your clouds. | destructive |## Space ids@@ -204,4 +204,331 @@ Every tool that takes `space` accepts a Space id or its name.## Errors-A failed call returns a tool result with `isError: true` and a machine `kind`. See [Errors](/spaces/reference/errors).+A tool that fails returns a normal result with `isError: true`, never a protocol error:++```json+{+ "content": [{ "type": "text", "text": "error: <message>" }],+ "isError": true,+ "structuredContent": { "error": { "kind": "<kind>", "message": "<message>" } }+}+```++Branch on `kind`; the message is for people. Every tool can return `invalid_argument`. A tool that takes `space` can also return `not_found` and `ambiguous_sandbox`; one with spacesd `requires`, `spacesd_not_available` and `capability_missing`; one with host requirements, `host_capability_missing`. Each tool lists the rest.++### Error kinds++| Kind | Meaning |+| --- | --- |+| [`invalid_argument`](#invalid_argument) | An argument is missing, malformed or out of range. |+| [`not_found`](#not_found) | No Space, run, window, service, tool or file with that id. |+| [`spacesd_not_available`](#spacesd_not_available) | The machine answered but runs no cua-spacesd, so the spacesd primitives cannot work. |+| [`capability_missing`](#capability_missing) | The Space's cua-spacesd reports a feature this tool needs as unsupported; the message names it and the driver's limitation. |+| [`host_capability_missing`](#host_capability_missing) | A prerequisite on this machine is missing: Fleet credentials, a local runtime, an operator display or app-session providers. |+| [`wrong_provider`](#wrong_provider) | The operation does not apply to this kind of Space. |+| [`unauthenticated`](#unauthenticated) | The Space's spacesd or the cua.ai relay rejected the token. |+| [`permission_denied`](#permission_denied) | The signed-in account may not reach that relay machine. |+| [`ambiguous_host`](#ambiguous_host) | The machine name given to on="host:<name>" fits several of your machines equally well; the message lists them. |+| [`limit_exceeded`](#limit_exceeded) | The host is at a capacity limit: two macOS VMs per Mac (Apple's macOS license, enforced by Apple Virtualization) or the host's own Space limit. |+| [`ambiguous_sandbox`](#ambiguous_sandbox) | A short name matches more than one sandbox. |+| [`transfer_failed`](#transfer_failed) | A file transfer did not land, or landed with a different sha256. |+| [`teleport_refused`](#teleport_refused) | The teleport consent gate refused: a sensitive item without acknowledge_sensitive, a declined approval, or a Space that cannot import the app. |+| [`login_refused`](#login_refused) | The Keyvault refused a site login: the user declined, no saved password matches the page's origin, the tab is on another origin, or the Keyvault is locked or off. |+| [`agent`](#agent) | An agent run failed outside the transport: install, configuration or a refused message. |+| [`timeout`](#timeout) | A wait ran out: a claim that never bound, a Space that never became ready, or a command past its timeout. |+| [`cancelled`](#cancelled) | The create was cancelled (cancel_create, or its caller went away); what it made is gone. |+| [`stream`](#stream) | The media plane failed to open or run the stream. |+| [`env`](#env) | A cua-spacesd call failed. |+| [`fleet`](#fleet) | Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The Fleet control plane failed a cloud Space call. |+| [`fleet_admission_denied`](#fleet_admission_denied) | Retired: no longer returned since Cua Cloud ended (cua 0.4.2). Fleet's admission refused the cloud Space: a size over this account's limits, or a template its policy does not admit. |+| [`cloud_credit_exhausted`](#cloud_credit_exhausted) | Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The account was out of Cua Cloud credit and Fleet refused the new cloud Space. |+| [`invalid_placement`](#invalid_placement) | The location, kind or runtime does not exist, or the combination (with the image) does not. |+| [`sandbox`](#sandbox) | Starting, stopping or deleting the Space's sandbox failed. |+| [`cloud`](#cloud) | Your cloud account refused or failed a call Cua made for a Space there (AWS, Google Cloud, Modal): a missing permission, a quota, a region without the instance type. The message names the cloud's own error. |+| [`relay`](#relay) | The cua.ai relay directory failed. |+| [`mcp`](#mcp) | An MCP service inside the Space failed. |+| [`io`](#io) | Reading or writing a local file failed. |+| [`json`](#json) | A reply could not be parsed. |+| [`forbidden`](#forbidden) | The drive's access rules refuse this principal on this path (an agent outside its own home, its Space's folder, read-only public/ and its grants). |+| [`precondition_failed`](#precondition_failed) | A drive write or delete with if_etag or create_only found a different version at the path. |+| [`secret_detected`](#secret_detected) | A write under agents/ carries something that looks like a secret (an API key, a token, a private key); it was not stored. The message names the kind and line, never the value. |+| [`lease_held`](#lease_held) | Another run holds the persistent agent's home (one writer at a time). |+| [`not_confirmed`](#not_confirmed) | The user did not confirm with presence (Touch ID, the login password or the vault passphrase), so no access was widened. |+| [`volume_backend`](#volume_backend) | The drive's store failed or is not configured (a bucket that refused, missing keys, or a backend this build cannot serve). |++#### invalid_argument++An argument is missing, malformed or out of range.++Fix: Check the call against the tool's input schema; the message names the argument.++Listed by [`volume_storage_set`](/spaces/reference/agents#volume_storage_set), [`volume_cache_set`](/spaces/reference/agents#volume_cache_set), [`relay_unregister_space`](/spaces/reference/spaces#relay_unregister_space).++#### not_found++No Space, run, window, service, tool or file with that id.++Fix: List what exists first (list_spaces, agent_list, list_space_windows, list_tools).++Listed by [`volume_sync_resolve`](/spaces/reference/agents#volume_sync_resolve).++#### spacesd_not_available++The machine answered but runs no cua-spacesd, so the spacesd primitives cannot work.++Fix: Use an image that runs cua-spacesd (for example ghcr.io/trycua/linux:24.04), or reach the Space's own services with list_tools and call_tool.++#### capability_missing++The Space's cua-spacesd reports a feature this tool needs as unsupported; the message names it and the driver's limitation.++Fix: Use a Space whose spacesd supports the feature (see the tool's `requires`).++#### host_capability_missing++A prerequisite on this machine is missing: Fleet credentials, a local runtime, an operator display or app-session providers.++Fix: Set up what the message names (see the tool's `host_requires`).++#### wrong_provider++The operation does not apply to this kind of Space.++Fix: Use a tool that serves the Space's provider (see the tool's `providers`).++Listed by [`stop_space`](/spaces/reference/spaces#stop_space), [`start_space`](/spaces/reference/spaces#start_space).++#### unauthenticated++The Space's spacesd or the cua.ai relay rejected the token.++Fix: Re-add the Space with a valid token, or sign in again with `cua auth login`.++Listed by [`add_space`](/spaces/reference/spaces#add_space), [`list_spaces`](/spaces/reference/spaces#list_spaces), [`share_space`](/spaces/reference/spaces#share_space), [`unshare_space`](/spaces/reference/spaces#unshare_space), [`space_shares`](/spaces/reference/spaces#space_shares), [`relay_register_space`](/spaces/reference/spaces#relay_register_space), [`relay_unregister_space`](/spaces/reference/spaces#relay_unregister_space).++#### permission_denied++The signed-in account may not reach that relay machine.++Fix: Sign in with the account that owns the machine.++Listed by [`stop_space`](/spaces/reference/spaces#stop_space), [`start_space`](/spaces/reference/spaces#start_space), [`share_space`](/spaces/reference/spaces#share_space), [`unshare_space`](/spaces/reference/spaces#unshare_space), [`relay_unregister_space`](/spaces/reference/spaces#relay_unregister_space).++#### ambiguous_host++The machine name given to on="host:<name>" fits several of your machines equally well; the message lists them.++Fix: Ask the user which machine they meant, then pass on="host:<machine id>" from the list.++Listed by [`create_space`](/spaces/reference/spaces#create_space).++#### limit_exceeded++The host is at a capacity limit: two macOS VMs per Mac (Apple's macOS license, enforced by Apple Virtualization) or the host's own Space limit.++Fix: Delete a Space on that host (delete_space), pick another machine, or create a Linux Space instead.++Listed by [`create_space`](/spaces/reference/spaces#create_space).++#### ambiguous_sandbox++A short name matches more than one sandbox.++Fix: Use the full id (`local:<name>` or `cloud:<name>`).++#### transfer_failed++A file transfer did not land, or landed with a different sha256.++Fix: Retry; check free space and permissions at the destination.++Listed by [`space_write`](/spaces/reference/spaces#space_write), [`upload`](/spaces/reference/spaces#upload), [`send_file`](/spaces/reference/spaces#send_file), [`download`](/spaces/reference/spaces#download), [`teleport_app`](/spaces/reference/agents#teleport_app).++#### teleport_refused++The teleport consent gate refused: a sensitive item without acknowledge_sensitive, a declined approval, or a Space that cannot import the app.++Fix: Read teleport_manifest, then pass the items to move and acknowledge_sensitive=true for sensitive ones.++Listed by [`teleport_app`](/spaces/reference/agents#teleport_app).++#### login_refused++The Keyvault refused a site login: the user declined, no saved password matches the page's origin, the tab is on another origin, or the Keyvault is locked or off.++Fix: Ask the user to approve the sign-in in Cua, import the site's saved password, or open the site's sign-in page and try again.++Listed by [`request_site_login`](/spaces/reference/agents#request_site_login).++#### agent++An agent run failed outside the transport: install, configuration or a refused message.++Fix: Read agent_status and its output_tail for the reason.++Listed by [`agent_start`](/spaces/reference/agents#agent_start), [`agent_message`](/spaces/reference/agents#agent_message), [`agent_events`](/spaces/reference/agents#agent_events), [`agent_status`](/spaces/reference/agents#agent_status), [`agent_interrupt`](/spaces/reference/agents#agent_interrupt), [`agent_stop`](/spaces/reference/agents#agent_stop), [`agent_list`](/spaces/reference/agents#agent_list), [`persistent_agent_create`](/spaces/reference/agents#persistent_agent_create), [`persistent_agent_remove`](/spaces/reference/agents#persistent_agent_remove), [`persistent_agent_send`](/spaces/reference/agents#persistent_agent_send), [`persistent_agent_save`](/spaces/reference/agents#persistent_agent_save), [`agent_pause`](/spaces/reference/agents#agent_pause), [`agent_resume`](/spaces/reference/agents#agent_resume).++#### timeout++A wait ran out: a claim that never bound, a Space that never became ready, or a command past its timeout.++Fix: Retry, or raise the tool's timeout.++Listed by [`create_space`](/spaces/reference/spaces#create_space), [`start_space`](/spaces/reference/spaces#start_space), [`space_bash`](/spaces/reference/spaces#space_bash).++#### cancelled++The create was cancelled (cancel_create, or its caller went away); what it made is gone.++Fix: Nothing to clean up; create it again when you want it.++#### stream++The media plane failed to open or run the stream.++Fix: Check that the Space's spacesd supports desktop_stream or window_stream, then retry.++Listed by [`stream_endpoint`](/spaces/reference/spaces#stream_endpoint), [`stream_space_window`](/spaces/reference/spaces#stream_space_window).++#### env++A cua-spacesd call failed.++Fix: Retry; if it persists, check the spacesd log in the Space.++#### fleet++Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The Fleet control plane failed a cloud Space call.++Fix: Create the Space locally or on one of your machines; see https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended.++Listed by [`create_space`](/spaces/reference/spaces#create_space), [`delete_space`](/spaces/reference/spaces#delete_space), [`agent_resume`](/spaces/reference/agents#agent_resume).++#### fleet_admission_denied++Retired: no longer returned since Cua Cloud ended (cua 0.4.2). Fleet's admission refused the cloud Space: a size over this account's limits, or a template its policy does not admit.++Fix: Create the Space locally or on one of your machines; see https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended.++Listed by [`create_space`](/spaces/reference/spaces#create_space).++#### cloud_credit_exhausted++Retired: no longer returned since Cua Cloud ended (cua 0.4.2). The account was out of Cua Cloud credit and Fleet refused the new cloud Space.++Fix: Create the Space locally or on one of your machines; see https://cua.ai/docs/cua-sdk/guides/cua-cloud-ended.++Listed by [`create_space`](/spaces/reference/spaces#create_space).++#### invalid_placement++The location, kind or runtime does not exist, or the combination (with the image) does not.++Fix: Use one of the values the message lists, or leave kind and runtime unset (auto).++Listed by [`create_space`](/spaces/reference/spaces#create_space).++#### sandbox++Starting, stopping or deleting the Space's sandbox failed.++Fix: Check the local runtime (`cua doctor`) or the cloud pool, then retry.++Listed by [`create_space`](/spaces/reference/spaces#create_space), [`delete_space`](/spaces/reference/spaces#delete_space), [`stop_space`](/spaces/reference/spaces#stop_space), [`start_space`](/spaces/reference/spaces#start_space), [`agent_pause`](/spaces/reference/agents#agent_pause), [`agent_resume`](/spaces/reference/agents#agent_resume).++#### cloud++Your cloud account refused or failed a call Cua made for a Space there (AWS, Google Cloud, Modal): a missing permission, a quota, a region without the instance type. The message names the cloud's own error.++Fix: Fix what the message names in that account (`cua cloud test <provider>` checks without creating anything), or connect another region or project.++Listed by [`stop_space`](/spaces/reference/spaces#stop_space), [`start_space`](/spaces/reference/spaces#start_space), [`cloud_connect`](/spaces/reference/spaces#cloud_connect), [`cloud_test`](/spaces/reference/spaces#cloud_test), [`cloud_sweep`](/spaces/reference/spaces#cloud_sweep).++#### relay++The cua.ai relay directory failed.++Fix: Retry; check `cua auth status`.++Listed by [`list_spaces`](/spaces/reference/spaces#list_spaces), [`stop_space`](/spaces/reference/spaces#stop_space), [`start_space`](/spaces/reference/spaces#start_space), [`share_space`](/spaces/reference/spaces#share_space), [`unshare_space`](/spaces/reference/spaces#unshare_space), [`space_shares`](/spaces/reference/spaces#space_shares), [`relay_register_space`](/spaces/reference/spaces#relay_register_space), [`relay_unregister_space`](/spaces/reference/spaces#relay_unregister_space).++#### mcp++An MCP service inside the Space failed.++Fix: Check the service with list_tools; the message carries its error.++Listed by [`list_tools`](/spaces/reference/spaces#list_tools), [`call_tool`](/spaces/reference/spaces#call_tool).++#### io++Reading or writing a local file failed.++Fix: Check the path and its permissions on this machine.++Listed by [`upload`](/spaces/reference/spaces#upload), [`send_file`](/spaces/reference/spaces#send_file), [`download`](/spaces/reference/spaces#download).++#### json++A reply could not be parsed.++Fix: Retry; report it if it persists.++#### forbidden++The drive's access rules refuse this principal on this path (an agent outside its own home, its Space's folder, read-only public/ and its grants).++Fix: Ask for access with volume_request_access; the user approves it in Cua.++Listed by [`volume_ls`](/spaces/reference/agents#volume_ls), [`volume_read`](/spaces/reference/agents#volume_read), [`volume_write`](/spaces/reference/agents#volume_write), [`volume_delete`](/spaces/reference/agents#volume_delete), [`volume_history`](/spaces/reference/agents#volume_history), [`volume_restore`](/spaces/reference/agents#volume_restore), [`volume_grant`](/spaces/reference/agents#volume_grant), [`volume_revoke`](/spaces/reference/agents#volume_revoke), [`volume_grants`](/spaces/reference/agents#volume_grants), [`volume_request_access`](/spaces/reference/agents#volume_request_access), [`volume_requests`](/spaces/reference/agents#volume_requests), [`volume_approve`](/spaces/reference/agents#volume_approve), [`volume_deny`](/spaces/reference/agents#volume_deny), [`volume_audit`](/spaces/reference/agents#volume_audit), [`volume_storage`](/spaces/reference/agents#volume_storage), [`volume_storage_set`](/spaces/reference/agents#volume_storage_set), [`volume_mount_status`](/spaces/reference/agents#volume_mount_status), [`volume_mount`](/spaces/reference/agents#volume_mount), [`volume_unmount`](/spaces/reference/agents#volume_unmount), [`volume_sync_status`](/spaces/reference/agents#volume_sync_status), [`volume_sync_events`](/spaces/reference/agents#volume_sync_events), [`volume_sync_resolve`](/spaces/reference/agents#volume_sync_resolve), [`volume_cache_stats`](/spaces/reference/agents#volume_cache_stats), [`volume_cache_set`](/spaces/reference/agents#volume_cache_set), [`volume_cache_clear`](/spaces/reference/agents#volume_cache_clear).++#### precondition_failed++A drive write or delete with if_etag or create_only found a different version at the path.++Fix: Read the file again and retry with its current etag.++Listed by [`volume_write`](/spaces/reference/agents#volume_write), [`volume_delete`](/spaces/reference/agents#volume_delete).++#### secret_detected++A write under agents/ carries something that looks like a secret (an API key, a token, a private key); it was not stored. The message names the kind and line, never the value.++Fix: Remove the secret from the file; keep credentials in the Keyvault.++Listed by [`persistent_agent_save`](/spaces/reference/agents#persistent_agent_save), [`volume_write`](/spaces/reference/agents#volume_write), [`volume_restore`](/spaces/reference/agents#volume_restore).++#### lease_held++Another run holds the persistent agent's home (one writer at a time).++Fix: Wait for that run to stop, or stop it; the lease expires on its own.++Listed by [`persistent_agent_send`](/spaces/reference/agents#persistent_agent_send).++#### not_confirmed++The user did not confirm with presence (Touch ID, the login password or the vault passphrase), so no access was widened.++Fix: Ask the user to approve it in Cua.++Listed by [`computer_access_grant`](/spaces/reference/agents#computer_access_grant), [`volume_grant`](/spaces/reference/agents#volume_grant), [`volume_approve`](/spaces/reference/agents#volume_approve).++#### volume_backend++The drive's store failed or is not configured (a bucket that refused, missing keys, or a backend this build cannot serve).++Fix: Check `cua volume config show` and the message.++Listed by [`volume_ls`](/spaces/reference/agents#volume_ls), [`volume_read`](/spaces/reference/agents#volume_read), [`volume_write`](/spaces/reference/agents#volume_write), [`volume_delete`](/spaces/reference/agents#volume_delete), [`volume_history`](/spaces/reference/agents#volume_history), [`volume_restore`](/spaces/reference/agents#volume_restore), [`volume_unmount`](/spaces/reference/agents#volume_unmount).++### Protocol errors++JSON-RPC errors are about the message, not the tool.++| Code | Name | When |+| --- | --- | --- |+| `-32700` | `PARSE_ERROR` | The message is not valid JSON. |+| `-32600` | `INVALID_REQUEST` | The message is not a JSON-RPC request: an empty batch, or no `method`. |+| `-32601` | `METHOD_NOT_FOUND` | An unknown method, or `tools/call` of a tool this server does not expose (not in the contract, or filtered out by permissions). |+| `-32602` | `INVALID_PARAMS` | `tools/call` without a tool `name`. |diff --git a/docs/content/docs/spaces/reference/keyvault.mdx b/docs/content/docs/spaces/reference/keyvault.mdxdeleted file mode 100644index 530fba249d..0000000000--- a/docs/content/docs/spaces/reference/keyvault.mdx+++ /dev/null@@ -1,59 +0,0 @@-----title: "Keyvault"-description: "Use the user's saved credentials in a Space, only with their approval."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`request_site_login`](#request_site_login) | Sign in to a site in the Space with the user's saved password. |--## request_site_login--Sign in to a site in the Space with the user's saved password.--Signs in to a website in the Space's browser with a password the user saved in the Cua Keyvault (imported from their browser). The first call files a Keyvault request and returns a request_id; the user approves it in Cua (Touch ID or the login password), once per sign-in by default. Call again with the same space, url and request_id: the Keyvault checks the page is on the saved login's exact origin, types the username and password through the Space's cua-driver, submits the form and returns what it did, never the password. Pass the browser tab you opened (session, target_id, tab_id from get_browser_state on the same Space) to sign in there; without one the Keyvault opens its own browser in the Space on `url` and returns its target_id and tab_id. `agent` names the persistent agent asking, shown to the user.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:request_site_login`; destructive |-| Requires (spacesd) | `driver` |-| Swift SDK | `space.requestSiteLogin(url:)` |-| Rust | `site_login::request_site_login` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | none | The persistent agent asking (shown to the user in the approval). |-| `relay_plaintext_ack` | `boolean` | `false` | Sends the password over a relay connection that predates end-to-end sealing even though the relay could read it in transit. Default `false`: such a Space refuses the fill instead (S1). |-| `request_id` | `string` | none | The request id a previous call returned. Present on the retry after the user approved; absent on the first call. |-| `session` | `string` | none | cua-driver lifecycle session label of the browser tab to sign in. |-| `space` | `string` | required | Space id or name. |-| `tab_id` | `string` | none | cua-driver tab id (from `get_browser_state`). |-| `target_id` | `string` | none | cua-driver browser target id (from `get_browser_state`). |-| `url` | `string` | required | The site's sign-in page (http or https), for example `https://github.com/login`. |-| `username` | `string` | none | Which saved username, when the site has several. |-| `wait_secs` | `integer` | `20` | Seconds to wait for the user's decision on a retry. Default 20, at most 120. At least 0. |--### Result--JSON. First call: `status: "pending"`, a `request_id`, `site` and `space`. Retry with `request_id`: `status: "filled"` with `site`, `origin`, `username_hint` (masked), `submitted`, `page_url` and the browser `target_id`/`tab_id` it signed in; `status: "pending"` while the user decides; `status: "denied"` when they declined. Never the password.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing), [`login_refused`](/spaces/reference/errors#login_refused)--### Notes--- The password never reaches the caller: the Keyvault fills the form through the Space's cua-driver and returns only a masked username.-- Approval is required by default for every sign-in (one use per approval); only an unattended rule the user wrote skips it.diff --git a/docs/content/docs/spaces/reference/lifecycle.mdx b/docs/content/docs/spaces/reference/lifecycle.mdxdeleted file mode 100644index 082e9db381..0000000000--- a/docs/content/docs/spaces/reference/lifecycle.mdx+++ /dev/null@@ -1,245 +0,0 @@-----title: "Space lifecycle"-description: "Register, provision, list and release Spaces."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`add_space`](#add_space) | Add an existing machine as a Space by address and token. |-| [`remove_space`](#remove_space) | Forget a registered Space without touching it. |-| [`list_spaces`](#list_spaces) | List the Spaces this connection can see. |-| [`create_space`](#create_space) | Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud. |-| [`delete_space`](#delete_space) | Delete a Space's sandbox and forget it. |-| [`stop_space`](#stop_space) | Turn a Space off: suspend it (memory kept) or stop it (disk kept). |-| [`start_space`](#start_space) | Turn a Space back on: resume or boot it. |--## add_space--Add an existing machine as a Space by address and token.--Tries a GetCapabilities handshake with the Space's cua-spacesd first. A local:<name> or cloud:<name> id without one is still a Space, with an empty capability set (its declared services, tunnels and public URLs work); a direct URL without one is added as an MCP Space when it answers MCP initialize (service `mcp`), and refused with spacesd_not_available when it answers neither. The Space is stored in ~/.cua/spaces.json and its token in ~/.cua/spaces-credentials.json (0600). Re-adding the same address updates it.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:add_space`; mutating, idempotent |-| Swift SDK | `SpacesConnection.addSpace(url:token:)` |-| Rust | `Spaces::add` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | none | Display name. Default: the guest's hostname. |-| `service` | `string` | `mcp` | For an MCP endpoint URL: the service name to register it under. Default `mcp`. |-| `token` | `string` | none | The spacesd token (or the bearer an MCP endpoint needs). Stored in a separate 0600 credentials file, never in `spaces.json`. |-| `url` | `string` | required | The Space's cua-spacesd: `http(s)://host:port` (port defaults to 3211), `host:port`, or a Space id (`cloud:<name>`, `local:<name>`). Any other MCP endpoint (for example `http://host:8765/mcp`) is added as a Space with one MCP service and no spacesd capabilities. |--### Result--JSON: the registered Space (`id`, `name`, `provider`, `spacesd_version`, `features`, `os`, `services`, `added_at`) and `phase: "ready"`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`unauthenticated`](/spaces/reference/errors#unauthenticated)--## remove_space--Forget a registered Space without touching it.--Only the registration and its stored token are removed. The sandbox keeps running, including a Space in your cloud (its cloud resources and relay machine stay); delete_space deletes a Space that create_space made.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:remove_space`; mutating, idempotent |-| Swift SDK | `SpacesConnection.removeSpace(_:)` |-| Rust | `Spaces::remove` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `{"removed": <Space>}`, the registration that was removed.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox)--## list_spaces--List the Spaces this connection can see.--Every registered Space (cloud, local, direct and relay) with its id (local:<name>, cloud:<name>, direct:<host:port>, relay:<machine-id>), provider, spacesd version (empty without one) and supported features as of the last handshake. The signed-in account's machines on the relay are listed too: those are the names `create_space` accepts as on="host:<machine>". A Space a machine provides carries `host` (that machine's id) and `host_name`; group them under it when you show them. A Space in your cloud carries `cloud` (the provider: aws, gcp, modal), `cloud_place` (account and region, to show with it) and `cloud_delete` (where delete_space can delete it: here, host:<machine>, or elsewhere).--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:list_spaces`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `SpacesConnection.spaces()` |-| Rust | `Spaces::list` |--### Parameters--No parameters.--### Result--JSON: an array of Spaces (`id`, `name`, `provider`, `spacesd_version`, `features`, `os`, `services`, `added_at`, for a Space one of your machines provides `host` and `host_name`, for a Space that can be turned off and on `power` (`suspend` or `stop`) and `power_state`, and for a Space in your cloud `cloud`, `cloud_place` and `cloud_delete`, and for a relay machine the relay cannot reach now `status` (`offline` or `not sharing`)), each with `phase`: `ready`, or `offline` for a relay machine the relay cannot reach now (a machine that is off or stopped sharing, or a Space that is gone and left its record; `relay_unregister_space` removes it).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`relay`](/spaces/reference/errors#relay), [`unauthenticated`](/spaces/reference/errors#unauthenticated)--## create_space--Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud.--Creates a new sandbox where `on` says (local: this machine, free; aws, gcp or modal: the user's own cloud account, connected with cloud_connect, billed there; default: the user's default location, else local), waits until it is ready (its spacesd when the image runs one, else its declared services), and registers it as local:<name>. Cua Cloud (on="cloud") has ended and fails with an error that says so. `kind` (auto, container, vm) and `runtime` (auto, or an engine the location offers for the kind) are chosen automatically by default: the canonical Linux image runs as a gVisor container, macOS images as Lume VMs, Windows and disk-only images as VMs (QEMU locally, KubeVirt in the cloud). An impossible combination fails with invalid_placement and lists the valid values. Any image works; without cua-spacesd the capability set is empty. reuse=true returns a reachable registered Space in the same location with the requested services instead of creating one. On the user's own machines: on="host:<machine>" creates the Space on a machine set up with `cua host setup --provide-spaces` (for example "spin up 2 macOS Spaces on my spare Mac mini" is on="host:spare mac mini", image="macos", count=2). The machine is matched by id, exact name, or the words of its name; when several fit equally the call fails with ambiguous_host listing them (ask the user which, then pass on="host:<id>"). The host runs it with its own runtimes (Lume for macOS VMs on a Mac, Docker for Linux), the Space joins the relay and is returned as relay:<machine> with `host` set. A Mac runs at most two macOS VMs (Apple's macOS license, enforced by Apple Virtualization); a host at a limit fails with limit_exceeded. Only the machine's owner and the accounts it is shared with as editors can create there, from an enrolled device. on="direct:<addr>" is not accepted here: a direct address is one already-running Space, attached with add_space, not a host this call can create on.--| | |-| --- | --- |-| Providers | cloud only (`cloud:<name>`), local only (`local:<name>`), relay only (`relay:<machine-id>`) |-| Platforms | all (macos, windows, linux) |-| Metering | cloud |-| Approval | permission `spaces:create_space`; destructive |-| Swift SDK | `Spaces.create(options)` |-| Rust | `Spaces::create` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `command` | `string[]` | none | Entrypoint override (argv), for example `["python", "-m", "my_mcp", "--port", "8765"]`. |-| `count` | `integer` | none | How many Spaces to create, 1 to 8 (default 1), all with the same settings (a name gets `-2`, `-3`, ... suffixes). With more than one the result is an array. At least 0. |-| `env` | `map of string` | none | Guest environment variables. |-| `image` | `string` | none | Guest image. Default: the canonical Linux image (`ghcr.io/trycua/linux:24.04`), whose variant follows the kind. |-| `kind` | `"auto" \| "container" \| "vm"` | `auto` | What kind of machine. Default `auto` (from the image). `auto`: From the image: macOS and Windows images are VMs, an image with a container rootfs is a container, a disk-only image is a VM. `container`: A container (gVisor, or runc locally). `vm`: A virtual machine (QEMU or Lume locally, KubeVirt in the cloud). |-| `name` | `string` | none | Name. Default: a generated `space-<hex>`. |-| `on` | `string` | none | Where it runs: `local` (this machine, free), `cloud` (Cua cloud, metered), or `host:<machine>`: one of the user's own machines that provides Spaces (`cua host setup --provide-spaces` on it), named by id or by words from its name ("host:spare mac mini" matches "Mac mini (spare)" or `dillons-mac-mini`). Default: the user's default location (`cua config set default.on`, `CUA_DEFAULT_ON`), else `local`. Not `direct:<addr>`: that is one already-running Space at a fixed address, attached with `add_space`, not a host this can create on. An existing machine is added with `add_space`, not created. |-| `reuse` | `boolean` | `false` | Return a reachable registered Space in the same location that has the requested services instead of creating one (get-or-create). Default false. |-| `runtime` | `string` | `auto` | Which engine. Default `auto`: the safest one for the location and kind. Local: `gvisor` or `runc` (containers), `qemu` or `lume` (VMs). Cloud: `gvisor` (containers), `kubevirt` (VMs). Anything else fails with `invalid_placement`, listing the valid values. |-| `services` | `map of integer` | none | Named services (name to guest port), for example `{"mcp": 8765}`. Each is probed for readiness and reachable with `list_tools` / `call_tool` (`service=<name>`). |-| `spacesd` | `boolean` | `true` | Whether the image runs cua-spacesd. Default: true for the canonical images (and no image), false for any other image. A Space without it has an empty capability set: only its services work. |-| `timeout` | `integer` | `600` | Seconds to wait for readiness (local). Default 600. At least 0. |-| `wait` | `boolean` | `true` | Wait until the Space is ready (its spacesd, or its declared services). Default true. |--### Result--JSON: the registered Space, `phase: "ready"` and `reused` (true when `reuse` returned an existing Space); with `wait: false`, `{"id", "phase": "starting"}` at once; with `count` above 1, an array of them.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`invalid_placement`](/spaces/reference/errors#invalid_placement), [`fleet`](/spaces/reference/errors#fleet), [`fleet_admission_denied`](/spaces/reference/errors#fleet_admission_denied), [`cloud_credit_exhausted`](/spaces/reference/errors#cloud_credit_exhausted), [`sandbox`](/spaces/reference/errors#sandbox), [`timeout`](/spaces/reference/errors#timeout), [`ambiguous_host`](/spaces/reference/errors#ambiguous_host), [`limit_exceeded`](/spaces/reference/errors#limit_exceeded)--### Notes--- Cloud needs Fleet credentials (`cua auth login`); local needs a container engine, QEMU or Lume (`cua runtime doctor`).--## delete_space--Delete a Space's sandbox and forget it.--Deletes the sandbox of a Space that create_space made (cloud: metering stops; local: the instance is deleted; on one of your machines, on="host:...": that machine deletes it and it leaves the relay) and forgets it. A Space in your cloud (list_spaces: cloud, cloud_place, cloud_delete) is deleted permanently through the records of the device that created it: cloud_delete "here" deletes it from this device; "host:<machine>" asks that host (it must be online, and only its owner may); "elsewhere" is refused with where it was created: delete it there, or remove_space. Another Space added by address (direct:, relay:) is only forgotten: cua did not create it. Any hotspot on the Space is stopped first. To forget a Space without deleting anything, use remove_space.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:delete_space`; destructive |-| Swift SDK | `Spaces.delete(space)` |-| Rust | `Spaces::delete` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--Text: what was deleted (`Deleted <id> (...)`), or `Removed <id> (...)` for a Space added by address.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`fleet`](/spaces/reference/errors#fleet), [`sandbox`](/spaces/reference/errors#sandbox)--## stop_space--Turn a Space off: suspend it (memory kept) or stop it (disk kept).--Turns a Space off the way its provider can: a local container or QEMU VM is suspended (its memory is kept and it resumes where it was), a local Lume VM is stopped (its disk is kept and it boots again), a Space one of your machines provides is stopped by that machine, which frees its memory, and a Space in your own cloud (on="aws", "gcp") is stopped there: compute billing stops, its disk stays (storage is still billed). Anything streaming from the Space and any hotspot on it end first. A Fleet cloud Space, a Modal sandbox, a Space added by address and your own computers on the relay cannot be turned off (wrong_provider); delete_space deletes a Space instead. start_space turns it on again.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:stop_space`; mutating, idempotent |-| Swift SDK | `Spaces.stop(space)` |-| Rust | `Spaces::stop` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `space`, `state` (`suspended` or `stopped`), `power` (`suspend` or `stop`) and `message`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`wrong_provider`](/spaces/reference/errors#wrong_provider), [`sandbox`](/spaces/reference/errors#sandbox), [`relay`](/spaces/reference/errors#relay), [`permission_denied`](/spaces/reference/errors#permission_denied), [`cloud`](/spaces/reference/errors#cloud)--### Notes--- list_spaces says which Spaces turn off (`power`: `suspend` or `stop`; absent when it cannot) and how they were left (`power_state`).--## start_space--Turn a Space back on: resume or boot it.--Turns a Space stop_space turned off on again: resumes a suspended one, boots a stopped one (a Space one of your machines provides, or one in your cloud, joins the relay again), and leaves a running one as it is. Returns once it answers again (bounded). The same Spaces turn on as turn off.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:start_space`; mutating, idempotent |-| Swift SDK | `Spaces.start(space)` |-| Rust | `Spaces::start` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `space`, `state` (`running`), `power` (`suspend` or `stop`) and `message`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`wrong_provider`](/spaces/reference/errors#wrong_provider), [`sandbox`](/spaces/reference/errors#sandbox), [`relay`](/spaces/reference/errors#relay), [`permission_denied`](/spaces/reference/errors#permission_denied), [`cloud`](/spaces/reference/errors#cloud), [`timeout`](/spaces/reference/errors#timeout)diff --git a/docs/content/docs/spaces/reference/meta.json b/docs/content/docs/spaces/reference/meta.jsonindex 5d009ae577..177b3c9049 100644--- a/docs/content/docs/spaces/reference/meta.json+++ b/docs/content/docs/spaces/reference/meta.json@@ -2,18 +2,7 @@"title": "Reference","pages": ["index",- "lifecycle",- "commands-and-files",- "streams-and-display",- "services",- "agents",- "persistent-agents",- "teleport",- "keyvault",- "hotspot",- "volume",- "sharing",- "cloud",- "errors"+ "spaces",+ "agents"]}diff --git a/docs/content/docs/spaces/reference/persistent-agents.mdx b/docs/content/docs/spaces/reference/persistent-agents.mdxdeleted file mode 100644index b2d4b3468a..0000000000--- a/docs/content/docs/spaces/reference/persistent-agents.mdx+++ /dev/null@@ -1,538 +0,0 @@-----title: "Persistent agents"-description: "Named agents whose memory outlives their Space: homes in Cua Volume, routines, notifications, pause and resume, access to the user's computers."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`persistent_agent_create`](#persistent_agent_create) | Create a named agent whose memory outlives its Space. |-| [`persistent_agent_list`](#persistent_agent_list) | List persistent agents. |-| [`persistent_agent_remove`](#persistent_agent_remove) | Forget a persistent agent. |-| [`persistent_agent_send`](#persistent_agent_send) | Give a persistent agent a turn. |-| [`persistent_agent_save`](#persistent_agent_save) | Save a persistent agent's home now. |-| [`agent_pause`](#agent_pause) | Pause a persistent agent: its run, its routines and its Space. |-| [`agent_resume`](#agent_resume) | Resume a paused persistent agent. |-| [`routine_add`](#routine_add) | Schedule a recurring turn for a persistent agent. |-| [`routine_list`](#routine_list) | List routines. |-| [`routine_remove`](#routine_remove) | Delete a routine. |-| [`routine_set_enabled`](#routine_set_enabled) | Turn a routine on or off. |-| [`notify_user`](#notify_user) | Tell the user something in the Cua app. |-| [`notifications_list`](#notifications_list) | Read the notifications feed. |-| [`notifications_ack`](#notifications_ack) | Mark notifications read. |-| [`computer_access_grant`](#computer_access_grant) | Let a persistent agent use one of the user's computers. |-| [`computer_access_revoke`](#computer_access_revoke) | Take back a persistent agent's access to a computer. |-| [`computer_access_list`](#computer_access_list) | List per-agent computer access. |--## persistent_agent_create--Create a named agent whose memory outlives its Space.--A persistent agent is a harness with a name, a Space and a home in the Cua Volume (agents/<name>/). Its harness keeps its memory in the home (Claude Code auto memory, Codex memories, Hermes MEMORY.md, the OpenClaw workspace), which is restored into the Space before each run and saved after each turn, so the agent remembers across runs, Space releases and machines. One run writes a home at a time. Start it with persistent_agent_send (or agent_start with home=<name>); the daemon notifies the user when a turn ends. Inside the Space the agent gets the `cua` bridge: notify_user, the drive, and the user's computers it was granted.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:persistent_agent_create`; destructive |-| Swift SDK | `spaces.persistentAgents.create(...)` |-| Rust | `Persistent::create` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `"claude-code" \| "gemini-cli" \| "google-antigravity" \| "goose" \| "hermes" \| "openai-codex" \| "openclaw" \| "opencode" \| "pi"` | required | Harness id. `agent_capabilities` lists what each needs. |-| `base_url` | `string` | none | A custom model endpoint base URL. |-| `env` | `map of string` | `{}` | More environment for every run (not secrets; see `env_from_host`). |-| `env_from_host` | `string[]` | `[]` | Provider key variables forwarded from this server's environment (or the keys saved in Cua Spaces) at every start, for example ["ANTHROPIC_API_KEY"]. Names only. |-| `model` | `string` | none | Model id. |-| `name` | `string` | required | The agent's name: 1-63 of a-z, 0-9, `.`, `_`, `-`. Its home is `agents/<name>/` in the Cua Volume. |-| `space` | `string` | required | The Space it works in (id or name). |--### Result--JSON: the agent record: `name`, `harness`, `space`, `model`, `base_url`, `env_from_host`, `paused`, `space_state` and `created_ms`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`agent`](/spaces/reference/errors#agent)--## persistent_agent_list--List persistent agents.--Every persistent agent of this machine's cua home, with its Space, its current run and when its home was last saved.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:persistent_agent_list`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.persistentAgents.list()` |-| Rust | `Persistent::list` |--### Parameters--No parameters.--### Result--JSON: `{"agents"}`, each with `name`, `harness`, `space`, `paused`, `space_state`, `run_id`, `saved_ms` and `last_error`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## persistent_agent_remove--Forget a persistent agent.--Stops its run, removes its routines and forgets it. Its home (agents/<name>/) stays in the Cua Volume; delete it there.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:persistent_agent_remove`; destructive |-| Swift SDK | `spaces.persistentAgents.remove(_:)` |-| Rust | `Persistent::remove` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | required | The persistent agent's name. |--### Result--JSON: `removed` (the record). The home stays in the Cua Volume.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`agent`](/spaces/reference/errors#agent)--## persistent_agent_send--Give a persistent agent a turn.--A follow-up to the agent's idle run, or a new run with its home restored when it has none. Refused while a turn runs (never interrupts) and while paused. Follow the run with agent_events on the agent's Space.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:persistent_agent_send`; destructive |-| Swift SDK | `spaces.persistentAgents.send(_:_:)` |-| Rust | `Persistent::send` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | required | The persistent agent's name. |-| `text` | `string` | required | The message (the prompt of a new run, or a follow-up). |--### Result--JSON: `run_id`, `started` (a new run, with the home restored) and `restored` (`files`, `bytes`, `millis`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`agent`](/spaces/reference/errors#agent), [`lease_held`](/spaces/reference/errors#lease_held)--## persistent_agent_save--Save a persistent agent's home now.--Saves the agent's home from its Space into the Cua Volume now (the daemon also saves after every turn): only files whose SHA-256 changed move.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:persistent_agent_save`; mutating, idempotent |-| Swift SDK | `spaces.persistentAgents.save(_:)` |-| Rust | `Persistent::save` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | required | The persistent agent's name. |--### Result--JSON: `files`, `bytes`, `unchanged`, `removed`, `blocked` (files the secret scanner kept out) and `millis`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`agent`](/spaces/reference/errors#agent), [`secret_detected`](/spaces/reference/errors#secret_detected)--## agent_pause--Pause a persistent agent: its run, its routines and its Space.--One call: stops the run, saves the home, releases the home's lease, keeps the agent's routines from firing, and suspends its Space when it is local. A cloud Space cannot be suspended (Fleet has no per-claim pause), so pausing releases it after the home is saved; agent_resume creates it again from the same image and restores the home. Apps open in a released cloud Space do not come back. The user's own machines are never suspended.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:agent_pause`; mutating, idempotent |-| Swift SDK | `spaces.persistentAgents.pause(_:)` |-| Rust | `Persistent::pause` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | required | The persistent agent's name. |--### Result--JSON: `stopped_run`, `saved` (the home save), `space_state` (`suspended`, `released` or `running`) and `millis`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`agent`](/spaces/reference/errors#agent), [`sandbox`](/spaces/reference/errors#sandbox)--## agent_resume--Resume a paused persistent agent.--Resumes a suspended local Space, or creates a released cloud Space again from the same image, restores the home and lets routines fire again. With `prompt`, starts a run on it.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | cloud |-| Approval | permission `spaces:agent_resume`; destructive |-| Swift SDK | `spaces.persistentAgents.resume(_:prompt:)` |-| Rust | `Persistent::resume` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | required | The persistent agent's name. |-| `prompt` | `string` | none | Start a run on this prompt once the agent is back. Default: none (the next message or routine starts one). |--### Result--JSON: `space` (it can change when a cloud Space is created again), `recreated`, `restored`, `run_id` and `ready_ms` (from the call to the home being back in a ready Space).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`agent`](/spaces/reference/errors#agent), [`sandbox`](/spaces/reference/errors#sandbox), [`fleet`](/spaces/reference/errors#fleet)--## routine_add--Schedule a recurring turn for a persistent agent.--Fired by `cua daemon` whether or not an app is open, as a turn of the agent (`[routine] <title>: <prompt>`). A routine never interrupts a turn: a busy or paused agent skips that slot. A daemon that was asleep fires a missed routine once on waking.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:routine_add`; destructive |-| Swift SDK | `spaces.persistentAgents.addRoutine(...)` |-| Rust | `Persistent::routine_add` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | required | The persistent agent that runs it. |-| `daily_at` | `string` | none | Every day at `HH:MM` (local time). |-| `enabled` | `boolean` | `true` | Default true. |-| `every_minutes` | `integer` | none | Every N minutes. |-| `prompt` | `string` | required | What the agent is asked each time. |-| `title` | `string` | required | A short title (shown in the app and prefixed to the turn). |-| `weekly_on` | `string` | none | Every week at `<weekday> HH:MM` (local time), for example `mon 09:00`. |--### Result--JSON: the routine: `id`, `botID` (the agent), `title`, `prompt`, `schedule`, `isEnabled` and `createdAt`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## routine_list--List routines.--Routines with their next firing and what the last one did.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:routine_list`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.persistentAgents.routines(agent:)` |-| Rust | `Persistent::routines` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | none | Only this persistent agent's routines. Default: all. |--### Result--JSON: `{"routines"}`, each with `id`, `botID`, `title`, `prompt`, `schedule`, `label`, `isEnabled`, `lastFiredAt`, `lastRunID`, `lastOutcome` and `next_fire`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## routine_remove--Delete a routine.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:routine_remove`; mutating, idempotent |-| Swift SDK | `spaces.persistentAgents.removeRoutine(_:)` |-| Rust | `Persistent::routine_remove` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `id` | `string` | required | The routine's id. |--### Result--JSON: `removed` (the id).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## routine_set_enabled--Turn a routine on or off.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:routine_set_enabled`; mutating, idempotent |-| Swift SDK | `spaces.persistentAgents.setRoutineEnabled(_:_:)` |-| Rust | `Persistent::routine_set_enabled` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `enabled` | `boolean` | required | On or off. |-| `id` | `string` | required | The routine's id. |--### Result--JSON: the routine.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## notify_user--Tell the user something in the Cua app.--Posts a notification the Cua app shows ("Your research is ready"). Agents inside a Space get the same tool on their `cua` bridge.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:notify_user`; destructive |-| Swift SDK | `spaces.notifications.post(...)` |-| Rust | `notify::Feed::post` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | none | The persistent agent it is about, if any. |-| `body` | `string` | none | The details. Default empty. |-| `title` | `string` | required | One short line. |--### Result--JSON: `notified` and `id`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## notifications_list--Read the notifications feed.--The feed the Cua app turns into system notifications: turn ends of persistent agents, notify_user calls, access requests and failures. It persists while no app is open.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:notifications_list`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.notifications.list(...)` |-| Rust | `notify::Feed::list` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `since_ms` | `integer` | none | Only ones newer than this (Unix ms). At least 0. |-| `unread_only` | `boolean` | `false` | Only unread ones. Default false. |--### Result--JSON: `{"notifications"}`, newest first, each with `id`, `at_ms`, `agent`, `kind` (`turn_ended`, `message`, `approval`, `error`), `title`, `body`, `run_id`, `space` and `read`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## notifications_ack--Mark notifications read.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:notifications_ack`; mutating, idempotent |-| Swift SDK | `spaces.notifications.markRead(_:)` |-| Rust | `notify::Feed::ack` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `ids` | `string[]` | `[]` | Ids to mark read. Default: every notification. |--### Result--JSON: `marked` (how many changed).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## computer_access_grant--Let a persistent agent use one of the user's computers.--Lets one persistent agent use one of the user's machines (its computer-use tools, through the agent's bridge). Asks the user for presence (Touch ID or passphrase) first. Other agents of the account get nothing.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:computer_access_grant`; destructive |-| Swift SDK | `spaces.persistentAgents.allowComputer(_:machine:)` |-| Rust | `access::Access::grant` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | required | The persistent agent. |-| `expires_in_secs` | `integer` | none | End the grant after this many seconds. Default: until revoked. At least 0. |-| `machine` | `string` | required | The machine (a Space id, usually `relay:<machine-id>` from `cua host setup`). |--### Result--JSON: the grant: `id`, `agent`, `machine`, `created_ms`, `expires_ms`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_confirmed`](/spaces/reference/errors#not_confirmed)--## computer_access_revoke--Take back a persistent agent's access to a computer.--Takes the access back at once: the agent's next call is refused. No presence needed.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:computer_access_revoke`; mutating, idempotent |-| Swift SDK | `spaces.persistentAgents.revokeComputer(_:machine:)` |-| Rust | `access::Access::revoke` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | required | The persistent agent. |-| `machine` | `string` | none | The machine. Default: every machine. |--### Result--JSON: `revoked` (how many grants).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)--## computer_access_list--List per-agent computer access.--Which agents may use which of the user's computers, and the audited record of grants, uses and refusals.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:computer_access_list`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.persistentAgents.computerAccess(agent:)` |-| Rust | `access::Access::grants` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `agent` | `string` | none | Only this persistent agent's grants. Default: all. |-| `audit` | `integer` | `0` | Include the audit log's newest entries (this many). Default 0. At least 0. |--### Result--JSON: `{"grants"}` (each `id`, `agent`, `machine`, `created_ms`, `expires_ms`, `revoked`) and, with `audit`, `audit` (newest first: `ts_ms`, `principal`, `action`, `path` (the machine), `detail`) plus `audit_verified`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument)diff --git a/docs/content/docs/spaces/reference/services.mdx b/docs/content/docs/spaces/reference/services.mdxdeleted file mode 100644index 9cb815bacb..0000000000--- a/docs/content/docs/spaces/reference/services.mdx+++ /dev/null@@ -1,83 +0,0 @@-----title: "Services"-description: "Discover and call the MCP services inside a Space."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`list_tools`](#list_tools) | List the MCP services and tools reachable inside the Space. |-| [`call_tool`](#call_tool) | Call a service tool inside the Space. |--## list_tools--List the MCP services and tools reachable inside the Space.--Lists the tools of an MCP service INSIDE the Space. `service` is any service the Space declares (an MCP server the image runs, reached over streamable HTTP; no spacesd needed) or `driver`, the spacesd's own cua-driver registry (screenshot, click, type, launch apps, accessibility, ...). The default is `driver`, or the only declared service of a Space without spacesd. With no `name`, returns a scannable overview; pass name=<substring> for full input schemas. Then invoke them with call_tool. The reply names every service the Space exposes.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:list_tools`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `space.services.list()` |-| Rust | `Services::list_tools` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `name` | `string` | none | Substring filter; matching tools come back with full input schemas. |-| `service` | `string` | `driver` | Service. A service the Space declares (see `list_spaces`), reached over generic MCP (streamable HTTP), or `driver` (the spacesd's cua-driver registry; `mcp`, `cua-driver` and `computer-server` are aliases unless the Space declares a service by that name). Default: `driver`, or the only declared service of a Space without spacesd. |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `service`, `count`, `tools` (`name` and `description`; with `name`, also `inputSchema`), `services`, `contract_version`, and a `hint` when no filter was given.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`mcp`](/spaces/reference/errors#mcp)--## call_tool--Call a service tool inside the Space.--Returns the tool's content parts unchanged, images included. A tool-level failure comes back with isError, not as a transport error.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:call_tool`; destructive |-| Swift SDK | `space.services.call(_:on:_:)` |-| Rust | `Services::call_tool` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `arguments` | `object` | `{}` | Arguments object for the tool. Default `{}`. |-| `service` | `string` | `driver` | Service (see `list_tools`). Default: `driver`, or the only declared service of a Space without spacesd. |-| `space` | `string` | required | Space id or name. |-| `tool` | `string` | required | Tool name from `list_tools`. |--### Result--The called tool's own result, unchanged: its content parts (images included), `structuredContent` and `isError`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`mcp`](/spaces/reference/errors#mcp)--### Notes--- Open world twice over: the callee is a tool the SDK has never seen.diff --git a/docs/content/docs/spaces/reference/sharing.mdx b/docs/content/docs/spaces/reference/sharing.mdxdeleted file mode 100644index 7b8d5fde30..0000000000--- a/docs/content/docs/spaces/reference/sharing.mdx+++ /dev/null@@ -1,177 +0,0 @@-----title: "Sharing"-description: "Let other cua.ai accounts watch or edit a Space, through the relay."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`share_space`](#share_space) | Let another cua.ai account watch or edit a Space. |-| [`unshare_space`](#unshare_space) | Stop sharing a Space with an account, or with everyone. |-| [`space_shares`](#space_shares) | List who a Space is shared with. |-| [`relay_register_space`](#relay_register_space) | Publish a Space on the relay for the account's other devices. |-| [`relay_unregister_space`](#relay_unregister_space) | Take a Space off the relay. |--## share_space--Let another cua.ai account watch or edit a Space.--Shares the Space through the cua.ai relay with one account, by verified email or account id, or with a whole team as `team:<id>` (always as an editor; Teams plan); the same allowlist and device enrollment `cua host share` uses. A viewer joins presence with their own named cursor and watches a view-only stream: the Space's driver refuses their input, shell, files and MCP. An editor gets full use, and their input is a human session. Sharing again changes the role. A host (`relay:<id>`) is shared directly; any other Space (local, cloud, or added by address) is attached to the relay on its first share: its own driver dials out, so it needs no inbound port. Invitees open `invitee_space`.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:share_space`; mutating, idempotent |-| Requires (this machine) | `relay_account` |-| Swift SDK | `space.sharing.share(with:role:)` |-| Rust | `Spaces::share_space` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `role` | `string` | `viewer` | `viewer` (presence with their own cursor and a view-only stream) or `editor` (full use; their input is a human session). Default `viewer`. |-| `space` | `string` | required | Space id or name. |-| `who` | `string` | required | Who: an email address (verified by cua.ai) or an account id, or `team:<id>` for a whole team. A team always gets `editor` and needs the Teams plan; the sharer is a team owner or admin who owns the Space. |--### Result--JSON: `space`, `machine` (the relay machine it is shared as; empty when not shared), `invitee_space` (what the people it is shared with open: `relay:<machine>`), `url`, `online` and `shares` (each `who`, `role`: viewer or editor, and `connected`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`relay`](/spaces/reference/errors#relay), [`permission_denied`](/spaces/reference/errors#permission_denied), [`unauthenticated`](/spaces/reference/errors#unauthenticated)--### Notes--- Viewers and editors are enforced by the Space's own cua-spacesd, not by the caller; a Space whose driver predates relay_attach reports capability_missing.--## unshare_space--Stop sharing a Space with an account, or with everyone.--Removes one account (or everyone) at once: the relay cuts their open streams and refuses new calls. With no `who`, the Space stops being shared and a Space that is not a host leaves the relay.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:unshare_space`; mutating, idempotent |-| Requires (this machine) | `relay_account` |-| Swift SDK | `space.sharing.unshare(_:)` |-| Rust | `Spaces::unshare_space` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |-| `who` | `string` | none | The email or account id to remove. Default: everyone (the Space stops being shared; a Space that is not a host leaves the relay). |--### Result--JSON: `space`, `machine` (the relay machine it is shared as; empty when not shared), `invitee_space` (what the people it is shared with open: `relay:<machine>`), `url`, `online` and `shares` (each `who`, `role`: viewer or editor, and `connected`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`relay`](/spaces/reference/errors#relay), [`permission_denied`](/spaces/reference/errors#permission_denied), [`unauthenticated`](/spaces/reference/errors#unauthenticated)--## space_shares--List who a Space is shared with.--Who the Space is shared with, in which role, and who of them is connected through the relay now.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:space_shares`, in `spaces:readonly`; read-only, idempotent |-| Requires (this machine) | `relay_account` |-| Swift SDK | `space.sharing.shares()` |-| Rust | `Spaces::space_shares` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `audit` | `integer` | `0` | Also return this many of the newest owner-side audit lines. Default 0. At least 0. |-| `space` | `string` | required | Space id or name. |--### Result--JSON: the shares (see share_space) and, with `audit`, `audit`: the newest owner-side lines (`ts_ms`, `action`: share, unshare, attach or detach, `space`, `detail`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`relay`](/spaces/reference/errors#relay), [`unauthenticated`](/spaces/reference/errors#unauthenticated)--## relay_register_space--Publish a Space on the relay for the account's other devices.--Publishes the Space as a machine of the signed-in account on the cua.ai relay, the way `cua host setup` publishes this computer: the Space's own driver joins the relay over outbound WSS with a machine token the account registered, so no inbound port is opened. The account's other devices (a phone off this network, the Cua app on another computer) then open `relay_space`; nobody else can until share_space adds them. Idempotent, and it re-attaches a Space that restarted. Needs a driver with relay_attach (a host is already registered).--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:relay_register_space`; mutating, idempotent |-| Requires (this machine) | `relay_account` |-| Swift SDK | `spaces.relay.register(_:)` |-| Rust | `Spaces::relay_register` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `space`, `relay_space` (`relay:<machine>`: how the account's other devices reach it), `machine`, `url` and `online`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`relay`](/spaces/reference/errors#relay), [`unauthenticated`](/spaces/reference/errors#unauthenticated)--## relay_unregister_space--Take a Space off the relay.--Takes the Space off the relay: its driver leaves and its machine is removed, with every share. A `relay:<machine>` id removes that machine's record from the relay directory, which only its owner may do: a Space that registered itself (also after it was deleted), or a machine that is no longer connected. A host that is connected now is taken off with `cua host remove` on that machine instead.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:relay_unregister_space`; mutating, idempotent |-| Requires (this machine) | `relay_account` |-| Swift SDK | `spaces.relay.unregister(_:)` |-| Rust | `Spaces::relay_unregister` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--JSON: `space` and `unregistered` (false when it was not on the relay).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`relay`](/spaces/reference/errors#relay), [`unauthenticated`](/spaces/reference/errors#unauthenticated), [`permission_denied`](/spaces/reference/errors#permission_denied)diff --git a/docs/content/docs/spaces/reference/spaces.mdx b/docs/content/docs/spaces/reference/spaces.mdxnew file mode 100644index 0000000000..a8b4498b66--- /dev/null+++ b/docs/content/docs/spaces/reference/spaces.mdx@@ -0,0 +1,1168 @@+---+title: "Spaces tools"+description: "Create, run, stream, share and serve from a Space: the Spaces tools with their parameters, results and errors."+---++{/*+ AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY+ Generated by: pnpm --dir docs docs:generate:spaces+ Source: libs/cua/spaces-contract/manifest.json+ Version: 0.7.0+*/}++## Space lifecycle++Register, provision, list and release Spaces.++| Tool | Description |+| --- | --- |+| [`add_space`](#add_space) | Add an existing machine as a Space by address and token. |+| [`remove_space`](#remove_space) | Forget a registered Space without touching it. |+| [`list_spaces`](#list_spaces) | List the Spaces this connection can see. |+| [`create_space`](#create_space) | Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud. |+| [`delete_space`](#delete_space) | Delete a Space's sandbox and forget it. |+| [`stop_space`](#stop_space) | Turn a Space off: suspend it (memory kept) or stop it (disk kept). |+| [`start_space`](#start_space) | Turn a Space back on: resume or boot it. |++### add_space++Add an existing machine as a Space by address and token.++Tries a GetCapabilities handshake with the Space's cua-spacesd first. A local:<name> or cloud:<name> id without one is still a Space, with an empty capability set (its declared services, tunnels and public URLs work); a direct URL without one is added as an MCP Space when it answers MCP initialize (service `mcp`), and refused with spacesd_not_available when it answers neither. The Space is stored in ~/.cua/spaces.json and its token in ~/.cua/spaces-credentials.json (0600). Re-adding the same address updates it.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:add_space`; mutating, idempotent |+| Swift SDK | `SpacesConnection.addSpace(url:token:)` |+| Rust | `Spaces::add` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | none | Display name. Default: the guest's hostname. |+| `service` | `string` | `mcp` | For an MCP endpoint URL: the service name to register it under. Default `mcp`. |+| `token` | `string` | none | The spacesd token (or the bearer an MCP endpoint needs). Stored in a separate 0600 credentials file, never in `spaces.json`. |+| `url` | `string` | required | The Space's cua-spacesd: `http(s)://host:port` (port defaults to 3211), `host:port`, or a Space id (`cloud:<name>`, `local:<name>`). Any other MCP endpoint (for example `http://host:8765/mcp`) is added as a Space with one MCP service and no spacesd capabilities. |++#### Result++JSON: the registered Space (`id`, `name`, `provider`, `spacesd_version`, `features`, `os`, `services`, `added_at`) and `phase: "ready"`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`unauthenticated`](/spaces/reference#unauthenticated)++### remove_space++Forget a registered Space without touching it.++Only the registration and its stored token are removed. The sandbox keeps running, including a Space in your cloud (its cloud resources and relay machine stay); delete_space deletes a Space that create_space made.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:remove_space`; mutating, idempotent |+| Swift SDK | `SpacesConnection.removeSpace(_:)` |+| Rust | `Spaces::remove` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `{"removed": <Space>}`, the registration that was removed.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox)++### list_spaces++List the Spaces this connection can see.++Every registered Space (cloud, local, direct and relay) with its id (local:<name>, cloud:<name>, direct:<host:port>, relay:<machine-id>), provider, spacesd version (empty without one) and supported features as of the last handshake. The signed-in account's machines on the relay are listed too: those are the names `create_space` accepts as on="host:<machine>". A Space a machine provides carries `host` (that machine's id) and `host_name`; group them under it when you show them. A Space in your cloud carries `cloud` (the provider: aws, gcp, modal), `cloud_place` (account and region, to show with it) and `cloud_delete` (where delete_space can delete it: here, host:<machine>, or elsewhere).++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:list_spaces`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `SpacesConnection.spaces()` |+| Rust | `Spaces::list` |++#### Parameters++No parameters.++#### Result++JSON: an array of Spaces (`id`, `name`, `provider`, `spacesd_version`, `features`, `os`, `services`, `added_at`, for a Space one of your machines provides `host` and `host_name`, for a Space that can be turned off and on `power` (`suspend` or `stop`) and `power_state`, and for a Space in your cloud `cloud`, `cloud_place` and `cloud_delete`, and for a relay machine the relay cannot reach now `status` (`offline` or `not sharing`)), each with `phase`: `ready`, or `offline` for a relay machine the relay cannot reach now (a machine that is off or stopped sharing, or a Space that is gone and left its record; `relay_unregister_space` removes it).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`relay`](/spaces/reference#relay), [`unauthenticated`](/spaces/reference#unauthenticated)++### create_space++Create a Space: a new sandbox on this machine, on one of your machines, or in the cloud.++Creates a new sandbox where `on` says (local: this machine, free; aws, gcp or modal: the user's own cloud account, connected with cloud_connect, billed there; default: the user's default location, else local), waits until it is ready (its spacesd when the image runs one, else its declared services), and registers it as local:<name>. Cua Cloud (on="cloud") has ended and fails with an error that says so. `kind` (auto, container, vm) and `runtime` (auto, or an engine the location offers for the kind) are chosen automatically by default: the canonical Linux image runs as a gVisor container, macOS images as Lume VMs, Windows and disk-only images as VMs (QEMU locally, KubeVirt in the cloud). An impossible combination fails with invalid_placement and lists the valid values. Any image works; without cua-spacesd the capability set is empty. reuse=true returns a reachable registered Space in the same location with the requested services instead of creating one. On the user's own machines: on="host:<machine>" creates the Space on a machine set up with `cua host setup --provide-spaces` (for example "spin up 2 macOS Spaces on my spare Mac mini" is on="host:spare mac mini", image="macos", count=2). The machine is matched by id, exact name, or the words of its name; when several fit equally the call fails with ambiguous_host listing them (ask the user which, then pass on="host:<id>"). The host runs it with its own runtimes (Lume for macOS VMs on a Mac, Docker for Linux), the Space joins the relay and is returned as relay:<machine> with `host` set. A Mac runs at most two macOS VMs (Apple's macOS license, enforced by Apple Virtualization); a host at a limit fails with limit_exceeded. Only the machine's owner and the accounts it is shared with as editors can create there, from an enrolled device. on="direct:<addr>" is not accepted here: a direct address is one already-running Space, attached with add_space, not a host this call can create on.++| | |+| --- | --- |+| Providers | cloud only (`cloud:<name>`), local only (`local:<name>`), relay only (`relay:<machine-id>`) |+| Platforms | all (macos, windows, linux) |+| Metering | cloud |+| Approval | permission `spaces:create_space`; destructive |+| Swift SDK | `Spaces.create(options)` |+| Rust | `Spaces::create` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `command` | `string[]` | none | Entrypoint override (argv), for example `["python", "-m", "my_mcp", "--port", "8765"]`. |+| `count` | `integer` | none | How many Spaces to create, 1 to 8 (default 1), all with the same settings (a name gets `-2`, `-3`, ... suffixes). With more than one the result is an array. At least 0. |+| `env` | `map of string` | none | Guest environment variables. |+| `image` | `string` | none | Guest image. Default: the canonical Linux image (`ghcr.io/trycua/linux:24.04`), whose variant follows the kind. |+| `kind` | `"auto" \| "container" \| "vm"` | `auto` | What kind of machine. Default `auto` (from the image). `auto`: From the image: macOS and Windows images are VMs, an image with a container rootfs is a container, a disk-only image is a VM. `container`: A container (gVisor, or runc locally). `vm`: A virtual machine (QEMU or Lume locally, KubeVirt in the cloud). |+| `name` | `string` | none | Name. Default: a generated `space-<hex>`. |+| `on` | `string` | none | Where it runs: `local` (this machine, free), `cloud` (Cua cloud, metered), or `host:<machine>`: one of the user's own machines that provides Spaces (`cua host setup --provide-spaces` on it), named by id or by words from its name ("host:spare mac mini" matches "Mac mini (spare)" or `dillons-mac-mini`). Default: the user's default location (`cua config set default.on`, `CUA_DEFAULT_ON`), else `local`. Not `direct:<addr>`: that is one already-running Space at a fixed address, attached with `add_space`, not a host this can create on. An existing machine is added with `add_space`, not created. |+| `reuse` | `boolean` | `false` | Return a reachable registered Space in the same location that has the requested services instead of creating one (get-or-create). Default false. |+| `runtime` | `string` | `auto` | Which engine. Default `auto`: the safest one for the location and kind. Local: `gvisor` or `runc` (containers), `qemu` or `lume` (VMs). Cloud: `gvisor` (containers), `kubevirt` (VMs). Anything else fails with `invalid_placement`, listing the valid values. |+| `services` | `map of integer` | none | Named services (name to guest port), for example `{"mcp": 8765}`. Each is probed for readiness and reachable with `list_tools` / `call_tool` (`service=<name>`). |+| `spacesd` | `boolean` | `true` | Whether the image runs cua-spacesd. Default: true for the canonical images (and no image), false for any other image. A Space without it has an empty capability set: only its services work. |+| `timeout` | `integer` | `600` | Seconds to wait for readiness (local). Default 600. At least 0. |+| `wait` | `boolean` | `true` | Wait until the Space is ready (its spacesd, or its declared services). Default true. |++#### Result++JSON: the registered Space, `phase: "ready"` and `reused` (true when `reuse` returned an existing Space); with `wait: false`, `{"id", "phase": "starting"}` at once; with `count` above 1, an array of them.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`invalid_placement`](/spaces/reference#invalid_placement), [`fleet`](/spaces/reference#fleet), [`fleet_admission_denied`](/spaces/reference#fleet_admission_denied), [`cloud_credit_exhausted`](/spaces/reference#cloud_credit_exhausted), [`sandbox`](/spaces/reference#sandbox), [`timeout`](/spaces/reference#timeout), [`ambiguous_host`](/spaces/reference#ambiguous_host), [`limit_exceeded`](/spaces/reference#limit_exceeded)++#### Notes++- Cloud needs Fleet credentials (`cua auth login`); local needs a container engine, QEMU or Lume (`cua runtime doctor`).++### delete_space++Delete a Space's sandbox and forget it.++Deletes the sandbox of a Space that create_space made (cloud: metering stops; local: the instance is deleted; on one of your machines, on="host:...": that machine deletes it and it leaves the relay) and forgets it. A Space in your cloud (list_spaces: cloud, cloud_place, cloud_delete) is deleted permanently through the records of the device that created it: cloud_delete "here" deletes it from this device; "host:<machine>" asks that host (it must be online, and only its owner may); "elsewhere" is refused with where it was created: delete it there, or remove_space. Another Space added by address (direct:, relay:) is only forgotten: cua did not create it. Any hotspot on the Space is stopped first. To forget a Space without deleting anything, use remove_space.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:delete_space`; destructive |+| Swift SDK | `Spaces.delete(space)` |+| Rust | `Spaces::delete` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++Text: what was deleted (`Deleted <id> (...)`), or `Removed <id> (...)` for a Space added by address.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`fleet`](/spaces/reference#fleet), [`sandbox`](/spaces/reference#sandbox)++### stop_space++Turn a Space off: suspend it (memory kept) or stop it (disk kept).++Turns a Space off the way its provider can: a local container or QEMU VM is suspended (its memory is kept and it resumes where it was), a local Lume VM is stopped (its disk is kept and it boots again), a Space one of your machines provides is stopped by that machine, which frees its memory, and a Space in your own cloud (on="aws", "gcp") is stopped there: compute billing stops, its disk stays (storage is still billed). Anything streaming from the Space and any hotspot on it end first. A Fleet cloud Space, a Modal sandbox, a Space added by address and your own computers on the relay cannot be turned off (wrong_provider); delete_space deletes a Space instead. start_space turns it on again.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:stop_space`; mutating, idempotent |+| Swift SDK | `Spaces.stop(space)` |+| Rust | `Spaces::stop` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `space`, `state` (`suspended` or `stopped`), `power` (`suspend` or `stop`) and `message`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`wrong_provider`](/spaces/reference#wrong_provider), [`sandbox`](/spaces/reference#sandbox), [`relay`](/spaces/reference#relay), [`permission_denied`](/spaces/reference#permission_denied), [`cloud`](/spaces/reference#cloud)++#### Notes++- list_spaces says which Spaces turn off (`power`: `suspend` or `stop`; absent when it cannot) and how they were left (`power_state`).++### start_space++Turn a Space back on: resume or boot it.++Turns a Space stop_space turned off on again: resumes a suspended one, boots a stopped one (a Space one of your machines provides, or one in your cloud, joins the relay again), and leaves a running one as it is. Returns once it answers again (bounded). The same Spaces turn on as turn off.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:start_space`; mutating, idempotent |+| Swift SDK | `Spaces.start(space)` |+| Rust | `Spaces::start` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `space`, `state` (`running`), `power` (`suspend` or `stop`) and `message`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`wrong_provider`](/spaces/reference#wrong_provider), [`sandbox`](/spaces/reference#sandbox), [`relay`](/spaces/reference#relay), [`permission_denied`](/spaces/reference#permission_denied), [`cloud`](/spaces/reference#cloud), [`timeout`](/spaces/reference#timeout)++## Commands and files++Run shell commands and move files in and out of a Space.++| Tool | Description |+| --- | --- |+| [`space_bash`](#space_bash) | Run a shell command inside the Space. |+| [`space_write`](#space_write) | Write literal text to a path inside the Space. |+| [`upload`](#upload) | Send a local file or folder into the Space. |+| [`send_file`](#send_file) | Send a host file or folder into the Space's Downloads, verified by sha256 on arrival. |+| [`download`](#download) | Fetch a file or folder out of the Space. |++### space_bash++Run a shell command inside the Space.++Runs through the spacesd's ProcessService with `/bin/sh -c`. Output is stdout, then `[stderr]` and stderr, then `[exit N]`; each stream keeps its last 16000 characters when longer.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:space_bash`; destructive |+| Swift SDK | `Space.bash(_:)` |+| Rust | `Space::bash` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `command` | `string` | required | Command line, run with `/bin/sh -c` (`cmd.exe /C` on Windows guests). |+| `space` | `string` | required | Space id or name. |+| `timeout` | `integer` | `60` | Seconds before the command is killed. Default 60. At least 0. |++#### Result++Text: stdout, then `[stderr]` and stderr, then `[exit N]`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`timeout`](/spaces/reference#timeout)++### space_write++Write literal text to a path inside the Space.++Written through FilesystemService, verified by sha256; no shell is involved, so nothing needs quoting.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:space_write`; destructive |+| Swift SDK | `Space.write(_:to:)` |+| Rust | `Space::write` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `content` | `string` | required | The exact file contents. |+| `path` | `string` | required | Absolute path in the Space. Parent directories are created. |+| `space` | `string` | required | Space id or name. |++#### Result++Text: `wrote <path> (<n> bytes, sha256 <hex> verified in Space)`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`transfer_failed`](/spaces/reference#transfer_failed)++#### Notes++- Literal text: no local file is read and nothing is shell-quoted, which is the whole reason it exists next to space_bash.++### upload++Send a local file or folder into the Space.++Files stream through FilesystemService in chunks with a sha256 check; a folder is copied file by file (empty directories included, symlinks skipped). No size cap.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:upload`; destructive |+| Swift SDK | `space.files.send(_:to:within:)` |+| Rust | `Space::upload` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `dest` | `string` | `<guest home>/<name>` | Absolute destination path in the Space; an existing file there is replaced. Default: `<guest home>/<name>`, or `<name> (1).ext` when that is taken (nothing is replaced). |+| `path` | `string` | required | Host path (file or folder). |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `source`, `dest`, `kind` (`file` or `folder`), `files`, `directories`, `bytes`, `sha256` (single file) and `verified`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`transfer_failed`](/spaces/reference#transfer_failed), [`io`](/spaces/reference#io)++#### Notes++- Without `dest` nothing in the Space is replaced: a taken `<home>/<name>` lands as `<name> (1).ext`. An explicit `dest` is written as given and replaces a file already there.++### send_file++Send a host file or folder into the Space's Downloads, verified by sha256 on arrival.++The same transfer the Cua Spaces pop-out's Teleport drop zone performs: files land in the Space user's ~/Downloads through the spacesd's TeleportService (chunked, resumable, every file verified by sha256 before it is published). A transfer that does not land, or lands corrupted, is an error and not a reported success.++respect_ignorefiles (default true) applies ONLY when `path` is a folder. It honors `.gitignore` and `.ignore` at the folder root and in every subdirectory (each scoped to its own subtree, so a nested ignore file overrides its parent), plus `.dockerignore` at the root only. All three use gitignore semantics: negation (`!`), directory-only patterns (`foo/`), anchoring, `*`/`?`/`[...]`, `**`, comments, last-matching-rule-wins. As in git, an excluded directory is pruned and `!` cannot re-include anything beneath it. `.git/` is always skipped and symlinks are never followed. For a single named file it has NO effect.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:send_file`; destructive |+| Swift SDK | `Space.sendFile(_:into:respectingIgnoreFiles:)` |+| Rust | `Space::send_file` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `path` | `string` | required | Host path (file or folder) to send. |+| `respect_ignorefiles` | `boolean` | `true` | Honor `.gitignore` / `.ignore` (nested) and `.dockerignore` (root only) when sending a folder. Default true. No effect on a single named file. |+| `space` | `string` | required | Space id or name. |+| `target_directory` | `string` | `~/Downloads` | Subdirectory of the Space user's `~/Downloads` to land in. `~/Downloads` and `~/Downloads/<sub>` are accepted too. Default: `~/Downloads` itself. |++#### Result++JSON: `source`, `destination`, `dest`, `kind`, `files` (each `path`, `size`, `sha256`), `bytes`, `respect_ignorefiles`, `skipped_by_ignorefiles`, `skipped_count`, `skipped_by_guest` and `verified`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`transfer_failed`](/spaces/reference#transfer_failed), [`io`](/spaces/reference#io)++#### Notes++- Unlike `upload`, the copy is verified in the Space by sha256 before the call returns: a transfer that does not land, or lands corrupted, is an error and not a reported success.+- `respect_ignorefiles` applies only when the path is a folder, with gitignore semantics; a file named explicitly is always sent.+- A file of the same name already in the Space is kept: the new copy lands as `name (1).ext` and its path is in `files`.++### download++Fetch a file or folder out of the Space.++Files stream through FilesystemService and are verified by sha256; a folder is copied recursively.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:download`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `Space.download(_:into:)` |+| Rust | `Space::download` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `dest` | `string` | `~/Downloads/cua-spaces` | Host destination directory. Default `~/Downloads/cua-spaces`. |+| `path` | `string` | required | Absolute path in the Space (file or folder). |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `source`, `dest`, `kind`, `files`, `bytes`, `sha256` (single file) and `verified`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`transfer_failed`](/spaces/reference#transfer_failed), [`io`](/spaces/reference#io)++#### Notes++- Nothing on the host is overwritten: when `dest` already has an entry of that name the copy lands as `name (1).ext` (or `name (1)` for a folder), and `dest` in the result is the path used.++## Streams and display++Stream a Space's desktop or windows, and show a Space to the operator.++| Tool | Description |+| --- | --- |+| [`stream_endpoint`](#stream_endpoint) | Return a ticketed media endpoint for the Space's desktop or one window. |+| [`list_space_windows`](#list_space_windows) | List the windows open inside the Space. |+| [`stream_space_window`](#stream_space_window) | Draw one Space window on the operator's desktop. |+| [`show_space_pip`](#show_space_pip) | Pin the Space as picture-in-picture on the operator's desktop. |+| [`hide_space_pip`](#hide_space_pip) | Unpin the picture-in-picture window. |+| [`open_space_viewer`](#open_space_viewer) | Open the full Space viewer on the operator's desktop. |++### stream_endpoint++Return a ticketed media endpoint for the Space's desktop or one window.++Opens a media session (StreamService.OpenMedia) for the desktop or one window and returns its ticketed WebSocket URL (rcdp wire v2, see libs/cua/proto/MEDIA.md). The ticket is short-lived, bound to that one session, and safe to put in a URL; it is not the Space's token. Works for every provider because the token comes from the SDK, not from the guest.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:stream_endpoint`; mutating, idempotent |+| Requires (spacesd) | `desktop_stream` |+| Swift SDK | `Space.streamEndpoint(forceRefresh:)` |+| Rust | `Streams::open` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `app_name` | `string` | none | Stream the largest visible window of this app (case-insensitive substring). Ignored when `window_id` is set. |+| `display` | `string` | none | Display id for a desktop stream. Default: the primary display. |+| `max_fps` | `integer` | `30` | Maximum frames per second. Default 30. At least 0. |+| `space` | `string` | required | Space id or name. |+| `ticket_ttl` | `integer` | `60` | Ticket lifetime in seconds (at most 600). Default 60. At least 0. |+| `window_id` | `string` | none | Window handle from `list_space_windows`. Streams that window. |++#### Result++JSON: `space`, `media_session_id`, `ws_url` (ticket included), `ticket`, `ticket_expires_at`, `codec` (`h264`, `bgra` or `png`), `wire_version`, `frame_size` and `needs_gateway_headers`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing), [`stream`](/spaces/reference#stream)++#### Notes++- Giving the caller frames is a different act from presenting the Space to an operator.+- Replaces local_rcdp, which only worked for Local macOS Spaces and read its token over ssh.++### list_space_windows++List the windows open inside the Space.++The windows a viewer can stream now, from StreamService.ListTargets: on screen, sized, normal app windows (no hidden, minimized or system-UI windows), each with its handle, title, app and bounds.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:list_space_windows`, in `spaces:readonly`; read-only, idempotent |+| Requires (spacesd) | `windows` |+| Swift SDK | `Space.windows()` |+| Rust | `Streams::windows` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `app_name` | `string` | none | Only windows of this app (case-insensitive substring). |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: an array of windows (`window_id`, `epoch`, `title`, `app_name`, `app_id`, `pid`, `bounds`, `on_screen`, `focused`, `available`, `limitation`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing)++### stream_space_window++Draw one Space window on the operator's desktop.++FOR THE HUMAN. Opens a bidirectional window on the operator's desktop showing one Space window (the Cua Spaces app draws it from a media ticket). Pass app_name to auto-pick that app's largest visible window, or an exact window_id.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | macos (the operator's machine) |+| Metering | free |+| Approval | permission `spaces:stream_space_window`; mutating, idempotent |+| Requires (spacesd) | `window_stream` |+| Requires (this machine) | `operator_display` |+| Swift SDK | `space.operatorDisplay.streamWindowToOperatorDesktop(_:)` |+| Rust | `OperatorDisplay::stream_window` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `app_name` | `string` | none | Auto-pick this app's largest visible window, e.g. "Firefox". |+| `space` | `string` | required | Space id or name. |+| `title` | `string` | none | Label for the operator's window. Default: the window title. |+| `window_id` | `string` | none | Exact window handle from `list_space_windows` (overrides `app_name`). |++#### Result++Text: `Streaming <window> of <space> to your desktop (bidirectional).`++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`stream`](/spaces/reference#stream)++#### Notes++- Operator-side: the pixels land on the human's machine, so the platform axis is the operator's OS and not the Space's.++### show_space_pip++Pin the Space as picture-in-picture on the operator's desktop.++FOR THE HUMAN, NOT FOR YOU. Pins an always-on-top picture-in-picture overlay of the Space onto the user's own desktop. Call it only when the user asks to see a Space; never to observe your own work.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | macos (the operator's machine) |+| Metering | free |+| Approval | permission `spaces:show_space_pip`; mutating, idempotent |+| Requires (spacesd) | `desktop_stream` |+| Requires (this machine) | `operator_display` |+| Swift SDK | `space.operatorDisplay.pinPictureInPictureOnOperatorDesktop()` |+| Rust | `OperatorDisplay::pin_pip` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++Text: `Pinned <space> as picture-in-picture on your desktop.`++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing), [`host_capability_missing`](/spaces/reference#host_capability_missing)++### hide_space_pip++Unpin the picture-in-picture window.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | macos (the operator's machine) |+| Metering | free |+| Approval | permission `spaces:hide_space_pip`; mutating, idempotent |+| Requires (this machine) | `operator_display` |+| Swift SDK | `space.operatorDisplay.unpinPictureInPictureFromOperatorDesktop()` |+| Rust | `OperatorDisplay::unpin_pip` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++Text: `Unpinned <space> from your desktop.`++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing)++### open_space_viewer++Open the full Space viewer on the operator's desktop.++FOR THE HUMAN, NOT FOR YOU. Opens a live viewer window on the user's own desktop. Never call it to obtain a screenshot or to check on your own work; use the screenshot tool for that.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | macos (the operator's machine) |+| Metering | free |+| Approval | permission `spaces:open_space_viewer`; mutating, idempotent |+| Requires (spacesd) | `desktop_stream` |+| Requires (this machine) | `operator_display` |+| Swift SDK | `space.operatorDisplay.openViewerOnOperatorDesktop()` |+| Rust | `OperatorDisplay::open_viewer` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++Text: `Opened the <space> viewer on your desktop.`++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing), [`host_capability_missing`](/spaces/reference#host_capability_missing)++## Services++Discover and call the MCP services inside a Space.++| Tool | Description |+| --- | --- |+| [`list_tools`](#list_tools) | List the MCP services and tools reachable inside the Space. |+| [`call_tool`](#call_tool) | Call a service tool inside the Space. |++### list_tools++List the MCP services and tools reachable inside the Space.++Lists the tools of an MCP service INSIDE the Space. `service` is any service the Space declares (an MCP server the image runs, reached over streamable HTTP; no spacesd needed) or `driver`, the spacesd's own cua-driver registry (screenshot, click, type, launch apps, accessibility, ...). The default is `driver`, or the only declared service of a Space without spacesd. With no `name`, returns a scannable overview; pass name=<substring> for full input schemas. Then invoke them with call_tool. The reply names every service the Space exposes.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:list_tools`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `space.services.list()` |+| Rust | `Services::list_tools` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `name` | `string` | none | Substring filter; matching tools come back with full input schemas. |+| `service` | `string` | `driver` | Service. A service the Space declares (see `list_spaces`), reached over generic MCP (streamable HTTP), or `driver` (the spacesd's cua-driver registry; `mcp`, `cua-driver` and `computer-server` are aliases unless the Space declares a service by that name). Default: `driver`, or the only declared service of a Space without spacesd. |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `service`, `count`, `tools` (`name` and `description`; with `name`, also `inputSchema`), `services`, `contract_version`, and a `hint` when no filter was given.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`mcp`](/spaces/reference#mcp)++### call_tool++Call a service tool inside the Space.++Returns the tool's content parts unchanged, images included. A tool-level failure comes back with isError, not as a transport error.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:call_tool`; destructive |+| Swift SDK | `space.services.call(_:on:_:)` |+| Rust | `Services::call_tool` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `arguments` | `object` | `{}` | Arguments object for the tool. Default `{}`. |+| `service` | `string` | `driver` | Service (see `list_tools`). Default: `driver`, or the only declared service of a Space without spacesd. |+| `space` | `string` | required | Space id or name. |+| `tool` | `string` | required | Tool name from `list_tools`. |++#### Result++The called tool's own result, unchanged: its content parts (images included), `structuredContent` and `isError`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`mcp`](/spaces/reference#mcp)++#### Notes++- Open world twice over: the callee is a tool the SDK has never seen.++## Hotspot++Share this machine's network with a Space.++| Tool | Description |+| --- | --- |+| [`hotspot_start`](#hotspot_start) | Start sharing this machine's network with a Space. |+| [`hotspot_stop`](#hotspot_stop) | Stop sharing this machine's network. |+| [`hotspot_status`](#hotspot_status) | Report which Spaces are sharing this machine's network, with counters. |++### hotspot_start++Start sharing this machine's network with a Space.++Starts the Space's reverse-SOCKS hotspot (TunnelService.StartHotspot) and serves its egress from this machine, so the Space browses as this machine. Runs until hotspot_stop, delete_space, or this server exiting.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:hotspot_start`; destructive |+| Requires (spacesd) | `hotspot` |+| Swift SDK | `connection.hotspot.start(sharingWith:)` |+| Rust | `Spaces::hotspot_start` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `bypass` | `string[]` | none | Destinations (CIDRs or host suffixes) that keep using the Space's own network. |+| `set_system_proxy` | `boolean` | `true` | Point the Space's system proxy (and `HTTP(S)_PROXY` for new processes) at the hotspot. Default true. |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: the hotspot (`space`, `state`, `hotspot_id`, `socks_address`, `active_connections`, `bytes_out`, `bytes_in`, `served_here`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing)++#### Notes++- Capability-gated rather than cloud-only: any Space whose spacesd supports `hotspot` can borrow this machine's network.++### hotspot_stop++Stop sharing this machine's network.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:hotspot_stop`; destructive |+| Requires (spacesd) | `hotspot` |+| Swift SDK | `connection.hotspot.stop()` |+| Rust | `Spaces::hotspot_stop` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | none | Space id or name. Default: every Space with an active hotspot. |++#### Result++JSON: `{"stopped": [...]}`, the hotspots that were stopped.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing)++### hotspot_status++Report which Spaces are sharing this machine's network, with counters.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:hotspot_status`, in `spaces:readonly`; read-only, idempotent |+| Requires (spacesd) | `hotspot` |+| Swift SDK | `connection.hotspot.status()` |+| Rust | `Spaces::hotspot_statuses` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | none | Space id or name. Default: every Space with an active hotspot. |++#### Result++JSON: `{"hotspots": [...]}`, each shaped like hotspot_start's result.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference#spacesd_not_available), [`capability_missing`](/spaces/reference#capability_missing)++## Sharing++Let other cua.ai accounts watch or edit a Space, through the relay.++| Tool | Description |+| --- | --- |+| [`share_space`](#share_space) | Let another cua.ai account watch or edit a Space. |+| [`unshare_space`](#unshare_space) | Stop sharing a Space with an account, or with everyone. |+| [`space_shares`](#space_shares) | List who a Space is shared with. |+| [`relay_register_space`](#relay_register_space) | Publish a Space on the relay for the account's other devices. |+| [`relay_unregister_space`](#relay_unregister_space) | Take a Space off the relay. |++### share_space++Let another cua.ai account watch or edit a Space.++Shares the Space through the cua.ai relay with one account, by verified email or account id, or with a whole team as `team:<id>` (always as an editor; Teams plan); the same allowlist and device enrollment `cua host share` uses. A viewer joins presence with their own named cursor and watches a view-only stream: the Space's driver refuses their input, shell, files and MCP. An editor gets full use, and their input is a human session. Sharing again changes the role. A host (`relay:<id>`) is shared directly; any other Space (local, cloud, or added by address) is attached to the relay on its first share: its own driver dials out, so it needs no inbound port. Invitees open `invitee_space`.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:share_space`; mutating, idempotent |+| Requires (this machine) | `relay_account` |+| Swift SDK | `space.sharing.share(with:role:)` |+| Rust | `Spaces::share_space` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `role` | `string` | `viewer` | `viewer` (presence with their own cursor and a view-only stream) or `editor` (full use; their input is a human session). Default `viewer`. |+| `space` | `string` | required | Space id or name. |+| `who` | `string` | required | Who: an email address (verified by cua.ai) or an account id, or `team:<id>` for a whole team. A team always gets `editor` and needs the Teams plan; the sharer is a team owner or admin who owns the Space. |++#### Result++JSON: `space`, `machine` (the relay machine it is shared as; empty when not shared), `invitee_space` (what the people it is shared with open: `relay:<machine>`), `url`, `online` and `shares` (each `who`, `role`: viewer or editor, and `connected`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`relay`](/spaces/reference#relay), [`permission_denied`](/spaces/reference#permission_denied), [`unauthenticated`](/spaces/reference#unauthenticated)++#### Notes++- Viewers and editors are enforced by the Space's own cua-spacesd, not by the caller; a Space whose driver predates relay_attach reports capability_missing.++### unshare_space++Stop sharing a Space with an account, or with everyone.++Removes one account (or everyone) at once: the relay cuts their open streams and refuses new calls. With no `who`, the Space stops being shared and a Space that is not a host leaves the relay.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:unshare_space`; mutating, idempotent |+| Requires (this machine) | `relay_account` |+| Swift SDK | `space.sharing.unshare(_:)` |+| Rust | `Spaces::unshare_space` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |+| `who` | `string` | none | The email or account id to remove. Default: everyone (the Space stops being shared; a Space that is not a host leaves the relay). |++#### Result++JSON: `space`, `machine` (the relay machine it is shared as; empty when not shared), `invitee_space` (what the people it is shared with open: `relay:<machine>`), `url`, `online` and `shares` (each `who`, `role`: viewer or editor, and `connected`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`relay`](/spaces/reference#relay), [`permission_denied`](/spaces/reference#permission_denied), [`unauthenticated`](/spaces/reference#unauthenticated)++### space_shares++List who a Space is shared with.++Who the Space is shared with, in which role, and who of them is connected through the relay now.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:space_shares`, in `spaces:readonly`; read-only, idempotent |+| Requires (this machine) | `relay_account` |+| Swift SDK | `space.sharing.shares()` |+| Rust | `Spaces::space_shares` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `audit` | `integer` | `0` | Also return this many of the newest owner-side audit lines. Default 0. At least 0. |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: the shares (see share_space) and, with `audit`, `audit`: the newest owner-side lines (`ts_ms`, `action`: share, unshare, attach or detach, `space`, `detail`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`relay`](/spaces/reference#relay), [`unauthenticated`](/spaces/reference#unauthenticated)++### relay_register_space++Publish a Space on the relay for the account's other devices.++Publishes the Space as a machine of the signed-in account on the cua.ai relay, the way `cua host setup` publishes this computer: the Space's own driver joins the relay over outbound WSS with a machine token the account registered, so no inbound port is opened. The account's other devices (a phone off this network, the Cua app on another computer) then open `relay_space`; nobody else can until share_space adds them. Idempotent, and it re-attaches a Space that restarted. Needs a driver with relay_attach (a host is already registered).++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:relay_register_space`; mutating, idempotent |+| Requires (this machine) | `relay_account` |+| Swift SDK | `spaces.relay.register(_:)` |+| Rust | `Spaces::relay_register` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `space`, `relay_space` (`relay:<machine>`: how the account's other devices reach it), `machine`, `url` and `online`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`relay`](/spaces/reference#relay), [`unauthenticated`](/spaces/reference#unauthenticated)++### relay_unregister_space++Take a Space off the relay.++Takes the Space off the relay: its driver leaves and its machine is removed, with every share. A `relay:<machine>` id removes that machine's record from the relay directory, which only its owner may do: a Space that registered itself (also after it was deleted), or a machine that is no longer connected. A host that is connected now is taken off with `cua host remove` on that machine instead.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:relay_unregister_space`; mutating, idempotent |+| Requires (this machine) | `relay_account` |+| Swift SDK | `spaces.relay.unregister(_:)` |+| Rust | `Spaces::relay_unregister` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `space` | `string` | required | Space id or name. |++#### Result++JSON: `space` and `unregistered` (false when it was not on the relay).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`not_found`](/spaces/reference#not_found), [`ambiguous_sandbox`](/spaces/reference#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference#host_capability_missing), [`relay`](/spaces/reference#relay), [`unauthenticated`](/spaces/reference#unauthenticated), [`permission_denied`](/spaces/reference#permission_denied)++## Your cloud++Create Spaces in your own AWS, Google Cloud or Modal account: connect it, check it, and clean up what Cua created there.++| Tool | Description |+| --- | --- |+| [`cloud_status`](#cloud_status) | List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there. |+| [`cloud_connect`](#cloud_connect) | Connect a cloud account Spaces can be created in. |+| [`cloud_test`](#cloud_test) | Check a cloud account without creating anything. |+| [`cloud_disconnect`](#cloud_disconnect) | Forget a connected cloud account. |+| [`cloud_sweep`](#cloud_sweep) | Find and delete what Cua left in your clouds. |++### cloud_status++List your clouds (AWS, Google Cloud, Modal): found credentials, the connected account and region, what each can run at what hourly cost, and what Cua created there.++Sandboxes and Spaces can run in the user's own cloud account: on="aws" (EC2), "gcp" (Compute Engine) or "modal" (Modal Sandboxes). EC2 and Compute Engine start one small VM per sandbox that runs the image with Docker; Modal runs one Modal sandbox. Either way the guest's cua-spacesd dials out to the cua.ai relay as a machine of the signed-in account (no inbound port), and the Space is that machine, relay:<machine>. Each cloud uses its own CLI sign-in; connect it first with cloud_connect (the user decides; it costs money in their account). Everything Cua creates is tagged cua-managed=true with this cua home's cua-owner and an expiry, recorded under the cua home, deleted with its sandbox, and ends itself at its expiry; cloud_sweep removes leftovers.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:cloud_status`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.cloud.status(provider:)` |+| Rust | `cua_cloud::Clouds::status` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | `string` | none | Only this cloud (`aws`, `gcp`, `modal`). Default: every one. |++#### Result++JSON: `default_on`, `providers` (each `name`, `title`, `tier` (`vm`: a VM that provides Spaces, `sandbox`: one sandbox per Space), `connected`, `default`, `credentials` (`found`, `source`), `account`, `profile`, `region`, `zone`, `project`, `environment`, `label` ("AWS · us-west-2"), `ttl_hours` and `kinds` (each `image`, `kind`, `supported`, `reason`, `machine_type`, `usd_per_hour`)) and `resources` (what Cua created: `provider`, `id`, `type`, `space`, `region`, `state`, `created`, `expires`, `expired`).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### cloud_connect++Connect a cloud account Spaces can be created in.++Runs cloud_test first and connects only when every check passes. Stores the profile, region, project or environment names under the cua home (never a key: the cloud's own CLI sign-in stays where it is). With make_default, create_space without `on` creates there (`default.on`).++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:cloud_connect`; mutating, idempotent |+| Swift SDK | `spaces.cloud.connect(_:makeDefault:ttlHours:)` |+| Rust | `cua_cloud::Clouds::connect` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `environment` | `string` | none | Modal environment (default: the profile's). |+| `make_default` | `boolean` | `false` | Also make it the default location (`default.on`). Default false. |+| `profile` | `string` | none | AWS: the profile in `~/.aws/config` (default: `default`, or `AWS_PROFILE`). Modal: the profile in `~/.modal.toml` (default: the active one). |+| `project` | `string` | none | GCP project id (default: `gcloud config get project`). |+| `provider` | `string` | required | `aws`, `gcp` or `modal`. |+| `region` | `string` | none | AWS region (default: the profile's, else `us-west-2`) or GCP region (default `us-central1`). |+| `ttl_hours` | `integer` | `8` | Every Space created there deletes itself after this many hours (the instance or sandbox terminates, the sweeper removes what is left). Default 8; 0 keeps Spaces until you delete them (Modal caps a sandbox at 24). At least 0. |+| `zone` | `string` | none | GCP zone in the region (default: its `-a` zone). |++#### Result++JSON: the connected cloud as `cloud_status` lists it, plus `checks` (each `name`, `ok`, `detail`) from the test it ran first.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`cloud`](/spaces/reference#cloud)++### cloud_test++Check a cloud account without creating anything.++Creates nothing: it signs in with the cloud's own CLI credentials, asks the cloud to validate a create without doing it (AWS DryRun, Google Cloud permission checks), and reads quotas. A failed check says what to fix.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:cloud_test`, in `spaces:readonly`; read-only, idempotent |+| Swift SDK | `spaces.cloud.test(_:)` |+| Rust | `cua_cloud::Clouds::test` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `environment` | `string` | none | Modal environment (default: the profile's). |+| `profile` | `string` | none | AWS: the profile in `~/.aws/config` (default: `default`, or `AWS_PROFILE`). Modal: the profile in `~/.modal.toml` (default: the active one). |+| `project` | `string` | none | GCP project id (default: `gcloud config get project`). |+| `provider` | `string` | required | `aws`, `gcp` or `modal`. |+| `region` | `string` | none | AWS region (default: the profile's, else `us-west-2`) or GCP region (default `us-central1`). |+| `zone` | `string` | none | GCP zone in the region (default: its `-a` zone). |++#### Result++JSON: `provider`, `ok`, `account` (the account, project or workspace the credentials reach) and `checks` (each `name`, `ok`, `detail`: credentials, permissions by dry run, quota, the region and machine types).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`cloud`](/spaces/reference#cloud)++### cloud_disconnect++Forget a connected cloud account.++Forgets the connection (and `default.on` when it named this cloud). Nothing in the cloud is deleted.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:cloud_disconnect`; mutating, idempotent |+| Swift SDK | `spaces.cloud.disconnect(_:)` |+| Rust | `cua_cloud::Clouds::disconnect` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `provider` | `string` | required | `aws`, `gcp` or `modal`. |++#### Result++JSON: `provider`, `disconnected` and `left` (resources Cua still records there; delete their Spaces, or cloud_sweep with all=true, to remove them).++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument)++### cloud_sweep++Find and delete what Cua left in your clouds.++Acts only on resources that carry Cua's tags (cua-managed=true and this device's cua-owner) and that this cua home recorded, or that carry this device's owner id: never on anything else in the account. Default dry_run=true lists what it would delete: expired Spaces (past their ttl), resources whose Space is gone, and with all=true every Cua resource there.++| | |+| --- | --- |+| Providers | all (cloud, local, direct, relay) |+| Platforms | all (macos, windows, linux) |+| Metering | free |+| Approval | permission `spaces:cloud_sweep`; destructive |+| Swift SDK | `spaces.cloud.sweep(provider:dryRun:all:)` |+| Rust | `cua_cloud::Clouds::sweep` |++#### Parameters++| Parameter | Type | Default | Description |+| --- | --- | --- | --- |+| `all` | `boolean` | `false` | Also delete Cua resources that have not expired yet (every Space in that cloud). Default false: only expired ones, and resources no Space refers to any more. |+| `dry_run` | `boolean` | `true` | List what would be deleted without deleting it. Default true. |+| `provider` | `string` | none | Only this cloud. Default: every connected one. |++#### Result++JSON: `dry_run` and `resources`, each `provider`, `id`, `type`, `space`, `expires`, `action` (`delete`, `deleted`, `keep` or `failed`) and `reason`.++#### Errors++[`invalid_argument`](/spaces/reference#invalid_argument), [`cloud`](/spaces/reference#cloud)diff --git a/docs/content/docs/spaces/reference/streams-and-display.mdx b/docs/content/docs/spaces/reference/streams-and-display.mdxdeleted file mode 100644index 1d957a0d1f..0000000000--- a/docs/content/docs/spaces/reference/streams-and-display.mdx+++ /dev/null@@ -1,219 +0,0 @@-----title: "Streams and display"-description: "Stream a Space's desktop or windows, and show a Space to the operator."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`stream_endpoint`](#stream_endpoint) | Return a ticketed media endpoint for the Space's desktop or one window. |-| [`list_space_windows`](#list_space_windows) | List the windows open inside the Space. |-| [`stream_space_window`](#stream_space_window) | Draw one Space window on the operator's desktop. |-| [`show_space_pip`](#show_space_pip) | Pin the Space as picture-in-picture on the operator's desktop. |-| [`hide_space_pip`](#hide_space_pip) | Unpin the picture-in-picture window. |-| [`open_space_viewer`](#open_space_viewer) | Open the full Space viewer on the operator's desktop. |--## stream_endpoint--Return a ticketed media endpoint for the Space's desktop or one window.--Opens a media session (StreamService.OpenMedia) for the desktop or one window and returns its ticketed WebSocket URL (rcdp wire v2, see libs/cua/proto/MEDIA.md). The ticket is short-lived, bound to that one session, and safe to put in a URL; it is not the Space's token. Works for every provider because the token comes from the SDK, not from the guest.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:stream_endpoint`; mutating, idempotent |-| Requires (spacesd) | `desktop_stream` |-| Swift SDK | `Space.streamEndpoint(forceRefresh:)` |-| Rust | `Streams::open` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `app_name` | `string` | none | Stream the largest visible window of this app (case-insensitive substring). Ignored when `window_id` is set. |-| `display` | `string` | none | Display id for a desktop stream. Default: the primary display. |-| `max_fps` | `integer` | `30` | Maximum frames per second. Default 30. At least 0. |-| `space` | `string` | required | Space id or name. |-| `ticket_ttl` | `integer` | `60` | Ticket lifetime in seconds (at most 600). Default 60. At least 0. |-| `window_id` | `string` | none | Window handle from `list_space_windows`. Streams that window. |--### Result--JSON: `space`, `media_session_id`, `ws_url` (ticket included), `ticket`, `ticket_expires_at`, `codec` (`h264`, `bgra` or `png`), `wire_version`, `frame_size` and `needs_gateway_headers`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing), [`stream`](/spaces/reference/errors#stream)--### Notes--- Giving the caller frames is a different act from presenting the Space to an operator.-- Replaces local_rcdp, which only worked for Local macOS Spaces and read its token over ssh.--## list_space_windows--List the windows open inside the Space.--The windows a viewer can stream now, from StreamService.ListTargets: on screen, sized, normal app windows (no hidden, minimized or system-UI windows), each with its handle, title, app and bounds.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:list_space_windows`, in `spaces:readonly`; read-only, idempotent |-| Requires (spacesd) | `windows` |-| Swift SDK | `Space.windows()` |-| Rust | `Streams::windows` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `app_name` | `string` | none | Only windows of this app (case-insensitive substring). |-| `space` | `string` | required | Space id or name. |--### Result--JSON: an array of windows (`window_id`, `epoch`, `title`, `app_name`, `app_id`, `pid`, `bounds`, `on_screen`, `focused`, `available`, `limitation`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing)--## stream_space_window--Draw one Space window on the operator's desktop.--FOR THE HUMAN. Opens a bidirectional window on the operator's desktop showing one Space window (the Cua Spaces app draws it from a media ticket). Pass app_name to auto-pick that app's largest visible window, or an exact window_id.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | macos (the operator's machine) |-| Metering | free |-| Approval | permission `spaces:stream_space_window`; mutating, idempotent |-| Requires (spacesd) | `window_stream` |-| Requires (this machine) | `operator_display` |-| Swift SDK | `space.operatorDisplay.streamWindowToOperatorDesktop(_:)` |-| Rust | `OperatorDisplay::stream_window` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `app_name` | `string` | none | Auto-pick this app's largest visible window, e.g. "Firefox". |-| `space` | `string` | required | Space id or name. |-| `title` | `string` | none | Label for the operator's window. Default: the window title. |-| `window_id` | `string` | none | Exact window handle from `list_space_windows` (overrides `app_name`). |--### Result--Text: `Streaming <window> of <space> to your desktop (bidirectional).`--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`stream`](/spaces/reference/errors#stream)--### Notes--- Operator-side: the pixels land on the human's machine, so the platform axis is the operator's OS and not the Space's.--## show_space_pip--Pin the Space as picture-in-picture on the operator's desktop.--FOR THE HUMAN, NOT FOR YOU. Pins an always-on-top picture-in-picture overlay of the Space onto the user's own desktop. Call it only when the user asks to see a Space; never to observe your own work.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | macos (the operator's machine) |-| Metering | free |-| Approval | permission `spaces:show_space_pip`; mutating, idempotent |-| Requires (spacesd) | `desktop_stream` |-| Requires (this machine) | `operator_display` |-| Swift SDK | `space.operatorDisplay.pinPictureInPictureOnOperatorDesktop()` |-| Rust | `OperatorDisplay::pin_pip` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--Text: `Pinned <space> as picture-in-picture on your desktop.`--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing)--## hide_space_pip--Unpin the picture-in-picture window.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | macos (the operator's machine) |-| Metering | free |-| Approval | permission `spaces:hide_space_pip`; mutating, idempotent |-| Requires (this machine) | `operator_display` |-| Swift SDK | `space.operatorDisplay.unpinPictureInPictureFromOperatorDesktop()` |-| Rust | `OperatorDisplay::unpin_pip` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--Text: `Unpinned <space> from your desktop.`--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing)--## open_space_viewer--Open the full Space viewer on the operator's desktop.--FOR THE HUMAN, NOT FOR YOU. Opens a live viewer window on the user's own desktop. Never call it to obtain a screenshot or to check on your own work; use the screenshot tool for that.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | macos (the operator's machine) |-| Metering | free |-| Approval | permission `spaces:open_space_viewer`; mutating, idempotent |-| Requires (spacesd) | `desktop_stream` |-| Requires (this machine) | `operator_display` |-| Swift SDK | `space.operatorDisplay.openViewerOnOperatorDesktop()` |-| Rust | `OperatorDisplay::open_viewer` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `space` | `string` | required | Space id or name. |--### Result--Text: `Opened the <space> viewer on your desktop.`--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing)diff --git a/docs/content/docs/spaces/reference/teleport.mdx b/docs/content/docs/spaces/reference/teleport.mdxdeleted file mode 100644index 73ad68bc5f..0000000000--- a/docs/content/docs/spaces/reference/teleport.mdx+++ /dev/null@@ -1,93 +0,0 @@-----title: "Session teleport"-description: "Move a signed-in app session from this machine into a Space."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`teleport_manifest`](#teleport_manifest) | Describe what a session teleport would move. |-| [`teleport_app`](#teleport_app) | Move an app session into the Space. |--## teleport_manifest--Describe what a session teleport would move.--Read on this machine from the app's own provider: items, sizes, which are sensitive and which are checked by default. With `space`, also reports whether the Space can import the app.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:teleport_manifest`, in `spaces:readonly`; read-only, idempotent |-| Requires (this machine) | `app_sessions` |-| Swift SDK | `space.sessions.manifest(for:scope:)` |-| Rust | `Teleport::manifest` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `app` | `string` | required | App id, e.g. `firefox`, `chrome`, `claude-code`. |-| `scope` | `string` | `full` | `full` (the profile) or `tabs`. Default `full`. |-| `space` | `string` | none | Space to check the receiving side of (`GetManifest`). Optional. |--### Result--JSON: `app`, `display_name`, `scope`, `items` (each `relative_path`, `label`, `estimated_bytes`, `is_sensitive`, `is_checked_by_default`), `total_estimated_bytes`, `notes`; with `space`, a `receiver` (`supported`, `limitation`, `app_installed`, `supported_apps`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing)--### Notes--- The manifest is the thing an Approval is minted from: the SDK will not send a teleport the caller has not seen a manifest for.--## teleport_app--Move an app session into the Space.--Moves the app's signed-in session into the Space, but only through the Cua Keyvault and only with the user's consent. This tool never delivers on its own: the first call files a Keyvault access request and returns a request_id; the user approves it in Cua (Touch ID or the login password) or an unattended rule matches; a later call with the same request_id has the Keyvault broker perform the delivery over the daemon's authenticated channel. Without `include` the manifest's default-checked items move, never everything.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:teleport_app`; destructive |-| Requires (spacesd) | `teleport.*` |-| Requires (this machine) | `app_sessions` |-| Swift SDK | `space.sessions.send(_ approval:)` |-| Rust | `Teleport::send` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `acknowledge_sensitive` | `boolean` | none | Must be true when the selection holds a sensitive item (credentials, cookies). The consent is explicit rather than defaulted. |-| `app` | `string` | required | App id, e.g. `firefox`, `chrome`, `claude-code`. |-| `include` | `string[]` | none | Manifest `rel_path`s to send. Default: the manifest's default-checked items, never everything. An empty list is refused as ambiguous. |-| `request_id` | `string` | none | The Keyvault request id returned by a previous call. Present on a retry after the user approved the teleport in Cua; the broker then performs the delivery. Absent on the first call. |-| `scope` | `string` | `full` | `full` or `tabs`. Default `full`. |-| `space` | `string` | required | Space id or name. |--### Result--JSON. First call: `consent_required: true`, a `request_id`, `would_send` and `approve`. Retry with `request_id` once the user approved: `moved: true` with `transferred_paths` (what the Space imported), `import_ids` and `expires_ms`; or still `consent_required` while pending; or an `error` with the Keyvault code (`requires_cua_app`, `denied`, `disabled`) when it cannot proceed.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_found`](/spaces/reference/errors#not_found), [`ambiguous_sandbox`](/spaces/reference/errors#ambiguous_sandbox), [`spacesd_not_available`](/spaces/reference/errors#spacesd_not_available), [`capability_missing`](/spaces/reference/errors#capability_missing), [`host_capability_missing`](/spaces/reference/errors#host_capability_missing), [`teleport_refused`](/spaces/reference/errors#teleport_refused), [`transfer_failed`](/spaces/reference/errors#transfer_failed)--### Notes--- Works on every provider. A comment in the SDK claiming teleport was cloud-only was stale and was a real bug: callers were being told to provision a metered Space for work a free Local Space does.-- Consent is owned by the Keyvault broker, not this tool: the automation caller is treated as an unverified third party, so a delivery needs a live consent or an audited unattended rule and can never be self-approved (red-team E2).diff --git a/docs/content/docs/spaces/reference/volume.mdx b/docs/content/docs/spaces/reference/volume.mdxdeleted file mode 100644index 7a0045c536..0000000000--- a/docs/content/docs/spaces/reference/volume.mdx+++ /dev/null@@ -1,776 +0,0 @@-----title: "Cua Volume"-description: "Read and write the volume every Space and agent shares, decide who may reach what, and see where it is stored and how it syncs."------{/*- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY- Generated by: pnpm --dir docs docs:generate:spaces- Source: libs/cua/spaces-contract/manifest.json- Version: 0.7.0-*/}--| Tool | Description |-| --- | --- |-| [`volume_ls`](#volume_ls) | List a folder of the Cua Volume. |-| [`volume_read`](#volume_read) | Read a file from the Cua Volume. |-| [`volume_write`](#volume_write) | Write a file to the Cua Volume. |-| [`volume_delete`](#volume_delete) | Delete a file from the Cua Volume. |-| [`volume_history`](#volume_history) | List a Cua Volume file's versions. |-| [`volume_restore`](#volume_restore) | Restore an old version of a Cua Volume file. |-| [`volume_grant`](#volume_grant) | Grant an agent or Space more Cua Volume access. |-| [`volume_revoke`](#volume_revoke) | Revoke a Cua Volume grant. |-| [`volume_grants`](#volume_grants) | List Cua Volume grants. |-| [`volume_request_access`](#volume_request_access) | Ask the user for more Cua Volume access. |-| [`volume_requests`](#volume_requests) | List Cua Volume access requests waiting for the user. |-| [`volume_approve`](#volume_approve) | Approve a Cua Volume access request. |-| [`volume_deny`](#volume_deny) | Decline a Cua Volume access request. |-| [`volume_audit`](#volume_audit) | Read the Cua Volume audit log. |-| [`volume_storage`](#volume_storage) | Show where the Cua Volume keeps its bytes. |-| [`volume_storage_set`](#volume_storage_set) | Test or change where the Cua Volume keeps its bytes. |-| [`volume_mount_status`](#volume_mount_status) | Show whether the Cua Volume is mounted as a volume. |-| [`volume_mount`](#volume_mount) | Mount the Cua Volume as a volume. |-| [`volume_unmount`](#volume_unmount) | Unmount the Cua Volume volume. |-| [`volume_sync_status`](#volume_sync_status) | Show the Cua Volume's sync state across devices. |-| [`volume_sync_events`](#volume_sync_events) | Wait for Cua Volume sync events. |-| [`volume_sync_resolve`](#volume_sync_resolve) | Mark a Cua Volume sync conflict as seen. |-| [`volume_cache_stats`](#volume_cache_stats) | Show the Cua Volume block cache. |-| [`volume_cache_set`](#volume_cache_set) | Set the Cua Volume block cache's size cap. |-| [`volume_cache_clear`](#volume_cache_clear) | Clear the Cua Volume block cache. |--## volume_ls--List a folder of the Cua Volume.--Cua Volume is one versioned drive per account, shared by every Space and agent: public/ (shared reference, read by everyone), agents/<agent>/ (a persistent agent's home: memory, outputs, inbox) and spaces/<space>/ (per-Space scratch). As the user (the default) you see everything. With as_agent (and in_space) you see exactly what that agent sees: it reads public/, writes its own home and its Space's folder, and anything wider needs a grant the user approves.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_ls`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeLs(path:asAgent:inSpace:)` |-| Rust | `cua_volume::Session::ls` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | See the drive as this persistent agent does (`ada`). Only narrows: the agent's defaults and grants apply. Default: the user (the whole drive). |-| `in_space` | `string` | none | With `as_agent`: the Space id the agent is in, whose `spaces/<space>/` folder it may write. |-| `path` | `string` | none | Folder, for example `agents/ada/` or `public/`. Default: the root. |--### Result--JSON: `path`, `principal` and `entries` (each `path`, `name`, `folder`, `size`, `modified_ms`, `etag`, `mode`, and `sync` when a file has something to say: `state` `pending_upload`, `conflict` (with `conflict_path`) or `conflict_copy`, and `written_by` when another device wrote it last).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_read--Read a file from the Cua Volume.--Reads at most 8 MiB. Text comes back as utf8, anything else as base64.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_read`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeRead(path:version:asAgent:inSpace:)` |-| Rust | `cua_volume::Session::read` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | See `volume_ls`. |-| `in_space` | `string` | none | See `volume_ls`. |-| `path` | `string` | required | File path, for example `agents/ada/memory/MEMORY.md`. |-| `version` | `string` | none | A version id from `volume_history`. Default: the current version. |--### Result--JSON: `path`, `size`, `etag`, `version`, `modified_ms`, `encoding` (`utf8` or `base64`), `content`, and `sync` while the drive's services run (`state` `synced`, `pending_upload`, `conflict` or `conflict_copy`; `written_by`, `conflict_path`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_write--Write a file to the Cua Volume.--Every write is a new version (history is kept). if_etag makes it a compare-and-swap, create_only makes it create-only. Writes under agents/ are scanned for secrets and refused by kind and line; keep credentials in the Keyvault.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_write`; destructive |-| Swift SDK | `spaces.volumeWrite(path:content:encoding:ifEtag:createOnly:asAgent:inSpace:)` |-| Rust | `cua_volume::Session::write` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | See `volume_ls`. |-| `content` | `string` | required | The content, as text or base64 (see `encoding`). At most 8 MiB. |-| `create_only` | `boolean` | `false` | Write only if nothing is at `path` yet. Default false. |-| `encoding` | `string` | `utf8` | `utf8` or `base64`. Default `utf8`. |-| `if_etag` | `string` | none | Write only if the current version has this etag (from `volume_read` or `volume_ls`): a compare-and-swap. |-| `in_space` | `string` | none | See `volume_ls`. |-| `path` | `string` | required | File path. |--### Result--JSON: the new version's `key`, `size`, `etag`, `version` and `modified_ms`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`precondition_failed`](/spaces/reference/errors#precondition_failed), [`secret_detected`](/spaces/reference/errors#secret_detected), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_delete--Delete a file from the Cua Volume.--Adds a delete marker; volume_history and volume_restore still reach the old versions.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_delete`; destructive |-| Swift SDK | `spaces.volumeDelete(path:ifEtag:asAgent:inSpace:)` |-| Rust | `cua_volume::Session::delete` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | See `volume_ls`. |-| `if_etag` | `string` | none | Delete only if the current version has this etag. |-| `in_space` | `string` | none | See `volume_ls`. |-| `path` | `string` | required | File path. |--### Result--JSON: `{"deleted": <path>}`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`precondition_failed`](/spaces/reference/errors#precondition_failed), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_history--List a Cua Volume file's versions.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_history`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeHistory(path:asAgent:inSpace:)` |-| Rust | `cua_volume::Session::history` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | See `volume_ls`. |-| `in_space` | `string` | none | See `volume_ls`. |-| `path` | `string` | required | File path. |--### Result--JSON: `path` and `versions` (each `version`, `size`, `modified_ms`, `deleted`, `latest`), newest first.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_restore--Restore an old version of a Cua Volume file.--Writes the old version's content as a new version, so the restore itself can be undone.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_restore`; destructive |-| Swift SDK | `spaces.volumeRestore(path:version:asAgent:inSpace:)` |-| Rust | `cua_volume::Session::restore` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | See `volume_ls`. |-| `in_space` | `string` | none | See `volume_ls`. |-| `path` | `string` | required | File path. |-| `version` | `string` | required | The version id to restore (from `volume_history`). |--### Result--JSON: the new current version's `key`, `size`, `etag`, `version` and `modified_ms`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`secret_detected`](/spaces/reference/errors#secret_detected), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_grant--Grant an agent or Space more Cua Volume access.--Only for the user: widens an agent's or a Space's access past the defaults (an agent reads public/ and writes its own home and its Space's folder). The user confirms with presence (Touch ID, the login password or the vault passphrase) before anything widens; a grant that widens nothing is refused.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_grant`; destructive |-| Swift SDK | `spaces.volumeGrant(principal:prefix:mode:expiresInSecs:note:)` |-| Rust | `cua_volume::Drive::grant` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `expires_in_secs` | `integer` | none | Lifetime in seconds. Default: until revoked. At least 0. |-| `mode` | `string` | required | `r` (read) or `rw` (read and write). |-| `note` | `string` | none | A note shown next to the grant. |-| `prefix` | `string` | required | A folder (`agents/writer/outputs/`) or one file. |-| `principal` | `string` | required | `agent:<name>` or `space:<id>`. |--### Result--JSON: the grant (`id`, `principal`, `prefix`, `mode`, `created_ms`, `expires_ms`, `revoked`, `note`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_confirmed`](/spaces/reference/errors#not_confirmed), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_revoke--Revoke a Cua Volume grant.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_revoke`; mutating, idempotent |-| Swift SDK | `spaces.volumeRevoke(grantId:)` |-| Rust | `cua_volume::Drive::revoke` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `grant_id` | `string` | required | The grant id (from `volume_grants`). |--### Result--JSON: the revoked grant.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_grants--List Cua Volume grants.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_grants`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeGrants(all:)` |-| Rust | `cua_volume::Drive::grants` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `all` | `boolean` | `false` | Include expired and revoked grants. Default false. |--### Result--JSON: `{"grants": [...]}`, live grants only unless `all`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_request_access--Ask the user for more Cua Volume access.--Files a request the user sees in Cua; it grants nothing by itself. Poll volume_ls or volume_read to see when access arrives.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_request_access`; destructive |-| Swift SDK | `spaces.volumeRequestAccess(prefix:mode:reason:asAgent:inSpace:)` |-| Rust | `cua_volume::Drive::request_access` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `as_agent` | `string` | none | The agent asking. |-| `in_space` | `string` | none | See `volume_ls`. |-| `mode` | `string` | required | `r` or `rw`. |-| `prefix` | `string` | required | The folder or file wanted. |-| `reason` | `string` | none | Why (shown to the user as the agent's words). |--### Result--JSON: the request (`id`, `principal`, `prefix`, `mode`, `reason`, `created_ms`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_requests--List Cua Volume access requests waiting for the user.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_requests`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeRequests()` |-| Rust | `cua_volume::Drive::requests` |--### Parameters--No parameters.--### Result--JSON: `{"requests": [...]}`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_approve--Approve a Cua Volume access request.--Only for the user, with presence.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_approve`; destructive |-| Swift SDK | `spaces.volumeApprove(requestId:expiresInSecs:)` |-| Rust | `cua_volume::Drive::approve` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `expires_in_secs` | `integer` | none | Lifetime in seconds. Default: until revoked. At least 0. |-| `request_id` | `string` | required | The request id (from `volume_requests`). |--### Result--JSON: the grant the request became.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`not_confirmed`](/spaces/reference/errors#not_confirmed), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_deny--Decline a Cua Volume access request.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_deny`; destructive |-| Swift SDK | `spaces.volumeDeny(requestId:)` |-| Rust | `cua_volume::Drive::deny` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `request_id` | `string` | required | The request id. |--### Result--JSON: `{"denied": <request id>}`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_audit--Read the Cua Volume audit log.--Every grant, revocation, request, refusal, blocked secret, sync, lease and agent access, from a hash-chained log; an edited or truncated log reports verified=false.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_audit`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeAudit(limit:)` |-| Rust | `cua_volume::audit::AuditLog::tail` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `limit` | `integer` | `50` | How many. Default 50, at most 1000. At least 0. |--### Result--JSON: `events` (each `seq`, `ts_ms`, `principal`, `action`, `path`, `detail`), newest first, and `verified` (with `error` when the hash chain does not verify).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_storage--Show where the Cua Volume keeps its bytes.--Only for the user. Keys are never returned; `has_keys` says whether the credential store holds them.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_storage`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeStorage()` |-| Rust | `cua_volume::service::DriveService::storage` |--### Parameters--No parameters.--### Result--JSON: `backend` (`fs` or `s3`), `fs_path`, `s3` (`endpoint`, `region`, `bucket`, `root`, `path_style`), `has_keys`, `cloud_available`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_storage_set--Test or change where the Cua Volume keeps its bytes.--Only for the user. Tests the storage first (bucket versioning, list, then write, read back and delete a probe object; retries path-style addressing to tell when a self-hosted store needs it); with dry_run nothing else happens. Otherwise, when the test passes, saves the setting and the keys (credential store) and switches the running drive to it without a restart. The bucket must have versioning on. cloud is refused.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_storage_set`; mutating, idempotent |-| Swift SDK | `spaces.volumeStorageSet(update:)` |-| Rust | `cua_volume::service::DriveService::set_storage` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `access_key_id` | `string` | none | The access key id (with the secret; both or neither). Saved in the credential store, never in a file. |-| `backend` | `string` | required | `fs` (this machine) or `s3` (an S3-compatible bucket: AWS S3, R2, MinIO). `cloud` is refused. |-| `dry_run` | `boolean` | `false` | Only test the connection; change nothing. Default false. |-| `s3` | `object` | none | The bucket, for `s3`. |-| `s3.bucket` | `string` | required | |-| `s3.endpoint` | `string` | `null` | `http://127.0.0.1:9000`, `https://<account>.r2.cloudflarestorage.com`; absent for AWS. |-| `s3.path_style` | `boolean` | `null` | Path-style addressing (MinIO and most self-hosted stores). |-| `s3.region` | `string` | `null` | `us-east-1`; `auto` for R2. Default `us-east-1`. |-| `s3.root` | `string` | `null` | A key prefix inside the bucket. Default none. |-| `secret_access_key` | `string` | none | The secret access key. |--### Result--JSON: `ok`, `reachable`, `authorized`, `versioning`, `detail` (a sentence when not ok saying how to fix it), `problem` (`unreachable`, `bad_keys`, `forbidden`, `bucket_missing`, `versioning_off`, `path_style_needed`) and `applied` (saved and switched live).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_mount_status--Show whether the Cua Volume is mounted as a volume.--Only for the user. The drive can appear as a volume (Finder on macOS, a FUSE mount on Linux); it is off until the user turns it on with volume_mount.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_mount_status`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeMountStatus()` |-| Rust | `cua_volume::service::DriveService::mount_status` |--### Parameters--No parameters.--### Result--JSON: `enabled`, `state` (`off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`), `method` (`nfs`, `fuse`, `fskit`, `none`), `path`, `volume_name`, `detail`, `settings_url`; plus the Spaces' own: `volumes` (mounted in a Space: `space`, `mount_path`, `backend`, `principal`) and `volume_errors` (each `space` and `error`: why a Space has no Cua Volume, for example no /dev/fuse in a container on runc).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_mount--Mount the Cua Volume as a volume.--Only for the user. Turns the mount on (kept across restarts) and mounts. Idempotent.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_mount`; mutating, idempotent |-| Swift SDK | `spaces.volumeMount()` |-| Rust | `cua_volume::service::DriveService::mount` |--### Parameters--No parameters.--### Result--JSON: the mount status after the attempt (see volume_mount_status).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_unmount--Unmount the Cua Volume volume.--Only for the user. Turns the mount off; files still uploading land first.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_unmount`; mutating, idempotent |-| Swift SDK | `spaces.volumeUnmount()` |-| Rust | `cua_volume::service::DriveService::unmount` |--### Parameters--No parameters.--### Result--JSON: the mount status after unmounting.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`volume_backend`](/spaces/reference/errors#volume_backend)--## volume_sync_status--Show the Cua Volume's sync state across devices.--Devices sharing one bucket learn each other's changes through a change log in the bucket itself. A write that lost to a later one is never dropped: it stays in the file's history and as the visible conflict copy. A persistent agent may call it too (through its bridge): it sees the pending uploads and conflicts of files it can read and its own Space's volume. In a Space it reports this machine's view.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_sync_status`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeSyncStatus()` |-| Rust | `cua_volume::service::DriveService::sync_status` |--### Parameters--No parameters.--### Result--JSON: `device_id`, `device_name`, `feed` (`live`, `off` for a store on this machine, `offline` when the bucket stops answering, with `last_error`), `poll_interval_ms`, `last_poll_ms`, `last_remote_change_ms`, `pending_uploads`, `pending_bytes`, `conflicts` (each `path`, `conflict_path`, `winner_device`, `loser_device`, `winner_version`, `loser_version`, `ts_ms`), `devices` (each `id`, `name`, `this_device`, `last_seen_ms`, `last_change_ms`, `changes`), `last_error`, `pending` (each `path`, `bytes`: files still uploading), `backend` (`fs` or `s3`), `mount` (this machine's mount: `off`, `mounting`, `mounted`, `needs_approval`, `unsupported`, `error`), `cache` (a bucket's block cache, when there is one) and `volumes` (the volume mounted in Spaces: each `space`, `mount_path`, `backend`, `principal`).--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_sync_events--Wait for Cua Volume sync events.--Only for the user. A long poll: answers at once when events newer than since_seq exist, else waits up to wait_ms for one. Kinds: remote_change, remote_delete, upload_started, upload_done, upload_failed, conflict, error.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_sync_events`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeSyncEvents(sinceSeq:waitMs:)` |-| Rust | `cua_volume::service::DriveService::sync_events` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `since_seq` | `integer` | none | Return events after this `seq` (default 0: all kept). At least 0. |-| `wait_ms` | `integer` | none | Wait up to this long for one when none is newer (default 0, at most 30000). At least 0. |--### Result--JSON: `events` (each `seq`, `ts_ms`, `kind`, `path`, `device`, `size`, `version`, `detail`) and `next_seq`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_sync_resolve--Mark a Cua Volume sync conflict as seen.--Only for the user. Clears the conflict from the list; both files stay.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_sync_resolve`; mutating, idempotent |-| Swift SDK | `spaces.volumeSyncResolve(path:)` |-| Rust | `cua_volume::service::DriveService::sync_resolve` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `path` | `string` | required | The file (or its conflict copy). |--### Result--JSON: `{"resolved": <path>}`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden), [`not_found`](/spaces/reference/errors#not_found)--## volume_cache_stats--Show the Cua Volume block cache.--Only for the user. Reads of a remote store go through a local block cache; counters are since the runtime started.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_cache_stats`, in `spaces:readonly`; read-only, idempotent |-| Swift SDK | `spaces.volumeCacheStats()` |-| Rust | `cua_volume::service::DriveService::cache_stats` |--### Parameters--No parameters.--### Result--JSON: `dir`, `size_bytes`, `capacity_bytes`, `block_bytes`, `blocks`, `hits`, `misses`, `hit_rate`, `prefetched_bytes`, `evictions`.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_cache_set--Set the Cua Volume block cache's size cap.--Only for the user. Evicts down to the new cap at once; kept across restarts.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_cache_set`; mutating, idempotent |-| Swift SDK | `spaces.volumeCacheSet(capacityBytes:)` |-| Rust | `cua_volume::service::DriveService::cache_set` |--### Parameters--| Parameter | Type | Default | Description |-| --- | --- | --- | --- |-| `capacity_bytes` | `integer` | required | Bytes (at least 268435456, 256 MiB). At least 0. |--### Result--JSON: the cache stats after the change.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)--## volume_cache_clear--Clear the Cua Volume block cache.--Only for the user. Drops every cached block; files stay in the drive.--| | |-| --- | --- |-| Providers | all (cloud, local, direct, relay) |-| Platforms | all (macos, windows, linux) |-| Metering | free |-| Approval | permission `spaces:volume_cache_clear`; mutating, idempotent |-| Swift SDK | `spaces.volumeCacheClear()` |-| Rust | `cua_volume::service::DriveService::cache_clear` |--### Parameters--No parameters.--### Result--JSON: the cache stats after clearing.--### Errors--[`invalid_argument`](/spaces/reference/errors#invalid_argument), [`forbidden`](/spaces/reference/errors#forbidden)diff --git a/scripts/docs-generators/config.json b/scripts/docs-generators/config.jsonindex 4080e9659d..3385b9f153 100644--- a/scripts/docs-generators/config.json+++ b/scripts/docs-generators/config.json@@ -276,17 +276,7 @@},{"type": "api",- "outputFile": "sandbox/index.mdx",- "extractCommand": null- },- {- "type": "api",- "outputFile": "sandbox/lifecycle.mdx",- "extractCommand": null- },- {- "type": "api",- "outputFile": "sandbox/options.mdx",+ "outputFile": "sandbox.mdx","extractCommand": null},{@@ -304,11 +294,6 @@"outputFile": "spacesd/index.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "spacesd/shell.mdx",- "extractCommand": null- },{"type": "api","outputFile": "spacesd/files.mdx",@@ -319,11 +304,6 @@"outputFile": "spacesd/computer.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "spacesd/media.mdx",- "extractCommand": null- },{"type": "api","outputFile": "fleet/index.mdx",@@ -339,11 +319,6 @@"outputFile": "fleet/images.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "local.mdx",- "extractCommand": null- },{"type": "api","outputFile": "spaces/index.mdx",@@ -359,21 +334,6 @@"outputFile": "spaces/streams.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "spaces/agents.mdx",- "extractCommand": null- },- {- "type": "api",- "outputFile": "spaces/teleport.mdx",- "extractCommand": null- },- {- "type": "api",- "outputFile": "spaces/teleport-host.mdx",- "extractCommand": null- },{"type": "api","outputFile": "spaces/host.mdx",@@ -384,11 +344,6 @@"outputFile": "auth.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "agent-setup.mdx",- "extractCommand": null- },{"type": "api","outputFile": "errors.mdx",@@ -406,7 +361,7 @@}],"enabled": true,- "notes": "One page per object (PAGES in cua-sdk.ts) with Python/TypeScript/Swift/Kotlin/Rust signature tabs, plus the reference index, Errors, Types and the reference meta.json. Curated prose: headers/cua-sdk/<page>.md. Examples: examples/cua-sdk/<Target>.<ext>, each tagged with its docs lane and run from the page by the docs-blocks suite. Names are cross-checked against the committed bindings (with uniffi.toml renames) and the Rust source. The `spaces` pages (host teleport, app teleport, the Spaces app core) document the Cua Spaces app export (the `cua_spaces_ffi` namespace of libcua_spaces_ffi, source-available, FSL-1.1-MIT) with Swift and Rust tabs only, cross-checked against libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift and the cua-spaces-ffi source."+ "notes": "One page per module family (PAGES in cua-sdk.ts; MERGED folds a section into another page) with Python/TypeScript/Swift/Kotlin/Rust signature tabs, plus the reference index, Errors, Types and the reference meta.json. Curated prose: headers/cua-sdk/<page>.md. Examples: examples/cua-sdk/<Target>.<ext>, each tagged with its docs lane and run from the page by the docs-blocks suite. Names are cross-checked against the committed bindings (with uniffi.toml renames) and the Rust source. The Cua Spaces app export (`cua_spaces_ffi`, the apps' internals) has no pages."},"cua-sdk-python": {"name": "Python hand-written layers (cua, cua-sandbox)",@@ -439,36 +394,16 @@"outputFile": "cua-sdk/reference/python/sandbox.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "cua-sdk/reference/python/image.mdx",- "extractCommand": null- },- {- "type": "api",- "outputFile": "cua-sdk/reference/python/pool.mdx",- "extractCommand": null- },{"type": "api","outputFile": "cua-sdk/reference/python/interfaces.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "cua-sdk/reference/python/services.mdx",- "extractCommand": null- },{"type": "api","outputFile": "cua-sdk/reference/python/runtimes.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "cua-sdk/reference/python/configuration.mdx",- "extractCommand": null- },{"type": "nav","outputFile": "cua-sdk/reference/python/meta.json",@@ -508,16 +443,6 @@"outputFile": "spaces.mdx","extractCommand": null},- {- "type": "api",- "outputFile": "spaces-transport.mdx",- "extractCommand": null- },- {- "type": "api",- "outputFile": "spaces-host.mdx",- "extractCommand": null- },{"type": "nav","outputFile": "meta.json",@@ -525,7 +450,7 @@}],"enabled": true,- "notes": "typedoc + typedoc-plugin-markdown (pinned in docs/package.json) over src/index.ts, spaces/index.ts, spaces/transport/index.ts and spaces/host.ts; declarations from src/native (UniFFI glue) are dropped. Needs `npm ci --ignore-scripts` in libs/cua/typescript first."+ "notes": "typedoc + typedoc-plugin-markdown (pinned in docs/package.json) over src/index.ts, spaces/index.ts, spaces/transport/index.ts and spaces/host.ts; declarations from src/native (UniFFI glue) are dropped. The transport and host modules are sections of the index page (TS_MERGED). Needs `npm ci --ignore-scripts` in libs/cua/typescript first."},"cua-rust": {"name": "Rust crates (rustdoc JSON)",@@ -593,31 +518,6 @@"outputFile": "cua-spacesd-client.mdx","extractCommand": null},- {- "type": "reference",- "outputFile": "cua-fleet.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "cua-sandbox-core.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "cua-spaces.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "cua-spaces-client.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "cua-spaces-agents-mcp.mdx",- "extractCommand": null- },{"type": "nav","outputFile": "meta.json",@@ -625,7 +525,7 @@}],"enabled": true,- "notes": "Builds rustdoc JSON for the public crates with the nightly pinned in scripts/docs-generators/rustdoc-json/rust-toolchain.toml, then renders one page per crate (cua-spaces: three) and the Rust crates index (headers/cua-sdk/rust/index.md). The cua-sdk items the bindings export link to the Cua SDK object pages (read at generation time), whose Rust tabs document them."+ "notes": "Builds rustdoc JSON for the stable crates (cua-sdk, cua-spacesd-client) with the nightly pinned in scripts/docs-generators/rustdoc-json/rust-toolchain.toml, then renders one page per crate and the Rust crates index (headers/cua-sdk/rust/index.md). The cua-sdk items the bindings export link to the Cua SDK object pages (read at generation time), whose Rust tabs document them."},"cua-proto": {"name": "cua gRPC contracts (spacesd and daemon)",@@ -655,31 +555,16 @@"outputFile": "env-system.mdx","extractCommand": null},- {- "type": "reference",- "outputFile": "env-common.mdx",- "extractCommand": null- },{"type": "reference","outputFile": "env-process.mdx","extractCommand": null},- {- "type": "reference",- "outputFile": "env-filesystem.mdx",- "extractCommand": null- },{"type": "reference","outputFile": "env-computer.mdx","extractCommand": null},- {- "type": "reference",- "outputFile": "env-windows.mdx",- "extractCommand": null- },{"type": "reference","outputFile": "env-stream.mdx",@@ -687,22 +572,7 @@},{"type": "reference",- "outputFile": "env-teleport-tunnel.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "daemon-sandboxes.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "daemon-runtimes.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "daemon-spaces.mdx",+ "outputFile": "daemon.mdx","extractCommand": null},{@@ -737,26 +607,6 @@"outputFile": "index.mdx","extractCommand": null},- {- "type": "reference",- "outputFile": "lifecycle.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "commands-and-files.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "streams-and-display.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "services.mdx",- "extractCommand": null- },{"type": "reference","outputFile": "agents.mdx",@@ -764,17 +614,7 @@},{"type": "reference",- "outputFile": "teleport.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "hotspot.mdx",- "extractCommand": null- },- {- "type": "reference",- "outputFile": "errors.mdx",+ "outputFile": "spaces.mdx","extractCommand": null},{@@ -784,7 +624,7 @@}],"enabled": true,- "notes": "Renders the Spaces contract (libs/cua/spaces-contract/manifest.json, generated by cua-spaces-contract-gen and --check gated): one page per category with each tool's parameters, result, errors and approval, plus an errors page. The tool-error envelope and JSON-RPC codes are read from cua-spaces src/mcp/mod.rs and the permission rule from cua-cli src/mcp.rs; a change to either fails the generator. This is the canonical Spaces tool reference; the cua-cli MCP page covers the sandbox, computer and skills tools."+ "notes": "Renders the Spaces contract (libs/cua/spaces-contract/manifest.json, generated by cua-spaces-contract-gen and --check gated): the index (with Space ids, approval and errors) and two tool pages grouping the categories (PAGES in spaces.ts), with each tool's parameters, result, errors and approval. The tool-error envelope and JSON-RPC codes are read from cua-spaces src/mcp/mod.rs and the permission rule from cua-cli src/mcp.rs; a change to either fails the generator. This is the canonical Spaces tool reference; the cua-cli MCP page covers the sandbox, computer and skills tools."}}}diff --git a/scripts/docs-generators/cua-cli.test.ts b/scripts/docs-generators/cua-cli.test.tsindex 201f187f60..7c5f18cf34 100644--- a/scripts/docs-generators/cua-cli.test.ts+++ b/scripts/docs-generators/cua-cli.test.ts@@ -72,10 +72,10 @@ test('Spaces tools link to their one entry in the Spaces reference instead of reconst page = (rel: string) => [...files].find(([p]) => p.endsWith(join('reference', ...rel.split('/'))))?.[1];// Every tool is on one page; the Spaces tools are tables linking to their entries.const tools = page('mcp-tools.mdx')!;- assert.ok(tools.includes('| <span id="add_space"></span>[`add_space`](/spaces/reference/lifecycle#add_space) | Register a Space. |'));- assert.ok(tools.includes('[`space_bash`](/spaces/reference/commands-and-files#space_bash)'));+ assert.ok(tools.includes('| <span id="add_space"></span>[`add_space`](/spaces/reference/spaces#add_space) | Register a Space. |'));+ assert.ok(tools.includes('[`space_bash`](/spaces/reference/spaces#space_bash)'));assert.ok(tools.includes('[`agent_start`](/spaces/reference/agents#agent_start)'));- assert.ok(tools.includes('### Space lifecycle\n\nFull entries: [Space lifecycle](/spaces/reference/lifecycle).'));+ assert.ok(tools.includes('### Space lifecycle\n\nFull entries: [Space lifecycle](/spaces/reference/spaces#space-lifecycle).'));assert.ok(!tools.includes('### `add_space`'), 'no repeated Spaces entries');assert.ok(tools.includes('## Permissions') && tools.includes('`sandbox:all`'));assert.ok(tools.includes('### `sandbox_list`'));diff --git a/scripts/docs-generators/cua-cli.ts b/scripts/docs-generators/cua-cli.tsindex 5ade3f7f1a..ae05a5e86e 100644--- a/scripts/docs-generators/cua-cli.ts+++ b/scripts/docs-generators/cua-cli.ts@@ -31,6 +31,7 @@ import {renderReferenceIndex,} from './lib/cli-mdx';import { readHeader } from './lib/headers';+import { pageOfCategory, slugify, toolHref } from './spaces';import {type JsonSchema,type McpCategory,@@ -160,11 +161,16 @@ export function spacesAnchors(manifest: {categories?: Array<{ id: string; title: string }>;tools: Array<{ name: string; category: string }>;}): SpacesLinks {- const titles = new Map((manifest.categories ?? []).map((c) => [c.id, c.title]));+ const categories = manifest.categories ?? [];+ const titles = new Map(categories.map((c) => [c.id, c.title]));+ const pages = pageOfCategory(categories);return {- anchors: new Map(manifest.tools.map((t) => [t.name, `/spaces/reference/${t.category}#${t.name}`])),+ anchors: new Map(manifest.tools.map((t) => [t.name, toolHref(pages, t)])),sections: new Map(- manifest.tools.map((t) => [t.name, { title: titles.get(t.category) ?? t.category, href: `/spaces/reference/${t.category}` }])+ manifest.tools.map((t) => {+ const title = titles.get(t.category) ?? t.category;+ return [t.name, { title, href: `/spaces/reference/${pages.get(t.category)}#${slugify(title)}` }];+ })),};}diff --git a/scripts/docs-generators/cua-sdk.test.ts b/scripts/docs-generators/cua-sdk.test.tsindex 9307dd0e59..4e5426c295 100644--- a/scripts/docs-generators/cua-sdk.test.ts+++ b/scripts/docs-generators/cua-sdk.test.ts@@ -177,7 +177,7 @@ const PAGES_FIXTURE: PageSpec[] = [items: [],members: [{ object: 'Sandbox', title: 'Lifecycle methods', methods: ['delete'] }],},- { slug: 'local', title: 'Local', description: 'Local.', intro: 'Intro.', items: [], modules: ['media', 'types'] },+ { slug: 'services', title: 'Services', description: 'Services.', intro: 'Intro.', items: [], modules: ['media', 'types'] },];const render = (api = fixture(), examples = new Map()) =>@@ -199,11 +199,11 @@ test('pages are deterministic, complete and use only the shimmed components', ()'cua.mdx','errors.mdx','index.mdx',- 'local.mdx','meta.json','sandbox/index.mdx','sandbox/life.mdx','sandbox/meta.json',+ 'services.mdx','types.mdx',]);@@ -219,14 +219,14 @@ test('pages are deterministic, complete and use only the shimmed components', ()assert.match(sandbox, /pub async fn exec\(&self, command: Vec<String>, timeout_ms: Option<u64>\) -> Result<ExecResult, CuaError>/);assert.match(sandbox, /\| `command` \| `Vec<String>` \| required \|/);assert.match(sandbox, /\| `timeout_ms` \| `Option<u64>` \| `None` \|/);- assert.match(sandbox, /\*\*Returns\*\* \[`ExecResult`\]\(\/cua-sdk\/reference\/local#execresult-record\)/);+ assert.match(sandbox, /\*\*Returns\*\* \[`ExecResult`\]\(\/cua-sdk\/reference\/services#execresult-record\)/);// A method documented on another page is indexed on its object and rendered there.assert.match(sandbox, /\[`delete`\]\(\/cua-sdk\/reference\/sandbox\/life#sandboxdelete\)/);assert.doesNotMatch(sandbox, /^### `Sandbox\.delete`$/m);assert.match(a.get('/out/sandbox/life.mdx')!, /^### `Sandbox\.delete`$/m);assert.match(sandbox, /SandboxPhase\.RUNNING/);assert.match(sandbox, /^## `SandboxPhase` enum$/m);- const media = a.get('/out/local.mdx')!;+ const media = a.get('/out/services.mdx')!;assert.match(media, /\| `exit_code` \/ `exitCode` \| `i32` \|/);assert.match(media, /Output \\\| raw\./);assert.match(media, /<Callout>/);diff --git a/scripts/docs-generators/cua-sdk.ts b/scripts/docs-generators/cua-sdk.tsindex b7120e35e5..19ef483f64 100644--- a/scripts/docs-generators/cua-sdk.ts+++ b/scripts/docs-generators/cua-sdk.ts@@ -199,8 +199,8 @@ const PY = '/cua-sdk/reference/python';export const PAGES: PageSpec[] = [{slug: 'cua',- title: 'Cua client',- description: 'The Cua handle: embedded or daemon client, its configuration, and the SDK version.',+ title: 'Cua client and local runtimes',+ description: 'The Cua handle (embedded or daemon client, configuration, SDK version) and the local container and VM runtimes.',intro:'Every program starts from one `Cua` handle, embedded in the process or connected to a running `cua daemon`, with the same API either way. Its accessors return the other objects. The `config_*` functions read and write the user defaults in `$CUA_HOME/config.toml` (`cua config`).',items: ['Cua', 'CuaConfig', 'FleetSettings', 'CuaInfo', 'CuaMode', 'cua_sdk_version', 'config_list', 'config_get', 'config_set', 'config_unset', 'config_path', 'ConfigEntry', 'locations', 'LocationInfo', 'check_placement'],@@ -209,7 +209,7 @@ export const PAGES: PageSpec[] = [{slug: 'sandbox',title: 'Sandbox',- description: 'Create, find, connect to and control sandboxes, locally, in the cloud or by address.',+ description: 'Create, find, connect to and control sandboxes, and their lifecycle: wait, suspend, resume, restart, detach and delete.',intro: '`cua.sandboxes()` returns the `Sandboxes` collection; each sandbox is a `Sandbox` handle. The same options run locally and in the cloud: `on` is the switch (`local`, `cloud`, `direct:<addr>`), `kind` and `runtime` pick the machine.',items: ['Sandboxes',@@ -268,8 +268,8 @@ export const PAGES: PageSpec[] = [},{slug: 'image',- title: 'Image',- description: 'Canonical images, image references, build layers and registry credentials.',+ title: 'Images and create options',+ description: 'Canonical images, image references, build layers, registry credentials, and the options `Sandboxes.create` takes.',intro:'Images are references: the functions here resolve and normalise them without pulling anything. `ImageBuild` layers and a `RegistrySecret` go into `SandboxCreateOptions`.',items: [@@ -286,7 +286,7 @@ export const PAGES: PageSpec[] = ['RegistrySecret',],modules: ['image'],- python: [['`cua_sandbox.Image`', `${PY}/image#image`]],+ python: [['`cua_sandbox.Image`', `${PY}/sandbox#image`]],},{slug: 'services',@@ -314,14 +314,14 @@ export const PAGES: PageSpec[] = [methods: ['service', 'services', 'forward', 'public_url', 'revoke_public_url', 'mcp_config', 'mcp'],},],- python: [['`cua_sandbox` services, tunnels and MCP', `${PY}/services`]],+ python: [['`cua_sandbox` services, tunnels and MCP', `${PY}/sandbox#services-tunnels-and-mcp`]],},{slug: 'spacesd',- title: 'Spacesd client',- description: 'SpacesdClient: the cua-spacesd client for processes, files, the desktop and media in a sandbox.',+ title: 'Spacesd client and processes',+ description: 'SpacesdClient: the cua-spacesd client, running processes in a sandbox, and sandboxes without cua-spacesd.',intro:- '`sandbox.spacesd()`, `space.spacesd()` (or `cua.spacesd(url, token)` for any spacesd) returns a `SpacesdClient`. It picks native gRPC or gRPC-Web, sends the token and chunks transfers. Methods by task: [processes](/cua-sdk/reference/spacesd/shell), [files](/cua-sdk/reference/spacesd/files), [computer](/cua-sdk/reference/spacesd/computer) and [media](/cua-sdk/reference/spacesd/media).',+ '`sandbox.spacesd()`, `space.spacesd()` (or `cua.spacesd(url, token)` for any spacesd) returns a `SpacesdClient`. It picks native gRPC or gRPC-Web, sends the token and chunks transfers. Processes are below; [files](/cua-sdk/reference/spacesd/files) and the [computer and media](/cua-sdk/reference/spacesd/computer) have their own pages.',members: [{ object: 'Space', title: 'From a Space', methods: ['spacesd'] }],items: ['SpacesdClient', 'SpacesdCapabilities', 'SpacesdFeature', 'SpacesdHttpRequest', 'SpacesdHttpResponse', 'SpacesdHttpHeader'],modules: ['spacesd', 'types'],@@ -353,8 +353,8 @@ export const PAGES: PageSpec[] = [},{slug: 'spacesd/computer',- title: 'Computer',- description: 'Screenshots, pointer, keyboard, clipboard and displays of a sandbox desktop through cua-spacesd.',+ title: 'Computer and media',+ description: 'Screenshots, pointer, keyboard, clipboard and displays of a sandbox desktop, and its video and audio streams.',intro: 'Coordinates are screen pixels. cua-spacesd delegates input to Cua Driver in the guest; these calls need an image with a desktop.',members: [{@@ -388,7 +388,7 @@ export const PAGES: PageSpec[] = [title: 'Media',description: 'Video and audio streaming sessions and the sink callbacks you implement.',intro:- 'Media sessions deliver encoded frames and audio packets (`FrameSink`, `AudioSink`) to callbacks you implement. Decoded BGRA frames and PCM audio come with Cua Spaces: see [Decoded media](/cua-sdk/reference/spaces/decoded-media).',+ 'Media sessions deliver encoded frames and audio packets (`FrameSink`, `AudioSink`) to callbacks you implement.',members: [{object: 'SpacesdClient',@@ -407,7 +407,6 @@ export const PAGES: PageSpec[] = [intro:'`cua.fleet()` manages cloud capacity directly: named pools, [claims](/cua-sdk/reference/fleet/claims) and [images](/cua-sdk/reference/fleet/images). Most programs only need `Sandboxes.create` with `on: "cloud"`, which manages pools for you.',items: ['Fleet', 'FleetPools', 'SandboxSpec', 'PoolOptions', 'FleetPoolExport', 'FleetPool', 'FleetPoolSpec', 'FleetManagedPool', 'FleetGcReport', 'fleet_generate_claim_token'],- python: [['`cua_sandbox.Pool`', `${PY}/pool#pool`]],},{slug: 'fleet/claims',@@ -422,7 +421,6 @@ export const PAGES: PageSpec[] = [},],items: ['FleetClaim', 'FleetClaimOptions', 'FleetSandbox', 'FleetSignedUrl'],- python: [['`Pool.claim`', `${PY}/pool#poolclaim`]],},{slug: 'fleet/images',@@ -445,7 +443,7 @@ export const PAGES: PageSpec[] = [{slug: 'spaces',title: 'Spaces',- description: 'The Spaces registry: create, add, resolve, delete and remove Spaces.',+ description: 'The Spaces registry: create, add, resolve, delete and remove Spaces, their create options, and agent runs in a Space.',intro:'`cua.spaces()` returns the `Spaces` registry. Create a Space where `on` says (local or cloud), or add an existing machine by URL, then open a [`Space`](/cua-sdk/reference/spaces/space).',items: ['Spaces', 'SpaceInfo', 'SpacePowerReport', 'spaces_tool_methods', 'SpacesToolMethod'],@@ -461,7 +459,7 @@ export const PAGES: PageSpec[] = [{slug: 'spaces/space',title: 'Space',- description: 'A connected Space: shell, files, tools, windows and the hotspot.',+ description: 'A connected Space: shell, files, tools, windows, icons, displays, the hotspot and teleport.',intro:'Connected machine primitives; missing spacesd features return `CapabilityMissing`.',items: [@@ -482,7 +480,7 @@ export const PAGES: PageSpec[] = [{slug: 'spaces/volume',title: 'Cua Volume',- description: 'The versioned volume every Space and agent shares: files, history, grants, requests and audit.',+ description: 'The versioned volume every Space and agent shares: files, history, grants, requests, audit, storage and sync.',intro:'Cua Volume methods on the `Spaces` registry. Access is checked by the runtime; pass a `DriveView` to see the drive as a persistent agent does. Grants and approvals ask the user for presence. Guide: [Cua Volume](/spaces/guides/cua-volume).',members: [@@ -617,8 +615,8 @@ export const PAGES: PageSpec[] = [},{slug: 'spaces/persistent-agents',- title: 'Persistent agents',- description: 'Named agents whose memory outlives their Space: homes in the Cua Volume, routines, notifications, pause and resume, access to your computers.',+ title: 'Persistent agents and your cloud',+ description: 'Named agents whose memory outlives their Space: homes in the Cua Volume, routines, notifications, pause and resume, access to your computers, and Spaces in your own AWS, Google Cloud or Modal account.',intro:'A persistent agent keeps its harness memory in its home in the Cua Volume (`agents/<name>/`). The daemon restores the home before each run, saves it after each turn, fires routines with or without an app open, and posts notifications. See [Persistent agents](/spaces/guides/persistent-agents).',members: [@@ -686,457 +684,14 @@ export const PAGES: PageSpec[] = [title: 'Teleport',description: 'Move a running app between machines, with an approval callback.',intro:- 'Teleport exports an app session from this machine and imports it on another. A consent callback sees the manifest first. `Space.teleport` and `Space.teleport_manifest` ask the Cua Spaces daemon, which runs teleport; an embedded runtime without Cua Spaces raises `HostCapabilityMissing`. To bring any app into a Space (install it, open files in it), see [Teleport an app](/cua-sdk/reference/spaces/teleport-apps).',+ 'Teleport exports an app session from this machine and imports it on another. A consent callback sees the manifest first. `Space.teleport` and `Space.teleport_manifest` ask the Cua Spaces daemon, which runs teleport; an embedded runtime without Cua Spaces raises `HostCapabilityMissing`. To bring any app into a Space (install it, open files in it), see [Teleport an app](/spaces/guides/teleport-an-app).',members: [{ object: 'Space', title: 'Teleport into a Space', methods: ['teleport', 'teleport_manifest'] }],items: ['TeleportApprover', 'TeleportDecision', 'TeleportReceipt'],modules: ['teleport_types'],},- {- slug: 'spaces/decoded-media',- title: 'Decoded media',- description: 'Media sessions that deliver decoded BGRA frames and PCM audio.',- intro:- 'The streaming decoder ships with Cua Spaces. `spacesd_open_media_decoded` opens a media session on a `SpacesdClient` and delivers decoded video (packed BGRA; VideoToolbox on macOS, OpenH264 elsewhere) to a `DecodedFrameSink`, requesting a keyframe whenever a reference is lost (Swift: `client.openMediaDecoded(...)`). The open source SDK delivers the encoded frames: see [Media](/cua-sdk/reference/spacesd/media).',- items: ['spacesd_open_media_decoded', 'spacesd_open_media_decoded_with_audio', 'DecodedVideoFrame', 'PcmAudio', 'DecodedFrameSink', 'PcmSink'],- modules: ['media_decode'],- spaces: true,- },- {- slug: 'spaces/teleport-host',- title: 'Host teleport',- description: 'The Teleport object of the Spaces apps: providers, manifests and sends from this machine.',- intro:- '[`teleport(cua)`](/cua-sdk/reference/spaces/teleport-apps#teleport) returns the `Teleport` object (Swift: `cua.teleport()`). It lists the apps whose sessions this machine can export, builds manifests and sends them into a Space; the app catalog, plans and runs are on [Teleport an app](/cua-sdk/reference/spaces/teleport-apps).',- items: ['Teleport', 'TeleportApproval'],- modules: ['teleport'],- spaces: true,- },- {- slug: 'spaces/teleport-apps',- title: 'Teleport an app',- description: 'The app catalog, plans with consent, runs, drops and window drags.',- intro: '`Teleport.catalog` lists every app on this machine with what teleport can do (full, install only, unsupported). `plan` says what will be installed, sent and imported, with a consent item per path and secret; `run` executes an approved plan with progress. `parse_drop` and `start_window_drag` feed drag-and-drop onto a Space.',- items: ['teleport'],- modules: ['teleport_app', 'teleport_app::space_side'],- spaces: true,- },- {- slug: 'spaces/app-core',- title: 'Spaces app core',- description: 'The view models the Cua Spaces apps share: Space list, New Space wizard, teleport review, notch and Keyvault.',- intro:- 'The Cua Spaces apps render the same state from this core, so their behaviour cannot diverge. Each screen is a state record, a pure `*_reduce` function that applies an action or event, and a `*_view` that derives what to draw. The subpages cover one screen each; the shared formatters are on [Window, menu bar and Settings](/cua-sdk/reference/spaces/app-core/window).',- items: ['cua_spaces_register'],- modules: ['app_core', 'app_core_types'],- catalog: true,- spaces: true,- },- {- slug: 'spaces/app-core/spaces',- title: 'Space list',- description: 'The Space list (roster), the sidebar, a Space\'s detail and its remote windows.',- intro: 'The roster is the list of Spaces the app shows, from `Spaces.list` rows. `app_roster_reduce` applies an action; `app_sidebar` and `app_space_detail` derive the main window.',- items: [- 'AppFactWarning',- 'app_rows_to_spaces',- 'app_status_line',- 'app_this_machine_space',- 'AppHostSummaryInput',- 'app_agent_name',- 'AppAgentStatus',- 'app_ambient_dots',- 'AppAmbientDots',- 'app_group_windows_by_app',- 'AppOpenApp',- 'AppOpenWindow',- 'AppThumbnailScene',- 'AppWindowMode',- 'AppNotice',- 'AppNoticeKind',- 'AppNewSpaceOn',- 'app_hosted_rows',- 'app_without_this_relay_machine',- ],- prefixes: ['AppRoster', 'app_roster_', 'AppSidebar', 'app_sidebar', 'AppSpace', 'app_space', 'AppRemoteWindow'],- spaces: true,- },- {- slug: 'spaces/app-core/creates',- title: 'Creates and deletes',- description: 'Spaces being created or deleted: the rows they show at once, their progress and how they hand over to the registry.',- intro:- '`app_creates_reduce` applies a create or delete action (a start, the SDK\'s create progress, a timer tick, the result) and `app_creates_compose` adds the pending rows to the registry\'s Spaces. Progress moves by the SDK\'s fractions, else by the time each phase usually takes for the image, from the `now` the shell passes.',- items: ['AppCreatesState', 'AppCreateAction', 'AppPendingCreate', 'AppPendingDelete'],- prefixes: ['app_creates_'],- spaces: true,- },- {- slug: 'spaces/app-core/stream',- title: 'Stream section and facts',- description: 'A Space detail\'s Stream rows (desktop and windows with their icons and picture in picture) and its facts with live memory and storage use.',- intro: '`app_stream_section` builds the Stream rows both apps draw: the Desktop with the OS mark and the display\'s resolution, then one row per window titled by the window, with the app\'s icon source and a picture-in-picture button. `app_space_detail_live` adds Memory and Storage to the facts from `Space.usage`. `app_desktop_cover` says what the preview card shows before the first frame (Connecting, a Connect button, or the Space\'s own line) and `app_thumbnail_policy` how fresh the shells keep its blurred preview.',- items: [- 'app_space_detail_live',- 'AppSpaceUsage',- 'app_usage_refresh_ms',- 'AppPipCommand',- 'AppPipEvent',- 'app_desktop_cover',- 'AppDesktopCover',- 'AppDesktopCoverInput',- 'AppDesktopCoverKind',- 'app_thumbnail_policy',- 'AppThumbnailPolicy',- ],- prefixes: ['AppStream', 'app_stream_'],- spaces: true,- },- {- slug: 'spaces/app-core/new-space',- title: 'New Space wizard',- description: 'The New Space wizard: where it runs, image, engine, address and the create call.',- intro: '`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.',- items: [- 'AppLocation',- 'AppCloudEngine',- 'AppLocalEngine',- 'AppRuntime',- 'AppKindOption',- 'AppMenuOption',- 'AppTile',- 'AppCreatePlan',- 'AppCreateSpaceArgs',- 'AppLocalStorage',- 'AppStorageVolume',- 'AppCloudPricing',- 'AppGpuChoice',- 'AppGpuRow',- 'AppRuntimeSwitch',- ],- prefixes: ['AppWizard', 'app_wizard_', 'AppAddress', 'AppStep'],- spaces: true,- },- {- slug: 'spaces/app-core/images',- title: 'Image catalog',- description: 'The images the New Space wizard offers: groups, sizes, the image field and its suggestions.',- intro: 'The catalog behind the New Space image field: each `AppSandboxImage` with its group, distro, tier and download sizes, and the suggestions the field shows as you type.',- items: ['AppSandboxImage', 'AppImageGroup', 'AppImageSizes', 'AppPlatformSize', 'AppImageFieldView', 'AppImageSuggestion', 'AppSuggestionGroup', 'AppImageDistro', 'AppImageTier'],- spaces: true,- },- {- slug: 'spaces/app-core/teleport',- title: 'Teleport picker',- description: 'The teleport picker and its catalog.',- intro: 'The picker lists `Teleport.catalog` entries and drives the steps up to the review. The overlays that show a teleport in progress are on [Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer).',- items: ['AppEntrySection'],- prefixes: ['AppPicker', 'app_picker_', 'AppCatalog', 'app_catalog_'],- spaces: true,- },- {- slug: 'spaces/app-core/teleport-transfer',- title: 'Teleport transfer and drag',- description: 'The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space.',- intro: 'The transfer overlay follows a running teleport step by step; the drag overlay shows a file or app dragged onto a Space.',- items: [],- prefixes: ['AppTransfer', 'app_transfer_', 'AppDragOverlay'],- spaces: true,- },- {- slug: 'spaces/app-core/teleport-run',- title: 'Teleport plan and run',- description: 'The teleport plan, its consent and capabilities, and the run\'s steps.',- intro: '`app_teleport_plan` turns a `Teleport.plan` into the consent the user sees; `AppTeleportRunEvent` and `AppTeleportRunReport` follow the run.',- items: [],- prefixes: ['AppTeleport', 'app_teleport_'],- spaces: true,- },- {- slug: 'spaces/app-core/teleport-review',- title: 'Teleport review',- description: 'The review and consent before a teleport: what to send per site, from the app or from the Keyvault, and the choice remembered for next time.',- intro: '`AppReviewView` is the review sheet. `AppReviewToggle` and `AppReviewChoice` change what is sent, per site or per part; `app_review_remember` keeps the choice for the next teleport of the same app to the same Space, and `AppVaultSource` offers the items the Keyvault already holds, which need no Keychain prompt.',- items: ['AppReviewView', 'AppSendSource', 'AppVaultSource', 'AppRememberedChoice', 'AppPlanStepView', 'AppInstallCuaPrompt'],- prefixes: ['AppReview', 'app_review_', 'AppConsent'],- spaces: true,- },- {- slug: 'spaces/app-core/teleport-grid',- title: 'Teleport picker grid',- description: 'The teleport picker\'s tiles in both apps: tabs, app and window tiles with their icon and preview sources, and the arrow keys.',- intro: '`app_picker_app_grid`, `app_picker_window_grid` and `app_picker_remote_grid` build each tab\'s tiles; an app tile previews its frontmost window. `app_picker_grid_step` moves the selection for the arrow keys and `app_picker_grid_tabs` names the tabs.',- items: [],- prefixes: ['AppPickerTile', 'AppPickerGrid', 'app_picker_app_grid', 'app_picker_window_grid', 'app_picker_remote_grid', 'app_picker_grid_'],- spaces: true,- },- {- slug: 'spaces/volume-app-core',- title: 'App core: Cua Volume storage, mount and sync',- description: 'Settings, Storage (this machine or an S3-compatible bucket, the Finder volume, the cache), the first run\'s Cua Volume page and the Drive page\'s devices and conflicts.',- intro:- '`app_storage_reduce` and `app_storage_section` drive Settings, Storage from the daemon\'s `volume_storage`, `volume_mount_status` and `volume_cache_stats` answers; its `request` names the tool to run (`volume_storage_set`, `volume_mount`, `volume_cache_set`, ...). S3 keys travel only in the `volume_storage_set` request. `AppDriveCard` is the first run\'s Cua Volume page (off by default), drawn over the `app_drive_mount_preview` miniature. `AppDriveSyncInput` feeds the Drive page\'s devices and conflicts.',- items: [],- prefixes: [- 'AppStorage',- 'app_storage_',- 'AppDriveMount',- 'app_drive_mount_',- 'AppDriveS3',- 'AppDriveStorage',- 'AppDriveCheck',- 'AppDriveCache',- 'AppDriveCard',- 'AppDriveStepRequest',- 'AppDriveDevice',- 'AppDriveConflict',- 'AppDriveSync',- 'AppConflictView',- 'app_drive_sync_',- 'app_drive_mount_from_json',- ],- catalog: true,- spaces: true,- },- {- slug: 'spaces/agents-app-core',- title: 'App core: agents, drive, notifications',- description: 'The Agents page (persistent agents, memory, routines, computer access), the Drive page and the notifications the apps post.',- intro: '`app_agents_reduce` and `app_agents_view` drive the Agents page from the daemon\'s persistent-agent, drive and routine tools; `app_drive_*` the Drive page; `app_notifications_plan` says which feed entries to post as system notifications (each once, none of the backlog on first run) and `app_notifications_view` draws the list.',- items: ['AppLineView', 'AppDriveEntryInput', 'AppSystemNote', 'app_agent_rows', 'app_agent_status_label', 'app_agent_subtitle'],- prefixes: ['AppAgent', 'app_agents_', 'AppPersistentAgent', 'AppFile', 'AppOpenFile', 'AppRoutine', 'AppComputerGrant', 'AppAccessAudit', 'AppTab', 'AppDrive', 'app_drive_', 'AppNotification', 'app_notifications_'],- catalog: true,- spaces: true,- },- {- slug: 'spaces/app-core/cloud',- title: 'Your cloud',- description: 'The "Connect a cloud" sheet and the New Space wizard\'s "Your cloud": providers with their found mark, Test that creates nothing, Connect, and what a connected cloud runs at what cost.',- intro: '`app_cloud_connect_reduce` applies an action and `app_cloud_connect_view` derives the sheet; its `request` is the `cloud_test` or `cloud_connect` call to run. `app_connected_clouds_from_status_json` turns the SDK\'s `cloud_status` into the wizard\'s `clouds`.',- items: ['AppConnectedCloud', 'AppCloudOffer', 'app_connected_clouds_from_status_json', 'app_connected_cloud_from_json', 'app_is_cloud_word'],- prefixes: ['AppCloudConnect', 'AppCloudProvider', 'AppCloudCheck', 'AppCloudTarget', 'AppCloudField', 'app_cloud_connect_'],- spaces: true,- },- {- slug: 'spaces/app-core/drag-trigger',- title: 'Window drag trigger',- description: 'When dragging a window opens Teleport to Cua: move versus resize, the notch line and the dwell.',- intro: '`app_drag_classify` tells a move from a resize by the window\'s frame. `app_drag_trigger_initial` and `app_drag_trigger_apply` run the trigger: the cursor passes a line 5 pt above the notch\'s bottom edge, or rests 0.3 s in the Teleport to Cua box. `app_drag_displays` and `app_drag_portal_displays` give the notch geometry of each display.',- items: ['AppStillAnchor', 'AppTriggerPhase'],- prefixes: ['AppDrag', 'app_drag_'],- spaces: true,- },- {- slug: 'spaces/app-core/experiments',- title: 'Experiments',- description: 'Settings > Experiments: the switches that hide Cua Volume, your own cloud and sharing until they are turned on.',- intro: '`app_experiments_page` derives the Experiments tab from the saved `AppExperiments`; `app_settings_choose_experiment` applies a switch and saves the New UI choice ("Use classic UI"). `app_settings_resolve_new_ui` applies the New UI default for the update channel and version. Off only hides a feature: a mounted Volume, a connected cloud and existing shares stay as they are.',- items: ['app_experiments_from_json', 'app_settings_with_storage', 'app_settings_resolve_new_ui', 'app_settings_first_launch_channel', 'app_settings_choose_experiment', 'app_telemetry_experiments_changed', 'app_telemetry_experiments_on'],- prefixes: ['AppExperiment', 'app_experiments_'],- spaces: true,- },- {- slug: 'spaces/app-core/run-on',- title: 'Run on',- description: 'The New Space Run on menu: This Mac, your machines that provide Spaces, and connected clouds.',- intro: '`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.',- items: ['app_wizard_placement_options', 'app_space_host', 'AppPlacementOption', 'AppSpaceHost'],- spaces: true,- },- {- slug: 'spaces/app-core/power',- title: 'Power button',- description: 'The power button on a Space: suspend and resume, or turn off and on.',- intro: '`app_power_button` derives the button for a Space from what its provider supports and any power change in flight (`app_creates_is_powering`).',- items: ['app_creates_is_powering'],- prefixes: ['AppPower', 'app_power_', 'AppSpacePower', 'AppPendingPower'],- spaces: true,- },- {- slug: 'spaces/app-core/notch',- title: 'Notch',- description: 'The notch switcher: state, events, layout on the screen and motion.',- intro: 'The notch is the Space switcher at the top of the screen. `app_notch_reduce` applies an event; `app_notch_layout`, `app_notch_radii` and `app_notch_motion` place and animate it.',- items: ['AppScreenFacts', 'AppLogicalRect', 'app_presence_name', 'app_presence_principal_id', 'app_os_icon_svg', 'app_os_icon_system_symbol'],- prefixes: ['AppNotch', 'app_notch_'],- spaces: true,- },- {- slug: 'spaces/app-core/keyvault',- title: 'Keyvault',- description: 'The Keyvault broker client and its overview: items, pending requests, grants, rules and audit.',- intro: '`KeyvaultClient` talks to the Keyvault broker and returns a `KeyvaultOverview`. The screens derived from it are on [Keyvault screens](/cua-sdk/reference/spaces/app-core/keyvault-screens).',- items: ['AppSensitiveOption', 'AppSensitiveGroup', 'app_sensitive_group_sdk', ],- prefixes: ['Keyvault', 'Kv', 'kv_'],- spaces: true,- },- {- slug: 'spaces/app-core/keyvault-screens',- title: 'Keyvault screens',- description: 'The Keyvault page, sidebar, the vault list (apps, sites and items with their locks), the unlock prompt and the approval prompt.',- intro: 'The `kv_*` functions derive each Keyvault screen from a `KeyvaultOverview`. `kv_vault_view` groups the vault by source app and site, with a lock on each row; `kv_vault_reduce` applies search, selection and open groups; `kv_unlock_prompt` is the "Allow unattended access?" prompt. `kv_approval_open`, `kv_approval_reduce` and `kv_approval_view` drive the approval prompt; the `*_command` functions return the `KvCommand` to send.',- items: ['KvAccessRow', 'KvAccessKind', 'KvRecentRow', 'KvDecision', 'KvDecisionTone', 'KvTri', 'KvSelection', 'KvSigningBadge', 'KvTone'],- prefixes: ['kv_page', 'KvPage', 'kv_sidebar', 'KvSidebar', 'KvCategory', 'kv_list', 'KvListView', 'kv_vault_', 'KvVault', 'KvLock', 'KvKind', 'KvAppRow', 'kv_unlock_', 'KvUnlockPrompt', 'kv_delete_', 'KvDeleteConfirm', 'kv_lock_', 'kv_live_', 'KvPendingRow', 'kv_approval_', 'KvApproval'],- spaces: true,- },- {- slug: 'spaces/app-core/onboarding-settings',- title: 'Onboarding and settings',- description: 'First-run onboarding, the settings file and the hotkey label.',- intro: '`app_onboarding_reduce` steps through first-run onboarding. `app_settings_load` and `app_settings_save` read and write the apps\' settings file. The animated miniatures on the onboarding cards are on [Onboarding previews](/cua-sdk/reference/spaces/app-core/onboarding-previews).',- items: ['app_format_hotkey', 'AppKeyCombo', 'AppSwitcherTheme', 'AppUsageToggle', 'AppModeChoice', 'AppPresentationCard'],- prefixes: ['AppOnboarding', 'app_onboarding_', 'AppSettings', 'app_settings_'],- spaces: true,- },- {- slug: 'spaces/app-core/onboarding-previews',- title: 'Onboarding previews',- description: 'The animated miniatures on the onboarding cards: the background computer-use card, the notch and the menu bar.',- intro: '`app_driver_preview` and `app_presentation_preview` return the miniatures of the AI agents and presentation cards; the `*_frame` functions give one frame of the loop and the `*_still` functions the frame shown with Reduce Motion. The onboarding flow itself is on [Onboarding and settings](/cua-sdk/reference/spaces/app-core/onboarding-settings).',- items: [],- prefixes: ['AppPresentation', 'app_presentation_', 'AppMenuPreview', 'AppPreview', 'AppDriver', 'app_driver_'],- spaces: true,- },- {- slug: 'spaces/app-core/about',- title: 'About, updates and launch',- description: 'The About window and its update channel, what the apps do once they launch (the bundled cua install), and the daemon and refresh reports they read.',- intro: '`app_about_view` builds the About window from the shell\'s `AppAboutInput`; `app_about_after_launch` and `app_about_restart_daemon` say what to do after an update or when the daemon is from another build. `AppCliInstaller` puts the bundled `cua` on PATH on first launch.',- items: ['AppDaemonCheck', 'app_daemon_check_from_json', 'AppRefreshReport', 'app_refresh_report_from_json', 'AppUpdateChannel'],- prefixes: ['AppAbout', 'app_about_', 'AppLaunch', 'app_launch_', 'AppCliInstall', 'AppInstallMethod'],- spaces: true,- },- {- slug: 'spaces/account-app-core',- title: 'App core: billing, relay usage and Teams',- description: 'The Billing and Relay usage rows in Settings, the out-of-credit and relay allowance notices, and the Teams section.',- intro:- 'The apps take no payment details: the website handles credit and cards. `app_billing_status` turns `Fleet.billing_status` into the core\'s `AppBillingStatus`, which Settings shows as the credit left and "Manage billing" (the website billing page). A cloud Space that Fleet refuses for want of credit (`CuaError::CloudCreditExhausted`) shows `AppCreditNotice`: one line and "Add credit", which opens the same page. Local Spaces never depend on it. `app_relay_usage` reads the account\'s relay allowance this month from the relay (`GET /v1/usage`, as `cua usage` does); `app_relay_usage_view` derives the Settings row and, past the allowance, `AppRelayAllowanceNotice`: one line with Upgrade. Nothing stops at the limit. `app_teams` turns the account\'s `AppTeamsInput` into the Teams rows of Settings: the signed-in state, each team with its people and the role of each.',- items: ['AppCreditNotice'],- prefixes: ['AppBilling', 'app_billing_', 'AppRelay', 'app_relay_', 'AppTeam', 'app_teams'],- catalog: true,- spaces: true,- },- {- slug: 'spaces/app-core/this-machine',- title: 'This machine',- description: 'The This machine roster entry, its page and the host setup form.',- intro: '`app_with_this_machine` puts This machine first in the roster. `app_host_panel` derives its page from `app_host_state`; `app_host_form_reduce` and `app_host_form_view` drive the host setup form, whose `request` goes to `app_host_setup` (Swift: `host.setupRequest(...)`).',- items: ['app_with_this_machine', 'AppPermissionRow'],- prefixes: ['AppHost', 'app_host_'],- spaces: true,- },- {- slug: 'spaces/app-core/window',- title: 'Window, menu bar and Settings',- description: 'The window chrome, a Space\'s toolbar and sections, the menu bar menu and Settings.',- intro: '`app_main_chrome`, `app_menu_bar` and `app_settings_page` give the window chrome, the menu bar menu and the Settings page. `app_space_detail_copy` holds the words of a Space\'s sections. The coding agents\' rows of Settings are on [Settings, Agents](/cua-sdk/reference/spaces/app-core/agent-keys). `app_login_item_launch_plan` decides when the apps turn on launch at login by themselves.',- items: [- 'app_display_name',- 'app_display_path',- 'app_format_bytes',- 'AppFact',- 'AppFactCopy',- 'app_delete_failed_text',- 'AppDetailCopy',- 'app_space_detail_copy',- 'AppDetailAction',- 'AppDetailActionId',- 'AppDeleteConfirm',- 'AppSentFileInfo',- 'app_sent_file',- 'app_sent_files_from_json',- 'app_drop_sending_text',- 'app_drop_sent_text',- 'AppSignInPhase',- 'AppTelemetryInput',- 'app_menu',- 'AppMenuInput',- 'app_menu_input_from_json',- 'app_openable_count',- ],- prefixes: [- 'AppChromeInput',- 'app_chrome_',- 'AppMainChrome',- 'app_main_chrome',- 'AppMenuItem',- 'app_menu_bar',- 'AppSettingsInput',- 'AppSettingsPage',- 'AppSettingsRow',- 'AppSettingsSection',- 'AppSettingsOption',- 'app_settings_page',- 'app_settings_input_',- 'AppLoginItem',- 'app_login_item_',- ],- spaces: true,- },- {- slug: 'spaces/app-core/devices',- title: 'Devices',- description: 'Settings > Devices: this device\'s enrollment, the account\'s devices, Recent Access, and the enroll and approval sheets.',- intro:- '`app_devices_view` derives the Devices page from `app_devices_input` (a `Devices.snapshot`): this device\'s enrollment, the account\'s devices with their buttons, approval prompts that ask for presence, and Recent Access in words. `app_enroll_reduce` / `app_enroll_view` drive the enroll sheet (sign in again, or a one-time code approved elsewhere); `app_approve_reduce` / `app_approve_view` drive the approval sheet, whose `request` goes to `Devices.approve` after Touch ID or the login password; `app_confirm_presence` asks for that confirmation with the system\'s own prompt (Touch ID or the login password on macOS, Windows Hello, polkit on Linux). `app_machine_access_notice` says why a device that is signed in but not enrolled cannot open the account\'s machines, for their greyed-out Connect.',- items: ['AppAuditInput', 'AppActivityRow', 'AppBannerTone', 'AppThisDevice', 'AppEnrollmentKind', 'AppApprovalPrompt', 'AppMachineInput', 'AppUnconfirmedMachine', 'app_machine_access_notice', 'AppMachineAccessNotice'],- prefixes: ['AppDevice', 'app_devices_', 'AppEnroll', 'app_enroll_', 'AppApprove', 'app_approve_'],- modules: ['presence'],- spaces: true,- },- {- slug: 'spaces/app-core/agent-keys',- title: 'Settings, Agents',- description: 'Settings > Agents: the coding agents\' rows, the provider keys saved in the keychain, and the add or replace sheet.',- intro:- 'The `app_agent_setup*` and `app_agent_settings_*` functions turn `AgentSetup` results into the coding agents\' rows. `app_agent_keys_view` derives the key rows from `app_agent_keys_input_from_json` (the daemon\'s `agent_keys.list` answer: each saved key\'s provider, the variable a run gets it as, its last four characters and when it was added). `app_agent_key_form` drives the add or replace sheet, with `app_agent_key_name_problem` for an Other key\'s variable name; `app_agent_key_remove_confirm` is the confirmation before a key is removed.',- items: [],- prefixes: ['AppAgentSetup', 'AppAgentSettingsRow', 'app_agent_setup', 'app_agent_settings_', 'AppAgentKey', 'app_agent_key'],- spaces: true,- },- {- slug: 'spaces/app-core/share',- title: 'Share sheet',- description: 'The Share sheet: who a Space is shared with (viewer or editor) and the share request to run.',- intro:- '`app_share_view` derives the Share sheet from `AppShareInput` (the Space and its `Space.shares`): one row per person with a role menu, the email field and why sharing is unavailable. `app_share_reduce` applies an action; its `request` goes to `Space.share` or `Space.unshare`, which ask for presence first.',- items: [],- prefixes: ['AppShare', 'app_share_', 'AppRoleOption'],- spaces: true,- },- {- slug: 'spaces/machines-app-core',- title: 'Machines page',- description: 'The Machines page\'s rows: this machine, your machines and your devices, each computer once.',- intro:- '`app_machines_page_rows` builds the Machines page from what an app has: the Spaces list (a machine sharing its own desktop, one that provides Spaces), what the relay says of each machine, and the account\'s devices (`AppDeviceIn`). A machine and the device on it are one row; a device that is none of the machines is listed on its own (`device_only`) and is never a Run on choice. Every Spaces UI lists these rows.',- items: ['AppDeviceIn'],- prefixes: ['AppMachinePageRow', 'AppMachinesPageInput', 'app_machines_'],- spaces: true,- },- {- slug: 'spaces/app-checklist-palette',- title: 'Getting started and the command palette',- description: 'The getting-started checklist, the command palette\'s ranking and the shared keyboard shortcuts.',- intro:- 'App core functions beside the [Spaces app core](/cua-sdk/reference/spaces/app-core) screens. The host app keeps the one `AppChecklistState`. `app_checklist_observe_from` reads what the app shows (the [Machines page](/cua-sdk/reference/spaces/machines-app-core) rows, the Spaces, the agents) as the same `Observe` action in every UI. `app_checklist_reduce` applies a checklist action (a step done, shown, closed, opened again, what the app shows now, or progress merged from another copy) and returns the new state with the usage events it means; `app_checklist_view` derives the rows, title and progress. `app_palette_rank` orders the command palette\'s entries for a query, and `app_keybindings` lists the default keyboard shortcuts the apps share.',- items: [],- prefixes: ['AppChecklist', 'app_checklist_', 'AppKeybinding', 'app_keybindings', 'AppPaletteEntry', 'app_palette_'],- spaces: true,- },- {- slug: 'spaces/app-core/telemetry',- title: 'Usage telemetry',- description: 'Which anonymous usage events a Spaces app step means, and sending them.',- intro:- 'Each `app_telemetry_*` function takes a reducer step (the state before it and the action) and returns the `AppTelemetrySignal`s it means: first-run pages, Space creates, Settings, Storage, sharing and enrollment, as fixed words only. `app_telemetry_record` sends them on the SDK\'s telemetry client, where every switch and the first-run notice apply. `app_telemetry_start` and `app_telemetry_welcome_left` hold the first events until the first run\'s Welcome page is left, with its usage-data switch deciding. What is sent: [Telemetry and privacy](/cua-sdk/concepts/telemetry).',- items: [],- prefixes: ['AppTelemetrySignal', 'app_telemetry_'],- spaces: true,- },{slug: 'spaces/devices',- title: 'Devices',+ title: 'This device on the relay',description: 'This device as a client of the account on the relay: enroll, approve, rename, revoke and the audit log.',intro:'`auth.devices(relay_url, name)` returns this device on the relay, its key in the session\'s credential store (shared with the `cua` CLI and daemon). A device lists and reaches the account\'s machines once enrolled: right after a fresh sign-in (a sign-in through `Auth.begin_login` re-registers a device that already has a key), or by a one-time code approved from an enrolled device (`cua devices approve`). A new key of the same machine replaces its old record. Enrollment lasts 30 days, then one approval or a fresh sign-in re-verifies it. Nothing here prompts; gate `approve` behind presence in your UI.',@@ -1144,25 +699,25 @@ export const PAGES: PageSpec[] = [},{slug: 'spaces/host',- title: 'Host and relay',- description: 'Unattended host setup and the cua-relay directory client.',+ title: 'Host, relay and devices',+ description: 'Unattended host setup, the cua-relay directory client, and this device\'s enrollment on the relay.',intro: 'Set this machine up for unattended access, and reach account machines through the relay.',items: ['Host', 'Relay'],modules: ['host'],},{slug: 'auth',- title: 'Auth',- description: 'Sign-in and the credential store the SDK, the CLI and the daemon share.',+ title: 'Auth and telemetry',+ description: 'Sign-in, the credential store the SDK, the CLI and the daemon share, and the telemetry switches.',intro: '`cua.auth()` signs in and reads the shared session. Cloud calls use it when no Fleet token or client credentials are configured.',items: ['Auth', 'LoginAttempt'],modules: ['auth'],- python: [['`cua_sandbox.configure()`', `${PY}/configuration#configure`]],+ python: [['`cua_sandbox.configure()`', `${PY}/runtimes#configure`]],},{slug: 'agents',- title: 'Coding agents',- description: 'Run coding agents (Claude Code, Codex, Gemini CLI, OpenCode, ...) inside any sandbox.',+ title: 'Coding agents and setup',+ description: 'Run coding agents (Claude Code, Codex, Gemini CLI, OpenCode, ...) inside any sandbox, and set them up on this machine.',intro: '`sandbox.agents()` (or `guest.agents()`) runs a harness over the Agent Client Protocol: normalized events, follow-ups, interrupts and results. Runs outlive the handle that started them.',members: [{ object: 'Sandbox', title: 'Agents in a sandbox', methods: ['agents'] },@@ -1189,6 +744,35 @@ export const PAGES: PageSpec[] = [},];+/**+ * Sections rendered on another page: section slug -> the page it joins. The+ * section keeps its own items, intro and anchors under a `##` heading of its+ * title, so a module family reads as one page while staying under the page+ * budget (docs/scripts/page-budget.test.ts).+ */+export const MERGED: Record<string, string> = {+ local: 'cua',+ 'sandbox/lifecycle': 'sandbox',+ 'sandbox/options': 'image',+ 'sandbox/without-spacesd': 'spacesd',+ 'spacesd/shell': 'spacesd',+ 'spacesd/media': 'spacesd/computer',+ 'spaces/create': 'spaces',+ 'spaces/agents': 'spaces',+ 'spaces/windows': 'spaces/space',+ 'spaces/teleport': 'spaces/space',+ 'spaces/cloud': 'spaces/persistent-agents',+ 'spaces/volume-sync': 'spaces/volume',+ 'spaces/devices': 'spaces/host',+ 'agent-setup': 'agents',+ telemetry: 'auth',+};++/** The pages that get a file: those no other page absorbs. */+export function outputPages(pages: PageSpec[]): PageSpec[] {+ return pages.filter((p) => !MERGED[p.slug]);+}+/** The two pages every item links into. */const ERRORS_SLUG = 'errors';const TYPES_SLUG = 'types';@@ -1212,7 +796,7 @@ const SPACES_SWIFT = path.join(REPO_ROOT, 'libs', 'spaces-app-swift', 'Sources',export const SPACES_NOTE ='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.';/** Reference pages stay readable and small (docs.cua.ai eager-imports every page). */-export const MAX_WORDS = 5000;+export const MAX_WORDS = 8000;/** Compiled MDX size drives the docs server's memory: keep each page well under this. */export const MAX_BYTES = 60_000;/** docs/scripts/page-budget.test.ts: highlighted blocks and Tabs per page. */@@ -1221,11 +805,11 @@ export const MAX_TABS = 30;/** Groups of the reference sidebar; folders other generators own are listed by name. */const NAV: Array<[label: string, pages: string[]]> = [- ['Sandboxes', ['cua', 'sandbox', 'image', 'os-image-catalog', 'image-software', 'services', 'local', 'runtime-support']],+ ['Sandboxes', ['cua', 'sandbox', 'image', 'os-image-catalog', 'image-software', 'services', 'runtime-support']],['Cloud capacity', ['fleet']],['Inside a sandbox', ['spacesd', 'agents']],['Spaces', ['spaces']],- ['Account', ['auth', 'agent-setup', 'telemetry']],+ ['Account', ['auth']],['Errors and types', [ERRORS_SLUG, TYPES_SLUG]],['Language packages', ['python', 'typescript', 'rust']],['Protocol', ['protocol']],@@ -1781,7 +1365,7 @@ export function itemHeading(item: { kind: ItemKind; name: string }): string {}export function pageRoute(slugPath: string): string {- return `${ROUTE}/${slugPath}`;+ return `${ROUTE}/${MERGED[slugPath] ?? slugPath}`;}/** Name -> route#anchor for every item, plus the error type. */@@ -2113,14 +1697,17 @@ function catalogIndex(items: Array<Item & { href: string }>, page: string, rc: Rreturn out;}-function renderObjectPage(p: Placed, rc: RenderContext, version: string): string {+/** One section's body: intro, Python pointer, header, member sections, items. */+function renderSection(p: Placed, rc: RenderContext, version: string, heading?: string): string[] {const { spec } = p;const body: string[] = [...(spec.spaces ? ['<Callout title="Cua Spaces app export">', SPACES_NOTE, '</Callout>', ''] : []), spec.intro, '', ...pythonLine(spec)];const header = readHeader(`cua-sdk/${spec.slug}.md`, { version });if (header) body.push(header, '');for (const m of p.members) {const home = rc.links.get(m.object.name);- body.push(`## ${m.section.title}`, '', `Methods of [\`${m.object.name}\`](${home ? relLink(home, spec.slug) : '#'}).`, '');+ // A merged section's heading already names a member section of the same title.+ if (m.section.title !== heading) body.push(`## ${m.section.title}`, '');+ body.push(`Methods of [\`${m.object.name}\`](${home ? relLink(home, spec.slug) : '#'}).`, '');for (const method of m.methods) {body.push(...renderCallable(m.object.name, method, { name: m.object.name, kind: 'object' }, 'method', rc));}@@ -2131,12 +1718,23 @@ function renderObjectPage(p: Placed, rc: RenderContext, version: string): stringbody.push('## All items', '', `${items.length} items, across this page and its subpages, grouped by page (each item's section is on its page). Methods are listed on their object.`, '');body.push(...catalogIndex(items, spec.slug, rc), '');}+ return body;+}++/**+ * A page: its own section, then each section `MERGED` into it, under a `##`+ * heading of that section's title.+ */+function renderObjectPage(parts: Array<[Placed, RenderContext]>, version: string): string {+ const [[home, homeRc], ...rest] = parts;+ const body = renderSection(home, homeRc, version);+ for (const [p, rc] of rest) body.push(`## ${p.spec.title}`, '', ...renderSection(p, rc, version, p.spec.title));const needsCallout = body.some((l) => l.includes('<Callout'));return renderPage({- title: spec.title,- description: spec.description,+ title: home.spec.title,+ description: home.spec.description,generator: GENERATOR,- source: spec.spaces ? SPACES_SOURCE : SOURCE,+ source: home.spec.spaces ? SPACES_SOURCE : SOURCE,version,components: needsCallout ? ['Callout', 'Tabs'] : ['Tabs'],body: body.join('\n'),@@ -2367,7 +1965,7 @@ const OTHER_PAGES: Record<string, [title: string, description: string]> = {*/export function navGroups(pages: PageSpec[]): Array<[string, string[]]> {const own = new Set(pages.map((p) => p.slug));- const known = (s: string) => own.has(s) || s === ERRORS_SLUG || s === TYPES_SLUG || (pages === PAGES && s in OTHER_PAGES);+ const known = (s: string) => own.has(s) || s === ERRORS_SLUG || s === TYPES_SLUG || (pages.length > 0 && pages.every((p) => PAGES.includes(p)) && s in OTHER_PAGES);const listed = new Set(NAV.flatMap(([, slugs]) => slugs));const orphans = pages.filter((p) => !p.slug.includes('/') && !listed.has(p.slug));if (orphans.length) throw new Error(`pages missing from NAV in cua-sdk.ts: ${orphans.map((p) => p.slug).join(', ')}`);@@ -2377,7 +1975,7 @@ export function navGroups(pages: PageSpec[]): Array<[string, string[]]> {function renderIndex(api: SdkApi, pages: PageSpec[], version: string, spaces?: SdkApi | null): string {const specs = new Map(pages.map((p) => [p.slug, p]));const body: string[] = [- 'The Cua SDK in Python, TypeScript, Swift, Kotlin and Rust, all generated from the Rust `cua-sdk` crate. Each page covers one object, with signatures in every language.',+ 'The Cua SDK in Python, TypeScript, Swift, Kotlin and Rust, all generated from the Rust `cua-sdk` crate. Each page covers one module, with signatures in every language.','',];if (pages.some((p) => p.spaces)) {@@ -2501,13 +2099,21 @@ export function renderAll(api: SdkApi, version: string, opts: RenderOptions = {}? { ctx: spacesCtx, api: both, all, langs: SPACES_LANGS, links, examples, used, page, pages, errorVariants }: { ctx, api, all, langs: LANGS, links, examples, used, page, pages, errorVariants };const files = new Map<string, string>();- for (const [slugPath, p] of placed) {- files.set(pageFile(slugPath, pages, outputDir), renderObjectPage(p, rcFor(slugPath, p.spec.spaces), version));+ const outputs = outputPages(pages);+ for (const out of outputs) {+ const parts: Array<[Placed, RenderContext]> = [...placed]+ .filter(([slugPath]) => (MERGED[slugPath] ?? slugPath) === out.slug)+ .sort(([a], [b]) => Number(a !== out.slug) - Number(b !== out.slug))+ .map(([slugPath, p]) => [p, rcFor(slugPath, p.spec.spaces)]);+ files.set(pageFile(out.slug, outputs, outputDir), renderObjectPage(parts, version));+ }+ for (const [from, to] of Object.entries(MERGED)) {+ if (pages.some((p) => p.slug === from) && !outputs.some((p) => p.slug === to)) throw new Error(`MERGED: ${from} joins ${to}, which is not a page`);}files.set(path.join(outputDir, `${ERRORS_SLUG}.mdx`), renderErrorsPage(api, rcFor(ERRORS_SLUG), version, messages));files.set(path.join(outputDir, `${TYPES_SLUG}.mdx`), renderTypesPage(api, rcFor(TYPES_SLUG), version, renames));- files.set(path.join(outputDir, 'index.mdx'), renderIndex(api, pages, version, spaces));- for (const [file, content] of navFiles(pages, outputDir)) files.set(file, content);+ files.set(path.join(outputDir, 'index.mdx'), renderIndex(api, outputs, version, spaces));+ for (const [file, content] of navFiles(outputs, outputDir)) files.set(file, content);const unused = [...examples.keys()].filter((k) => !used.has(k));if (unused.length) {throw new Error(`examples with no matching item or method: ${unused.join(', ')} (scripts/docs-generators/examples/cua-sdk)`);@@ -2750,20 +2356,38 @@ export function loadApis(): { api: SdkApi; spaces: SdkApi } {}export function loadApi(): SdkApi {- return loadApis().api;+ if (process.env.CUA_SDK_API_JSON) return JSON.parse(fs.readFileSync(process.env.CUA_SDK_API_JSON, 'utf-8')) as SdkApi;+ const target = process.env.CARGO_TARGET_DIR ? path.resolve(process.env.CARGO_TARGET_DIR) : path.join(CUA_ROOT, 'target');+ const packages = [...(process.env.CUA_SDK_LIBRARY ? [] : ['-p', 'cua-sdk']), ...(process.env.CUA_BINDGEN ? [] : ['-p', 'cua-bindgen'])];+ if (packages.length) {+ console.log(`Building ${packages.filter((p) => p !== '-p').join(', ')} (debug; UniFFI metadata is profile-independent)...`);+ execFileSync(cargo(), ['build', '--locked', ...packages], { cwd: CUA_ROOT, stdio: 'inherit' });+ }+ const bindgen =+ process.env.CUA_BINDGEN || path.join(target, 'debug', process.platform === 'win32' ? 'cua-bindgen.exe' : 'cua-bindgen');+ return JSON.parse(+ execFileSync(bindgen, ['docs', '--library', process.env.CUA_SDK_LIBRARY || path.join(target, 'debug', libraryFile('cua_sdk')), '--namespace', 'cua_sdk'], {+ cwd: CUA_ROOT,+ encoding: 'utf-8',+ maxBuffer: 64 * 1024 * 1024,+ })+ );}/** Directories whose generated pages this generator owns (stale ones are removed). */function ownedDirs(pages: PageSpec[] = PAGES): string[] {- return [REFERENCE_DIR, ...pageFolders(pages).map((f) => path.join(REFERENCE_DIR, f))];+ // Folders of removed pages too, so their stale files are deleted.+ const folders = new Set([...pageFolders(pages), 'sandbox', 'spacesd', 'spaces', 'spaces/app-core']);+ return [REFERENCE_DIR, ...[...folders].map((f) => path.join(REFERENCE_DIR, f))];}function main(): void {const checkOnly = isCheckMode();console.log('Cua SDK reference (UniFFI)');- const { api, spaces } = loadApis();+ // The Cua Spaces app export (cua_spaces_ffi) is the apps' internals, not+ // the SDK: it has no reference pages.+ const api = loadApi();const renames = loadRenames();- const spacesRenames = loadSpacesRenames();const problems = verifyBindingNames(api, loadBindingSources(), renames);if (problems.length) {console.error(`The rendered names disagree with the committed bindings or the Rust source (${problems.length}):`);@@ -2771,15 +2395,8 @@ function main(): void {console.error('Regenerate the bindings (libs/cua/scripts/generate-uniffi-bindings.mjs) or fix the naming rules in cua-sdk.ts.');process.exit(1);}- const spacesProblems = verifyBindingNames(spaces, loadSpacesBindingSources(), spacesRenames);- if (spacesProblems.length) {- console.error(`The Cua Spaces app export's names disagree with its Swift binding or the cua-spaces-ffi source (${spacesProblems.length}):`);- for (const p of spacesProblems.slice(0, 40)) console.error(` ${p}`);- console.error('Regenerate the Swift binding (node libs/spaces-app-swift/scripts/generate-bindings.mjs) or fix the naming rules in cua-sdk.ts.');- process.exit(1);- }const version = fs.readFileSync(path.join(CUA_ROOT, 'VERSION'), 'utf-8').trim();- const files = renderAll(api, version, { renames, spaces, spacesRenames });+ const files = renderAll(api, version, { renames });const pageIssues = pageProblems(files);if (pageIssues.length) {for (const p of pageIssues) console.error(` ${p}`);diff --git a/scripts/docs-generators/headers/cua-sdk/errors.md b/scripts/docs-generators/headers/cua-sdk/errors.mdindex 943cf9c051..ff303de042 100644--- a/scripts/docs-generators/headers/cua-sdk/errors.md+++ b/scripts/docs-generators/headers/cua-sdk/errors.md@@ -1 +1 @@-The Python high-level API raises its own exceptions (`SpacesdNotAvailable`, `PoolSpecMismatch`, ...), listed on [Python: configuration and errors](/cua-sdk/reference/python/configuration#errors). cua-spacesd answers RPCs with a `google.rpc.Status` carrying [`ErrorInfo`](/cua-sdk/reference/protocol/env-common#errorinfo); the SDK maps it to the variants below.+The Python high-level API raises its own exceptions (`SpacesdNotAvailable`, `PoolSpecMismatch`, ...), listed on [Python: configuration and errors](/cua-sdk/reference/python/runtimes#errors). cua-spacesd answers RPCs with a `google.rpc.Status` carrying [`ErrorInfo`](/cua-sdk/reference/protocol/env-system#errorinfo); the SDK maps it to the variants below.diff --git a/scripts/docs-generators/headers/cua-sdk/python/interfaces.md b/scripts/docs-generators/headers/cua-sdk/python/interfaces.mdindex 90c5fae9f1..15fff0607e 100644--- a/scripts/docs-generators/headers/cua-sdk/python/interfaces.md+++ b/scripts/docs-generators/headers/cua-sdk/python/interfaces.md@@ -1,6 +1,6 @@| Needs | Interfaces || --- | --- |-| Nothing in the guest | `sb.service(name)`, `sb.public_url()`, `sb.tunnel`, `sb.mcp()` ([services](/cua-sdk/reference/python/services)) |+| Nothing in the guest | `sb.service(name)`, `sb.public_url()`, `sb.tunnel`, `sb.mcp()` ([services](/cua-sdk/reference/python/sandbox#services-tunnels-and-mcp)) || cua-spacesd (the canonical `Image.linux()` has it) | `sb.shell`, `sb.files`, `sb.mouse`, `sb.keyboard`, `sb.screen`, `sb.clipboard`, `sb.terminal`, `sb.window`, `sb.apps` |Without cua-spacesd these fall back to the runtime's agentless path (QMP, VNC, SSH or ADB) where one exists, and otherwise raise `SpacesdNotAvailable`. Coordinates are screen pixels; input goes through Cua Driver in the guest.diff --git a/scripts/docs-generators/headers/cua-sdk/python/pool.md b/scripts/docs-generators/headers/cua-sdk/python/pool.mddeleted file mode 100644index 0043e9c686..0000000000--- a/scripts/docs-generators/headers/cua-sdk/python/pool.md+++ /dev/null@@ -1 +0,0 @@-Pools and `CloudOptions` belonged to Cua Cloud, which has ended. Every call here fails with a clear error, and the module is removed in `cua-sandbox` 0.10.0.diff --git a/scripts/docs-generators/headers/cua-sdk/rust/index.md b/scripts/docs-generators/headers/cua-sdk/rust/index.mdindex d40fde9722..fa53665a2d 100644--- a/scripts/docs-generators/headers/cua-sdk/rust/index.md+++ b/scripts/docs-generators/headers/cua-sdk/rust/index.md@@ -14,7 +14,7 @@ Inside this repository, use a path dependency (`path = "libs/cua/crates/cua-sdk"- All crates release in lockstep with the SDK version under one `cua-sdk-v<version>` tag. Mix crates from one tag only.- Stable: `cua-sdk` and the `cua-spacesd-client` client. Before 1.0 a minor release may break them, with a deprecated alias kept for at least one minor release where possible (for example `EnvClient`, now `SpacesdClient`). Patch releases never do.-- Unstable: `cua-fleet`, `cua-sandbox-core` and `cua-spaces` follow the Fleet and Spaces services and can change in any minor release. Items named `testing`, `conformance` or `coverage` are test support, not API.+- Unstable: `cua-sandbox-core` and `cua-spaces` follow the Spaces service and can change in any minor release, so they have no pages here: run `cargo doc -p cua-spaces --open` in `libs/cua` to read them. Items named `testing`, `conformance` or `coverage` are test support, not API.- Not API: items hidden from these pages (`#[doc(hidden)]`), the UniFFI scaffolding (`uniffi_*`, `ffi_*`), and cargo features other than the defaults.-Other workspace crates (`cua-proto`, `cua-daemon`, `cua-vmm`, `cua-image`, the media crates, `cua-cli`) are implementation details. The Cua Spaces crates (`cua-spaces-ext`, `cua-spaces-ffi`, `cua-spaces-cli`, `cua-spaces-app-core`, `cua-teleport`, `cua-keyvault`, `cua-volume`) are source-available under FSL-1.1-MIT and not part of the SDK; the Swift API of the app export is on the [Cua Spaces app export pages](/cua-sdk/reference/spaces/app-core). the wire contract is the [protocol reference](/cua-sdk/reference/protocol). Each page shows item summaries and declarations; `cargo doc --open` in `libs/cua` has the full comments.+Other workspace crates (`cua-proto`, `cua-daemon`, `cua-vmm`, `cua-image`, the media crates, `cua-cli`) are implementation details. The Cua Spaces crates (`cua-spaces-ext`, `cua-spaces-ffi`, `cua-spaces-cli`, `cua-spaces-app-core`, `cua-teleport`, `cua-keyvault`, `cua-volume`) are source-available under FSL-1.1-MIT and not part of the SDK. The wire contract is the [protocol reference](/cua-sdk/reference/protocol). Each page shows item summaries and declarations; `cargo doc --open` in `libs/cua` has the full comments.diff --git a/scripts/docs-generators/proto.ts b/scripts/docs-generators/proto.tsindex 8643e023cb..456ed74e83 100644--- a/scripts/docs-generators/proto.ts+++ b/scripts/docs-generators/proto.ts@@ -118,9 +118,9 @@ export interface PageSpec {const ROUTE = '/cua-sdk/reference/protocol';const OUTPUT_DIR = path.join(DOCS_CONTENT, 'cua-sdk', 'reference', 'protocol');const GENERATOR = 'pnpm --dir docs docs:generate:cua-proto';-/** Keeps each page readable (the reference checklist caps pages at 5,000 words). */-export const MAX_WORDS = 5000;-export const MAX_BYTES = 60_000;+/** One page per service family, within the docs page budget (docs/scripts/page-budget.test.ts). */+export const MAX_WORDS = 12_000;+export const MAX_BYTES = 100_000;const PROTO_DIR = path.join(REPO_ROOT, 'libs', 'cua', 'proto');const LIB_RS = path.join(REPO_ROOT, 'libs', 'cua', 'crates', 'cua-proto', 'src', 'lib.rs');const VERSION_FILE = path.join(REPO_ROOT, 'libs', 'cua', 'VERSION');@@ -132,114 +132,54 @@ const VERSION_FILE = path.join(REPO_ROOT, 'libs', 'cua', 'VERSION');export const PAGES: PageSpec[] = [{slug: 'env-system',- title: 'System',- description: 'cua.env.v1 SystemService: capabilities, init, health, shutdown, viewer tickets and relay attach.',- intro: 'The handshake (`GetCapabilities`), session init, health, shutdown, viewer tickets and joining a relay (`AttachRelay`).',- files: ['cua/env/v1/system.proto'],- },- {- slug: 'env-diagnose',- title: 'Diagnose',- description: 'cua.env.v1 Diagnose: the image self-test report `SystemService.Diagnose` streams.',- intro: 'The report of the image self-test (`SystemService.Diagnose` / `DiagnoseOnce`): checks, their evidence and the summary.',- files: ['cua/env/v1/diagnose.proto'],- },- {- slug: 'env-common',- title: 'Shared types and errors',- description: 'The cua.env.v1 types every spacesd service shares: ErrorInfo, principals and geometry.',- intro: 'Errors (`google.rpc.Status` carrying `ErrorInfo`), principals and geometry, used by every `cua.env.v1` service.',- files: ['cua/env/v1/common.proto'],+ title: 'System, diagnostics and shared types',+ description:+ 'cua.env.v1 SystemService, the image self-test report, and the types every spacesd service shares: ErrorInfo, principals and geometry.',+ intro:+ 'The handshake (`GetCapabilities`), session init, health, shutdown, viewer tickets and joining a relay (`AttachRelay`); the report of the image self-test (`SystemService.Diagnose` / `DiagnoseOnce`); and the shared types: errors (`google.rpc.Status` carrying `ErrorInfo`), principals and geometry.',+ files: ['cua/env/v1/system.proto', 'cua/env/v1/diagnose.proto', 'cua/env/v1/common.proto'],},{slug: 'env-process',- title: 'Processes',- description: 'cua.env.v1 ProcessService: start, attach to, feed and signal guest processes.',- intro: 'Detached, reattachable guest processes with PTY support and bounded scrollback.',- files: ['cua/env/v1/process.proto'],- },- {- slug: 'env-filesystem',- title: 'Filesystem',+ title: 'Processes and files',description:- 'cua.env.v1 FilesystemService: stat, list, watch, read, chunked upload and signed URLs.',- intro: 'File and directory operations, watchers, chunked transfers and signed HTTP URLs.',- files: ['cua/env/v1/filesystem.proto'],+ 'cua.env.v1 ProcessService and FilesystemService: guest processes, and stat, list, watch, read, chunked upload and signed URLs.',+ intro:+ 'Detached, reattachable guest processes with PTY support and bounded scrollback; file and directory operations, watchers, chunked transfers and signed HTTP URLs.',+ files: ['cua/env/v1/process.proto', 'cua/env/v1/filesystem.proto'],},{slug: 'env-computer',- title: 'Computer and driver',+ title: 'Computer, windows and accessibility',description:- 'cua.env.v1 ComputerService and DriverService: screenshots, pointer, keyboard, clipboard, displays and Cua Driver tools.',+ 'cua.env.v1 ComputerService, DriverService, WindowsService and AccessibilityService: screenshots, input, clipboard, displays, Cua Driver tools, windows and the accessibility tree.',intro:'Desktop control. These services need the desktop provider; input goes through Cua Driver, which `DriverService` also exposes tool by tool.',- files: ['cua/env/v1/computer.proto', 'cua/env/v1/driver.proto'],- },- {- slug: 'env-windows',- title: 'Windows and accessibility',- description: 'cua.env.v1 WindowsService and AccessibilityService: list, watch and arrange windows, launch apps, and the accessibility tree.',- intro: 'Windows, app launch and the accessibility tree. These services need the desktop provider.',- files: ['cua/env/v1/windows.proto', 'cua/env/v1/accessibility.proto'],+ files: ['cua/env/v1/computer.proto', 'cua/env/v1/driver.proto', 'cua/env/v1/windows.proto', 'cua/env/v1/accessibility.proto'],},{slug: 'env-stream',- title: 'Streams and presence',- description:- 'cua.env.v1 StreamService and PresenceService: media sessions and multiplayer cursors.',- intro:- 'Media sessions (video and audio over the media wire, see `libs/cua/proto/MEDIA.md`) and presence for shared sessions.',- files: ['cua/env/v1/stream.proto', 'cua/env/v1/presence.proto'],- },- {- slug: 'env-teleport-tunnel',- title: 'Teleport, tunnels and the volume',- description:- 'cua.env.v1 TeleportService, TunnelService and VolumeService: receiving teleported sessions and files, port forwards, hotspots and the guest mount of Cua Volume.',- intro:- 'The receiving side of teleport (sending lives in the cua SDK), TCP port forwards, the reverse-SOCKS hotspot, and the guest mount of Cua Volume served by the client.',- files: ['cua/env/v1/teleport.proto', 'cua/env/v1/tunnel.proto', 'cua/env/v1/volume.proto'],- },- {- slug: 'env-host-spaces',- title: 'Host Spaces',- description:- 'cua.env.v1 HostSpacesService: Spaces a host creates for its owner\'s devices through the relay.',- intro:- 'Spaces a machine set up with `cua host setup --provide-spaces` creates for its owner\'s enrolled devices: settings, capacity, create and delete. The host\'s cua-spacesd forwards each call to its cua daemon.',- files: ['cua/env/v1/host.proto'],- },- {- slug: 'daemon-sandboxes',- title: 'Daemon: sandboxes',+ title: 'Streams, teleport, tunnels and host Spaces',description:- 'cua.daemon.v1 SandboxService: the local cua daemon API for sandboxes in every location.',+ 'cua.env.v1 StreamService, PresenceService, TeleportService, TunnelService, VolumeService and HostSpacesService.',intro:- 'The local `cua daemon` API (a Unix socket on the host, not cua-spacesd): sandbox lifecycle across locations.',- files: ['cua/daemon/v1/sandboxes.proto'],+ 'Media sessions (video and audio over the media wire, see `libs/cua/proto/MEDIA.md`) and presence; the receiving side of teleport (sending lives in the cua SDK), TCP port forwards, the reverse-SOCKS hotspot and the guest mount of Cua Volume; and the Spaces a machine set up with `cua host setup --provide-spaces` creates for its owner\'s enrolled devices.',+ files: [+ 'cua/env/v1/stream.proto',+ 'cua/env/v1/presence.proto',+ 'cua/env/v1/teleport.proto',+ 'cua/env/v1/tunnel.proto',+ 'cua/env/v1/volume.proto',+ 'cua/env/v1/host.proto',+ ],},{- slug: 'daemon-runtimes',- title: 'Daemon: local runtimes',- description:- 'cua.daemon.v1 RuntimeService: the local engines and images the cua daemon orchestrates.',+ slug: 'daemon',+ title: 'Cua daemon',+ description: 'cua.daemon.v1: the local cua daemon API for sandboxes, local runtimes, Spaces, its identity and the media bridge.',intro:- 'The local runtimes (gVisor, runc, QEMU, Lume) and images the `cua daemon` orchestrates.',- files: ['cua/daemon/v1/runtime.proto'],- },- {- slug: 'daemon-spaces',- title: 'Daemon: Spaces',- description: 'cua.daemon.v1 SpaceService: Spaces and the hosts that provide them, through the local cua daemon.',- intro: 'Spaces through the local `cua daemon`: create, list, power, delete, and the machines that provide Spaces.',- files: ['cua/daemon/v1/spaces.proto'],- },- {- slug: 'daemon-service',- title: 'Daemon: service',- description: 'cua.daemon.v1 DaemonService: the local cua daemon identity and the loopback media bridge for webviews.',- intro: 'The `cua daemon` identity (`GetInfo`) and the loopback media bridge for webviews.',- files: ['cua/daemon/v1/daemon.proto'],+ 'The local `cua daemon` API (a Unix socket on the host, not cua-spacesd): sandbox lifecycle across locations, the local runtimes and images it orchestrates, Spaces and the machines that provide them, its identity (`GetInfo`) and the loopback media bridge for webviews.',+ files: ['cua/daemon/v1/sandboxes.proto', 'cua/daemon/v1/runtime.proto', 'cua/daemon/v1/spaces.proto', 'cua/daemon/v1/daemon.proto'],},];@@ -620,9 +560,9 @@ class Renderer {'## Errors','','Errors are `google.rpc.Status` with typed details: spacesd packs [`ErrorInfo`](' +- `${ROUTE}/env-common#errorinfo` ++ `${ROUTE}/env-system#errorinfo` +') and the daemon packs [`DaemonErrorInfo`](' +- `${ROUTE}/daemon-service#daemonerrorinfo` ++ `${ROUTE}/daemon#daemonerrorinfo` +').','');diff --git a/scripts/docs-generators/python-sdk.test.ts b/scripts/docs-generators/python-sdk.test.tsindex e9e13ccf04..07bfed737f 100644--- a/scripts/docs-generators/python-sdk.test.ts+++ b/scripts/docs-generators/python-sdk.test.ts@@ -75,8 +75,8 @@ test('classes render a signature fence, attributes table and one heading per mettest('every page section maps to a unique anchor on its page', () => {const anchors = sandboxAnchors();- assert.equal(anchors.get('Image'), '/cua-sdk/reference/python/image#image');- assert.equal(anchors.get('Pool'), '/cua-sdk/reference/python/pool#pool');+ assert.equal(anchors.get('Image'), '/cua-sdk/reference/python/sandbox#image');+ assert.equal(anchors.get('Pool'), undefined);assert.equal(anchors.get('Shell'), '/cua-sdk/reference/python/interfaces#shell');const names = SANDBOX_PAGES.flatMap((p) =>p.sections.flatMap((s) => s.objects.map((o) => o.split('.').at(-1)))diff --git a/scripts/docs-generators/python-sdk.ts b/scripts/docs-generators/python-sdk.tsindex bbbb7b5cec..9faf1ec52a 100644--- a/scripts/docs-generators/python-sdk.ts+++ b/scripts/docs-generators/python-sdk.ts@@ -120,9 +120,9 @@ const PY_EXAMPLES = path.join(EXAMPLES_DIR, 'cua-sdk', 'python');export const SANDBOX_PAGES: PageSpec[] = [{file: 'sandbox',- title: 'Sandbox',+ title: 'Sandbox, images and services',description:- 'Sandbox, SandboxInfo, the sandbox() helper and the creation options of cua-sandbox.',+ 'Sandbox, the sandbox() helper and its creation options, the Image builder, and the services, tunnels and MCP endpoints of a sandbox.',intro:'The `Sandbox` class is the entry point of `cua-sandbox`: create, connect to, or reattach a sandbox, then use its interfaces.',sections: [@@ -145,7 +145,7 @@ export const SANDBOX_PAGES: PageSpec[] = [},{file: 'image',- title: 'Image',+ title: 'Images and registries',description: 'The Image builder, sidecar containers and registry credentials of cua-sandbox.',intro:'`Image` is an immutable, chainable description of what a sandbox boots. Builder methods return a new `Image`.',@@ -161,47 +161,6 @@ export const SANDBOX_PAGES: PageSpec[] = [},],},- {- file: 'pool',- title: 'Pool',- description: 'Pools, templates, sandbox specs and pool errors of cua-sandbox.',- intro:- '`Pool` keeps warm cloud capacity for a `SandboxSpec`. `Sandbox.create` uses shared capacity; a named pool is for dedicated capacity.',- sections: [- { title: 'Pools and templates', objects: [`${SB}.pool.Pool`, `${SB}.pool.Template`] },- {- title: 'Managed pools (cua_sandbox.pools)',- objects: [- `${SB}.pools`,- `${SB}.pools.list_pools`,- `${SB}.pools.list_claims`,- `${SB}.pools.gc`,- `${SB}.pools.gc_pools`,- `${SB}.pools.is_managed_pool_name`,- `${SB}.pools.ManagedPoolInfo`,- `${SB}.pools.ClaimInfo`,- `${SB}.pools.GcReport`,- ],- },- {- title: 'Specs',- objects: [- `${SB}.spec.SandboxSpec`,- `${SB}.spec.PoolOptions`,- `${SB}.spec.PoolExport`,- `${SB}.spec.generate_claim_token`,- ],- },- {- title: 'Errors',- objects: [- `${SB}.spec.PoolSpecMismatch`,- `${SB}.spec.ClaimSecretsNotDelivered`,- `${SB}.spec.PoolAccessDeniedError`,- ],- },- ],- },{file: 'interfaces',title: 'Interfaces',@@ -280,9 +239,9 @@ export const SANDBOX_PAGES: PageSpec[] = [},{file: 'runtimes',- title: 'Runtimes',+ title: 'Runtimes and configuration',description:- 'Local runtimes (Docker, QEMU, Lume, Hyper-V, Tart, Android emulator) and local support checks.',+ 'Local runtimes (Docker, QEMU, Lume, Hyper-V, Tart, Android emulator), support checks, configuration, sign-in and errors.',intro:'Local sandboxes run on a runtime the SDK picks for the image. Pass one explicitly to `Sandbox.create(..., runtime=...)` to override it.',sections: [@@ -580,25 +539,45 @@ export function renderObject(doc: PyDoc, opts: { hideInit?: boolean; examples?:}/** `name` -> `/cua-sdk/reference/python/<page>#<anchor>` for every documented object. */+/**+ * Pages rendered as a section of another page (file -> the page it joins),+ * so the Python reference stays a few pages within the page budget.+ * `Pool` and the managed pools belonged to Cua Cloud, which has ended; every+ * call raises, so they have no entry (the module goes in cua-sandbox 0.10.0).+ */+export const PY_MERGED: Record<string, string> = { image: 'sandbox', services: 'sandbox', configuration: 'runtimes' };++/** Modules of the ended Cua Cloud pools, left out of the reference. */+export const ENDED_MODULES = [`${SB}.pool`, `${SB}.pools`, `${SB}.spec`];++/** Whether `cua_sandbox` imports `name` from an ended module. */+export function isEnded(module: PyModuleDoc, name: string): boolean {+ const from = (module.imports[name] ?? '').replace(/^\.+/, '').replace(new RegExp(`^${SB}\\.`), '');+ return ENDED_MODULES.some((m) => {+ const short = m.slice(SB.length + 1);+ return name === short || from === short || from.startsWith(`${short}.`);+ });+}++/** The file a page is written to. */+export function pageFileOf(file: string): string {+ return PY_MERGED[file] ?? file;+}+export function sandboxAnchors(pages: PageSpec[] = SANDBOX_PAGES): Map<string, string> {const anchors = new Map<string, string>();for (const page of pages) {for (const section of page.sections) {for (const obj of section.objects) {const name = obj.split('.').at(-1)!;- anchors.set(name, `${SANDBOX_ROUTE}/${page.file}#${slug(name)}`);+ anchors.set(name, `${SANDBOX_ROUTE}/${pageFileOf(page.file)}#${slug(name)}`);}}}return anchors;}-export function renderSandboxPage(- page: PageSpec,- docs: Map<string, PyDoc>,- version: string,- examples?: ExampleSet-): string {+function sandboxSectionBody(page: PageSpec, docs: Map<string, PyDoc>, version: string, examples?: ExampleSet): string[] {const body: string[] = [escapeMdxText(page.intro), ''];const header = readHeader(`cua-sdk/python/${page.file}.md`, { version });if (header) body.push(header, '');@@ -611,11 +590,24 @@ export function renderSandboxPage(body.push(...renderObject(doc, { hideInit: section.hideInit, examples }));}}+ return body;+}++/** A page and the pages `PY_MERGED` into it, each under a `##` heading of its title. */+export function renderSandboxPage(+ page: PageSpec,+ docs: Map<string, PyDoc>,+ version: string,+ examples?: ExampleSet,+ merged: PageSpec[] = []+): string {+ const body = sandboxSectionBody(page, docs, version, examples);+ for (const part of merged) body.push(`## ${part.title}`, '', ...sandboxSectionBody(part, docs, version, examples));return renderPage({title: page.title,description: page.description,generator: GENERATOR,- source: `griffe over libs/python/cua-sandbox/cua_sandbox (${SB}.${page.file === 'sandbox' ? 'sandbox' : page.file})`,+ source: `griffe over libs/python/cua-sandbox/cua_sandbox (${[page, ...merged].map((p) => `${SB}.${p.file}`).join(', ')})`,version: `cua-sandbox ${version}`,components: body.some((l) => l.startsWith('<Tabs')) ? ['Tabs'] : [],body: body.join('\n'),@@ -624,7 +616,7 @@ export function renderSandboxPage(export function renderReexports(module: PyModuleDoc, documented: Set<string>): string {const rows = module.all- .filter((name) => !documented.has(name))+ .filter((name) => !documented.has(name) && !isEnded(module, name)).map((name) => [name, module.imports[name] ?? module.path ?? '']);if (!rows.length) return '';const byModule = new Map<string, string[]>();@@ -654,13 +646,13 @@ export function renderCuaPython(const root = modules.get('cua')!;const body: string[] = [];body.push(- 'The high-level Python API: `cua_sandbox` (`Sandbox`, `Image`, the computer interfaces, `Pool`) and the helpers the `cua` package adds. It is a thin layer over the [Cua SDK objects](/cua-sdk/reference): the cloud, the local runtimes and cua-spacesd all go through `cua`, whose generated binding (`cua._native`) those pages document.',+ 'The high-level Python API: `cua_sandbox` (`Sandbox`, `Image`, the computer interfaces) and the helpers the `cua` package adds. It is a thin layer over the [Cua SDK objects](/cua-sdk/reference): the cloud, the local runtimes and cua-spacesd all go through `cua`, whose generated binding (`cua._native`) those pages document.','');const header = readHeader('cua-sdk/python/index.md', { version, sandboxVersion });if (header) body.push(header, '');body.push('## Pages', '', '| Page | Covers |', '| --- | --- |');- for (const page of SANDBOX_PAGES) {+ for (const page of SANDBOX_PAGES.filter((p) => !PY_MERGED[p.file])) {body.push(`| [${escapeTableCell(page.title)}](${SANDBOX_ROUTE}/${page.file}) | ${escapeTableCell(page.description)} |`);}body.push('');@@ -675,7 +667,7 @@ export function renderCuaPython(2,0,'Without `cua[sandbox]`, `cua.Image` is this helper. With it installed, `cua.Image` is the richer [cua_sandbox Image](' +- `${SANDBOX_ROUTE}/image#image).`,+ `${SANDBOX_ROUTE}/sandbox#image).`,'');body.push(...image);@@ -753,9 +745,11 @@ export function buildFiles(const set: ExampleSet = { examples, used: new Set() };const sandboxVersion = readVersion('libs/python/cua-sandbox/cua_sandbox/__init__.py');- for (const page of SANDBOX_PAGES) {- let content = renderSandboxPage(page, docs, sandboxVersion, set);- if (page.file === 'pool') {+ const homes = SANDBOX_PAGES.filter((p) => !PY_MERGED[p.file]);+ for (const page of homes) {+ const merged = SANDBOX_PAGES.filter((p) => PY_MERGED[p.file] === page.file);+ let content = renderSandboxPage(page, docs, sandboxVersion, set, merged);+ if (page.file === 'sandbox') {const reexports = renderReexports(modules.get(SB)!, new Set(anchors.keys()));if (reexports) content = content.replace(/\n$/, `\n\n${reexports}\n`);}@@ -763,7 +757,7 @@ export function buildFiles(}files.set(path.join(SANDBOX_API_DIR, 'meta.json'),- metaJson('Python high-level API', SANDBOX_PAGES.map((p) => p.file))+ metaJson('Python high-level API', homes.map((p) => p.file)));files.set(CUA_PYTHON_PAGE,@@ -781,8 +775,9 @@ export function assertCoverage(extracted: Extracted): void {const root = extracted.modules.find((m) => m.path === SB);if (!root) throw new Error('cua_sandbox module was not extracted');const documented = new Set(sandboxAnchors().keys());+ const ended = (n: string) => isEnded(root, n);const missing = root.all.filter(- (n) => !documented.has(n) && !root.imports[n]?.startsWith('fleet_sdk')+ (n) => !documented.has(n) && !root.imports[n]?.startsWith('fleet_sdk') && !ended(n));if (missing.length) {throw new Error(diff --git a/scripts/docs-generators/runner.ts b/scripts/docs-generators/runner.tsindex c252ad98df..956de02d6b 100644--- a/scripts/docs-generators/runner.ts+++ b/scripts/docs-generators/runner.ts@@ -433,7 +433,7 @@ function testGeneratorRouting(config: Config): void {['libs/cua/crates/cua-spaces/src/client/model.rs','scripts/docs-generators/rustdoc-json/src/main.rs',- 'docs/content/docs/cua-sdk/reference/rust/cua-fleet.mdx',+ 'docs/content/docs/cua-sdk/reference/rust/cua-spacesd-client.mdx',],['cua-rust']);diff --git a/scripts/docs-generators/rust-crates.test.ts b/scripts/docs-generators/rust-crates.test.tsindex 4751e6c2e2..d13472a091 100644--- a/scripts/docs-generators/rust-crates.test.ts+++ b/scripts/docs-generators/rust-crates.test.ts@@ -4,6 +4,7 @@ import * as path from 'node:path';import test from 'node:test';import {+ CRATES,PAGES,assign,cleanSignature,@@ -17,9 +18,11 @@ import {type ItemDoc,} from './rust-crates';-const dump: Dump = JSON.parse(+const fixture: Dump = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures', 'rust-crates-dump.json'), 'utf-8'));+// The fixture also holds crates that have no pages (the unstable ones).+const dump: Dump = { ...fixture, crates: fixture.crates.filter((c) => CRATES.includes(c.name)) };test('every item lands on exactly one page of its crate', () => {const pages = assign(dump);@@ -30,8 +33,7 @@ test('every item lands on exactly one page of its crate', () => {assert.equal(slugOf('cua_sdk::Sandbox'), 'cua-sdk');// Unclaimed sources fall back to the crate's primary page.assert.equal(slugOf('cua_sdk::Stray'), 'cua-sdk');- assert.equal(slugOf('cua_spaces::client::model::Space'), 'cua-spaces-client');- assert.equal(slugOf('cua_spaces::mcp'), 'cua-spaces-agents-mcp');+ assert.ok(!fixture.crates.some((c) => c.name === 'cua-spaces') || !PAGES.some((p) => p.crate === 'cua-spaces'));});test('a crate without a page is an error, not silently dropped', () => {diff --git a/scripts/docs-generators/rust-crates.ts b/scripts/docs-generators/rust-crates.tsindex 79e8687a92..0e8f0d0da4 100644--- a/scripts/docs-generators/rust-crates.ts+++ b/scripts/docs-generators/rust-crates.ts@@ -94,10 +94,10 @@ export interface PageSpec {}/**- * The public crate set: `cua-sdk` (the Rust host API, the same objects the- * UniFFI bindings expose) plus the crates Rust hosts use directly next to it- * (`cua-spacesd-client`, `cua-fleet`, `cua-sandbox-core`, `cua-spaces`; see- * rust/index.mdx for the stability tiers).+ * The stable crates: `cua-sdk` (the Rust host API, the same objects the+ * UniFFI bindings expose) and `cua-spacesd-client`. The unstable crates+ * (`cua-sandbox-core`, `cua-spaces`) have no pages; rust/index.mdx points at+ * `cargo doc` for them (see its stability tiers).*/export const PAGES: PageSpec[] = [{@@ -116,44 +116,6 @@ export const PAGES: PageSpec[] = [sources: [],fallback: true,},- {- slug: 'cua-fleet',- crate: 'cua-fleet',- title: 'cua-fleet',- description: 'The Fleet (cloud sandboxes) crate: pools, claims, builds and claim secrets.',- sources: [],- fallback: true,- },- {- slug: 'cua-sandbox-core',- crate: 'cua-sandbox-core',- title: 'cua-sandbox-core',- description: 'The daemon-agnostic Sandbox over the Fleet, local and direct providers.',- sources: [],- fallback: true,- },- {- slug: 'cua-spaces',- crate: 'cua-spaces',- title: 'cua-spaces: registry and primitives',- description: 'The Spaces registry and primitives (files, exec, streams, presence, services, teleport, hotspot, relay).',- sources: [],- fallback: true,- },- {- slug: 'cua-spaces-client',- crate: 'cua-spaces',- title: 'cua-spaces: client',- description: 'The Spaces client: transports, model, control and teleport.',- sources: ['src/client/'],- },- {- slug: 'cua-spaces-agents-mcp',- crate: 'cua-spaces',- title: 'cua-spaces: agents and MCP',- description: 'Agents in Spaces and the Spaces MCP server (stdio and HTTP).',- sources: ['src/agents/', 'src/mcp/'],- },];export const CRATES = [...new Set(PAGES.map((p) => p.crate))];diff --git a/scripts/docs-generators/spaces.test.ts b/scripts/docs-generators/spaces.test.tsindex 02ce2e2a97..348b9c9a08 100644--- a/scripts/docs-generators/spaces.test.ts+++ b/scripts/docs-generators/spaces.test.ts@@ -1,21 +1,24 @@import assert from 'node:assert/strict';import * as fs from 'node:fs';import test from 'node:test';-import { SOURCES, errorKinds, paramsTable, readProtocol, renderAll, statedDefault, type Manifest, type Tool } from './spaces';+import { PAGES, SOURCES, errorKinds, pageOfCategory, paramsTable, readProtocol, renderAll, statedDefault, type Manifest, type Tool } from './spaces';const read = (p: string) => fs.readFileSync(p, 'utf-8');const manifest = (): Manifest => JSON.parse(read(SOURCES.manifest));-test('the checked-in contract renders one page per category, plus index and errors', () => {+test('the checked-in contract renders the index (with errors) and one page per category group', () => {const m = manifest();const files = renderAll(m, readProtocol(read(SOURCES.mcp), read(SOURCES.cliMcp)));const names = [...files.keys()].map((f) => f.split('/').pop());- assert.deepEqual(names, ['index.mdx', ...m.categories.map((c) => `${c.id}.mdx`), 'errors.mdx', 'meta.json']);- // Every tool is documented exactly once, under its category.+ assert.deepEqual(names, ['index.mdx', ...PAGES.map((p) => `${p.slug}.mdx`), 'meta.json']);+ const pages = pageOfCategory(m.categories);+ // Every tool is documented exactly once, on its category's page.for (const t of m.tools) {- const page = [...files].find(([f]) => f.endsWith(`/${t.category}.mdx`))![1];- assert.equal(page.split(`\n## ${t.name}\n`).length, 2, t.name);+ const page = [...files].find(([f]) => f.endsWith(`/${pages.get(t.category)}.mdx`))![1];+ assert.equal(page.split(`\n### ${t.name}\n`).length, 2, t.name);}+ const index = [...files].find(([f]) => f.endsWith('/index.mdx'))![1];+ for (const k of m.error_kinds) assert.ok(index.includes(`\n#### ${k.kind}\n`), k.kind);for (const [, content] of files) assert.ok(content.length < 150_000);});diff --git a/scripts/docs-generators/spaces.ts b/scripts/docs-generators/spaces.tsindex a6bd86648f..cb1e51a2e8 100644--- a/scripts/docs-generators/spaces.ts+++ b/scripts/docs-generators/spaces.ts@@ -39,6 +39,48 @@ const OUT_DIR = path.join(DOCS_CONTENT, 'spaces', 'reference');const REGENERATE = 'pnpm --dir docs docs:generate:spaces';const R = (...p: string[]) => path.join(REPO_ROOT, ...p);+/**+ * The tool pages: each groups whole categories, in manifest order. Every+ * category lands on exactly one page; an unlisted one fails the generator.+ * Errors, Space ids and approval live on the index.+ */+export const PAGES: Array<{ slug: string; title: string; description: string; categories: string[] }> = [+ {+ slug: 'spaces',+ title: 'Spaces tools',+ description: 'Create, run, stream, share and serve from a Space: the Spaces tools with their parameters, results and errors.',+ categories: ['lifecycle', 'commands-and-files', 'streams-and-display', 'services', 'hotspot', 'sharing', 'cloud'],+ },+ {+ slug: 'agents',+ title: 'Agent, teleport and storage tools',+ description: 'Run agents in a Space, teleport apps, and use Keyvault and Cua Volume: the tools with their parameters, results and errors.',+ categories: ['agents', 'persistent-agents', 'teleport', 'keyvault', 'volume'],+ },+];++/** Category id -> the page that documents it. */+export function pageOfCategory(categories: Array<{ id: string }>): Map<string, string> {+ const out = new Map<string, string>();+ for (const page of PAGES)+ for (const id of page.categories) {+ if (out.has(id)) throw new Error(`category ${id} is on two pages`);+ out.set(id, page.slug);+ }+ for (const c of categories) if (!out.has(c.id)) throw new Error(`category ${c.id} is on no page in spaces.ts PAGES`);+ return out;+}++/** The heading id the docs renderer gives a plain-text heading (github-slugger). */+export function slugify(text: string): string {+ return text.toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu, '').replace(/\s/g, '-');+}++/** A tool's entry: `/spaces/reference/<page>#<tool>`. */+export function toolHref(pages: Map<string, string>, tool: { name: string; category: string }): string {+ return `/spaces/reference/${pages.get(tool.category)}#${tool.name}`;+}+export const SOURCES = {manifest: R('libs', 'cua', 'spaces-contract', 'manifest.json'),contract: R('libs', 'cua', 'crates', 'cua-spaces-contract', 'src', 'lib.rs'),@@ -171,12 +213,12 @@ export function errorKinds(tool: Tool): string[] {}function errorLink(kind: string): string {- return `[\`${kind}\`](/spaces/reference/errors#${kind})`;+ return `[\`${kind}\`](/spaces/reference#${kind})`;}function toolSection(tool: Tool, manifest: Manifest): string[] {const known = new Set(manifest.error_kinds.map((k) => k.kind));- const out = [`## ${tool.name}`, '', escapeMdxText(tool.description), ''];+ const out = [`### ${tool.name}`, '', escapeMdxText(tool.description), ''];if (tool.instructions) out.push(escapeMdxText(tool.instructions), '');const facts: Array<[string, string]> = [[@@ -198,31 +240,32 @@ function toolSection(tool: Tool, manifest: Manifest): string[] {facts.push(['Rust', codeCell(tool.rust_symbol)]);out.push('| | |', '| --- | --- |');for (const [k, v] of facts) out.push(`| ${k} | ${v.includes('`') ? v : escapeTableCell(v)} |`);- out.push('', '### Parameters', '', ...paramsTable(tool.input_schema));- out.push('### Result', '', escapeMdxText(tool.result), '');+ out.push('', '#### Parameters', '', ...paramsTable(tool.input_schema));+ out.push('#### Result', '', escapeMdxText(tool.result), '');const kinds = errorKinds(tool);for (const k of kinds) if (!known.has(k)) throw new Error(`${tool.name}: error kind ${k} is not in error_kinds`);- out.push('### Errors', '', kinds.map(errorLink).join(', '), '');+ out.push('#### Errors', '', kinds.map(errorLink).join(', '), '');if (tool.notes.length) {- out.push('### Notes', '');+ out.push('#### Notes', '');for (const n of tool.notes) out.push(`- ${escapeMdxText(n.replace(/\s*FRICTION\.md( §)?\s*\d+\.?/g, '').trim())}`);out.push('');}return out;}-function categoryPage(manifest: Manifest, cat: Manifest['categories'][number]): string {- const tools = manifest.tools.filter((t) => t.category === cat.id);- const body = [- '| Tool | Description |',- '| --- | --- |',- ...tools.map((t) => `| [\`${t.name}\`](#${t.name}) | ${escapeTableCell(t.description)} |`),- '',- ];- for (const t of tools) body.push(...toolSection(t, manifest));+function toolsPage(manifest: Manifest, page: (typeof PAGES)[number]): string {+ const cats = page.categories.map((id) => manifest.categories.find((c) => c.id === id)!);+ const body: string[] = [];+ for (const cat of cats) {+ const tools = manifest.tools.filter((t) => t.category === cat.id);+ body.push(`## ${cat.title}`, '', escapeMdxText(cat.description), '');+ body.push('| Tool | Description |', '| --- | --- |');+ body.push(...tools.map((t) => `| [\`${t.name}\`](#${t.name}) | ${escapeTableCell(t.description)} |`), '');+ for (const t of tools) body.push(...toolSection(t, manifest));+ }return renderPage({- title: cat.title,- description: cat.description,+ title: page.title,+ description: page.description,generator: REGENERATE,source: 'libs/cua/spaces-contract/manifest.json',version: manifest.contract_version,@@ -230,7 +273,8 @@ function categoryPage(manifest: Manifest, cat: Manifest['categories'][number]):});}-function indexPage(manifest: Manifest): string {+function indexPage(manifest: Manifest, protocol: Protocol): string {+ const pages = pageOfCategory(manifest.categories);const body: string[] = [`The Spaces contract: ${manifest.tool_count} tools with the same names and schemas on every surface: \`cua mcp\`, \`cua daemon mcp\` and the Spaces SDKs. Contract ${manifest.contract_version}, MCP protocol revision ${manifest.mcp_protocol_version}, transports ${manifest.transports.map((t) => `\`${t}\``).join(' and ')}.${manifest.experimental ? ' Experimental: names and shapes can change between minor versions.' : ''}`,'',@@ -238,11 +282,11 @@ function indexPage(manifest: Manifest): string {'',];for (const cat of manifest.categories) {- body.push(`### [${cat.title}](/spaces/reference/${cat.id})`, '', escapeMdxText(cat.description), '');+ body.push(`### [${cat.title}](/spaces/reference/${pages.get(cat.id)}#${slugify(cat.title)})`, '', escapeMdxText(cat.description), '');body.push('| Tool | Description | Effect |', '| --- | --- | --- |');for (const t of manifest.tools.filter((x) => x.category === cat.id))body.push(- `| [\`${t.name}\`](/spaces/reference/${cat.id}#${t.name}) | ${escapeTableCell(t.description)} | ${effect(t.annotations)}${t.metering === 'metered' ? ', metered' : ''} |`+ `| [\`${t.name}\`](${toolHref(pages, t)}) | ${escapeTableCell(t.description)} | ${effect(t.annotations)}${t.metering === 'metered' ? ', metered' : ''} |`);body.push('');}@@ -267,10 +311,7 @@ function indexPage(manifest: Manifest): string {`- Metered tools (${manifest.tools.filter((t) => t.metering === 'metered').map((t) => `\`${t.name}\``).join(', ')}) allocate or extend a billed cloud Space. Everything else is free.`,'- Agent runs are auto-approved inside the Space: the Space is the sandbox. A session teleport needs an approval minted from its manifest, and `acknowledge_sensitive` for sensitive items.','',- '## Errors',- '',- 'A failed call returns a tool result with `isError: true` and a machine `kind`. See [Errors](/spaces/reference/errors).',- ''+ ...errorsSection(manifest, protocol, pages));return renderPage({title: 'Reference',@@ -282,8 +323,10 @@ function indexPage(manifest: Manifest): string {});}-function errorsPage(manifest: Manifest, protocol: Protocol): string {+function errorsSection(manifest: Manifest, protocol: Protocol, pages: Map<string, string>): string[] {const body: string[] = [+ '## Errors',+ '','A tool that fails returns a normal result with `isError: true`, never a protocol error:','','```json',@@ -296,7 +339,7 @@ function errorsPage(manifest: Manifest, protocol: Protocol): string {'','Branch on `kind`; the message is for people. Every tool can return `invalid_argument`. A tool that takes `space` can also return `not_found` and `ambiguous_sandbox`; one with spacesd `requires`, `spacesd_not_available` and `capability_missing`; one with host requirements, `host_capability_missing`. Each tool lists the rest.','',- '## Error kinds',+ '### Error kinds','','| Kind | Meaning |','| --- | --- |',@@ -305,34 +348,29 @@ function errorsPage(manifest: Manifest, protocol: Protocol): string {];for (const k of manifest.error_kinds) {const tools = manifest.tools.filter((t) => t.errors.includes(k.kind));- body.push(`### ${k.kind}`, '', escapeMdxText(k.meaning), '', `Fix: ${escapeMdxText(k.fix)}`, '');+ body.push(`#### ${k.kind}`, '', escapeMdxText(k.meaning), '', `Fix: ${escapeMdxText(k.fix)}`, '');if (tools.length)body.push(- `Listed by ${tools.map((t) => `[\`${t.name}\`](/spaces/reference/${t.category}#${t.name})`).join(', ')}.`,+ `Listed by ${tools.map((t) => `[\`${t.name}\`](${toolHref(pages, t)})`).join(', ')}.`,'');}- body.push('## Protocol errors', '', 'JSON-RPC errors are about the message, not the tool.', '', '| Code | Name | When |', '| --- | --- | --- |');+ body.push('### Protocol errors', '', 'JSON-RPC errors are about the message, not the tool.', '', '| Code | Name | When |', '| --- | --- | --- |');for (const c of protocol.codes) body.push(`| \`${c.code}\` | \`${c.name}\` | ${escapeTableCell(c.doc)} |`);body.push('');- return renderPage({- title: 'Errors',- description: 'Tool error kinds and JSON-RPC protocol errors of the Spaces tools.',- generator: REGENERATE,- source: 'libs/cua/spaces-contract/manifest.json; cua-spaces src/mcp/mod.rs',- version: manifest.contract_version,- body: body.join('\n'),- });+ return body;}export function renderAll(manifest: Manifest, protocol: Protocol): Map<string, string> {const ids = new Set(manifest.categories.map((c) => c.id));for (const t of manifest.tools) if (!ids.has(t.category)) throw new Error(`${t.name}: unknown category ${t.category}`);+ pageOfCategory(manifest.categories);+ for (const page of PAGES)+ for (const id of page.categories) if (!ids.has(id)) throw new Error(`spaces.ts PAGES lists unknown category ${id}`);const files = new Map<string, string>();- files.set(path.join(OUT_DIR, 'index.mdx'), indexPage(manifest));- for (const cat of manifest.categories) files.set(path.join(OUT_DIR, `${cat.id}.mdx`), categoryPage(manifest, cat));- files.set(path.join(OUT_DIR, 'errors.mdx'), errorsPage(manifest, protocol));- files.set(path.join(OUT_DIR, 'meta.json'), metaJson('Reference', ['index', ...manifest.categories.map((c) => c.id), 'errors']));+ files.set(path.join(OUT_DIR, 'index.mdx'), indexPage(manifest, protocol));+ for (const page of PAGES) files.set(path.join(OUT_DIR, `${page.slug}.mdx`), toolsPage(manifest, page));+ files.set(path.join(OUT_DIR, 'meta.json'), metaJson('Reference', ['index', ...PAGES.map((p) => p.slug)]));return files;}diff --git a/scripts/docs-generators/typescript-sdk.ts b/scripts/docs-generators/typescript-sdk.tsindex b7ab4f8997..a8c5c16464 100644--- a/scripts/docs-generators/typescript-sdk.ts+++ b/scripts/docs-generators/typescript-sdk.ts@@ -56,7 +56,7 @@ export const MODULES: Array<{title: 'TypeScript additions',importPath: '@trycua/cua',description:- 'The hand-written helpers of @trycua/cua: embedded, connect, Image, probes, sidecars, specs and MCP.',+ 'The hand-written helpers of @trycua/cua (embedded, connect, Image, probes, sidecars, specs, MCP), and the Spaces transport and host modules.',},{entry: 'spaces/index.ts',@@ -85,6 +85,12 @@ export const MODULES: Array<{},];+/**+ * Modules rendered as a section of another module's page (page -> the page it+ * joins), so the TypeScript reference stays two pages within the page budget.+ */+export const TS_MERGED: Record<string, string> = { 'spaces-transport': 'index', 'spaces-host': 'index' };+/** Options passed to typedoc (and typedoc-plugin-markdown). */export function typedocOptions(outDir: string, plugin: string): Record<string, unknown> {return {@@ -154,7 +160,8 @@ async function runTypedoc(outDir: string): Promise<void> {function routeFor(file: string): string | undefined {const m = MODULES.find((mod) => mod.typedocFile === file);if (!m) return undefined;- return m.page === 'index' ? ROUTE : `${ROUTE}/${m.page}`;+ const page = TS_MERGED[m.page] ?? m.page;+ return page === 'index' ? ROUTE : `${ROUTE}/${page}`;}/**@@ -278,32 +285,40 @@ export function dropTableColumn(markdown: string, header: string): string {}export function buildPages(typedocDir: string, version: string): Map<string, string> {+ const homes = MODULES.filter((m) => !TS_MERGED[m.page]);+ const intro = (m: (typeof MODULES)[number]) =>+ `Import from \`${m.importPath}\`.`;const bodies = new Map<string, string>();- for (const m of MODULES) {- const source = path.join(typedocDir, ...m.typedocFile.split('/'));- if (!fs.existsSync(source)) throw new Error(`typedoc produced no ${m.typedocFile}`);- bodies.set(- routeFor(m.typedocFile)!,- postProcess(fs.readFileSync(source, 'utf-8'), m.typedocFile)- );+ for (const home of homes) {+ const parts = [home, ...MODULES.filter((m) => TS_MERGED[m.page] === home.page)];+ const sections = parts.map((m, i) => {+ const source = path.join(typedocDir, ...m.typedocFile.split('/'));+ if (!fs.existsSync(source)) throw new Error(`typedoc produced no ${m.typedocFile}`);+ const body = postProcess(fs.readFileSync(source, 'utf-8'), m.typedocFile);+ const header = readHeader(`cua-sdk/typescript/${m.page}.md`, { version });+ // The page's own module first; each merged module under a heading of its import path.+ const lead = i === 0 ? [] : [`## ${m.importPath}`, '', `${intro(m)} ${m.description}`];+ return [...lead, header, body].filter(Boolean).join('\n\n');+ });+ bodies.set(routeFor(home.typedocFile)!, sections.join('\n\n'));}const fixed = fixFragments(bodies);const files = new Map<string, string>();- for (const m of MODULES) {- const intro =- `Import from \`${m.importPath}\`. This page covers the hand-written TypeScript layer; ` +- 'the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per object in the ' ++ for (const m of homes) {+ const lead =+ `${intro(m)} This page covers the hand-written TypeScript layer; ` ++ 'the generated native binding (sandboxes, guest, fleet, spaces objects) is documented per module in the ' +'[Cua SDK reference](/cua-sdk/reference).';- const header = readHeader(`cua-sdk/typescript/${m.page}.md`, { version });+ const merged = MODULES.filter((x) => TS_MERGED[x.page] === m.page);files.set(path.join(OUTPUT_DIR, `${m.page}.mdx`),renderPage({title: m.title,description: m.description,generator: 'pnpm --dir docs docs:generate:cua-sdk-ts',- source: `typedoc + typedoc-plugin-markdown over libs/cua/typescript/src/${m.entry}`,+ source: `typedoc + typedoc-plugin-markdown over ${[m, ...merged].map((x) => `libs/cua/typescript/src/${x.entry}`).join(', ')}`,version: `@trycua/cua ${version}`,- body: [intro, header, fixed.get(routeFor(m.typedocFile)!)].filter(Boolean).join('\n\n'),+ body: [lead, fixed.get(routeFor(m.typedocFile)!)].filter(Boolean).join('\n\n'),}));}@@ -311,7 +326,7 @@ export function buildPages(typedocDir: string, version: string): Map<string, strpath.join(OUTPUT_DIR, 'meta.json'),metaJson('TypeScript additions',- MODULES.map((m) => m.page).filter((p) => p !== 'index')+ homes.map((m) => m.page).filter((p) => p !== 'index')));return files;