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.
The picker lists Teleport.catalog entries, reviews a Teleport.plan with its consent items, and follows the run. The transfer and drag overlays show a teleport in progress.
AppEntrySection record#
Returned by app_picker_sections .
Field Type Default Description titleString"Recent", "Apps", "Not available". entriesVec<AppCatalogEntry>Entries.
AppReviewView record#
Returned by app_picker_review .
Field Type Default Description titleString"Teleport Slack to Aurora". itemsVec<AppConsentItem>The consent lines. stepsVec<AppPlanStepView>Plan steps. needs_acknowledgement / needsAcknowledgementboolThe secrets checkbox shows. acknowledgedboolChecked. offers_save_to_keyvault / offersSaveToKeyvaultboolThe "Save to Keyvault" checkbox shows (a sensitive plan only: there is nothing to keep sealed otherwise). save_to_keyvault / saveToKeyvaultboolChecked. needs_relay_plaintext_acknowledgement / needsRelayPlaintextAcknowledgementboolThe 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 / acknowledgedRelayPlaintextboolChecked. can_confirm / canConfirmbool"Teleport" is enabled. leaves_text / leavesTextOption<String>"12 MB leaves this Mac" (none when nothing leaves). warningsVec<String>Caveats.
AppPlanStepView record#
Field Type Default Description kindStringinstall, files, state, launch.summaryStringOne line.
AppInstallCuaPrompt record#
Field Type Default Description installedboolCua is installed but not running. titleStringTitle. messageStringOne line. action_label / actionLabelStringButton. urlStringButton target: always one of the constants, never from the error.
AppCatalogEntry record#
Returned by app_catalog_entries_from_json , app_catalog_entry .
Field Type Default Description idStringId. nameStringName. host_path / hostPathOption<String>Bundle path. host_app_id / hostAppIdOption<String>Bundle id. versionOption<String>Version. capabilityAppTeleportCapabilityCapability. reasonOption<String>Why unsupported, or a caveat. movesVec<AppTeleportMove>Offered moves, UI order. provider_id / providerIdOption<String>Provider id. sensitive_groups / sensitiveGroupsVec<AppSensitiveGroup>The opt-in groups the signed-in state move offers, UI order. install_source / installSourceOption<String>manifest, image, space.install_id / installIdOption<String>Installable id. install_version / installVersionOption<String>Installable version. launch_bin / launchBinOption<String>Binary. last_used_ms / lastUsedMsOption<i64>Last used (recents). jsonStringThe SDK's JSON for this entry.
AppConsentItem record#
Field Type Default Description kindAppConsentKindKind. keyStringStable key. labelStringLabel. detailStringDetail. bytesu64Bytes that leave. sensitiveboolCredentials, cookies, tokens.
AppDragOverlayState record#
Field Type Default Description phaseAppDragOverlayPhasePhase. window_id / windowIdOption<u32>CoreGraphics id of the dragged window. app_name / appNameOption<String>The dragged app's name. target_space_id / targetSpaceIdOption<String>The tile under the cursor (selector only). ghostOption<String>The captured ghost (a data URL or a shell-local image key).
AppDragOverlayTransition record#
AppPickerPrimary record#
Returned by app_picker_primary .
Field Type Default Description labelString"Teleport" / "Stream". actionAppPickerActionAction. enabledboolEnabled.
AppPickerState record#
Returned by app_picker_initial , app_picker_reduce .
Field Type Default Description stepAppPickerStepStep. space_name / spaceNameStringThe target Space's name. entriesOption<Vec<AppCatalogEntry>>The catalog, once loaded. queryStringSearch. selected_id / selectedIdOption<String>Highlighted app. entryOption<AppCatalogEntry>The chosen app. movesOption<AppTeleportMove>What moves. filesVec<String>Chosen files. sensitiveVec<AppSensitiveGroup>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. planOption<AppTeleportPlan>The plan under review. acknowledgedboolSecrets acknowledged. save_to_keyvault / saveToKeyvaultbool"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 / acknowledgedRelayPlaintextboolPlan.relay_unsealed's warning acknowledged (S1).eventsVec<AppTeleportRunEvent>Run events (last MAX_EVENTS). reportOption<AppTeleportRunReport>The run's report. errorOption<String>Error text. install_prompt / installPromptOption<AppInstallCuaPrompt>The "needs the Cua app" prompt. error_back / errorBackAppPickerStepWhere Back from an error goes.
AppTeleportConsent record#
Returned by app_picker_consent .
Field Type Default Description approvedboolConfirmed. acknowledge_sensitive / acknowledgeSensitiveboolSecrets acknowledged. save_to_keyvault / saveToKeyvaultbool"Save to Keyvault" checked. acknowledge_relay_plaintext / acknowledgeRelayPlaintextboolPlan.relay_unsealed's warning acknowledged (S1).
AppTeleportPlan record#
Returned by app_teleport_plan , app_teleport_plan_from_json .
Field Type Default Description appAppCatalogEntryThe app. space_id / spaceIdStringTarget Space. movesAppTeleportMoveWhat moves. stepsVec<AppPlanStepView>Steps. consentVec<AppConsentItem>Consent lines. sensitiveboolAny line is a secret. total_bytes / totalBytesu64Bytes that leave this machine. warningsVec<String>Caveats. relay_unsealed / relayUnsealedboolThis 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). jsonStringThe SDK's JSON for this plan.
AppTeleportRunEvent record#
Field Type Default Description stepu32Step index. stepsu32Steps. kindStringStep kind. phaseAppTeleportRunPhasePhase. detailStringDetail. done_bytes / doneBytesu64Bytes done. total_bytes / totalBytesu64Bytes total.
AppTeleportRunReport record#
Field Type Default Description app_id / appIdStringApp id. installedVec<String>Installed. sentVec<String>Sent. importedVec<String>Imported. skippedVec<String>Skipped. launchedboolLaunched.
AppTransferOverlayState record#
Returned by app_transfer_reduce .
Field Type Default Description phaseAppTransferPhasePhase. app_name / appNameStringApp being teleported. messageOption<String>Failure reason. sent_bytes / sentBytesOption<f64>Bytes sent. total_bytes / totalBytesOption<f64>Total bytes.
AppTransferSignal record#
Field Type Default Description statusAppTransferStatusStatus. app_name / appNameOption<String>App name. messageOption<String>Message. sent_bytes / sentBytesOption<f64>Bytes sent. total_bytes / totalBytesOption<f64>Total bytes.
AppConsentKind enum#
Swift Rust
.install
.file
.folder
.state
.secret
Variant Description InstallAn install into the Space. FileA file that leaves this machine. FolderA folder that leaves this machine. StateApp state that leaves this machine. SecretA secret that leaves this machine.
AppDragOverlayEffect enum#
Swift Rust
. capture ( windowId : UInt32 ? )
. commit ( spaceId : String )
Variant Description CaptureCapture the ghost (needs Screen Recording; none is fine). Fields: window_id: Option<u32> CommitTeleport to this Space. Fields: space_id: String
AppDragOverlayEvent enum#
Swift Rust
. start ( windowId : UInt32 ? , appName : String ? )
.enterNotch
.leaveNotch
. over ( spaceId : String )
.out
. ghostReady ( ghost : String ? )
. drop ( spaceId : String ? )
.cancel
Variant Description StartA supported window drag began. Fields: window_id: Option<u32>, app_name: Option<String> EnterNotchThe cursor reached the notch box. LeaveNotchThe cursor left the selector. OverOver a Space tile. Fields: space_id: String OutOff every tile. GhostReadyThe ghost capture finished. Fields: ghost: Option<String> DropReleased; the tile under the cursor, if any. Fields: space_id: Option<String> CancelAbort.
AppDragOverlayPhase enum#
Variant Description IdleNothing showing. PromptThe "Teleport to Cua" box. SelectorThe Space tiles as drop targets.
AppPickerAction enum#
Swift Rust
.teleport
.streamRemote
.streamLocalSoon
Variant Description TeleportTeleport the app. StreamRemoteStream the remote window here. StreamLocalSoonStreaming a local window is not built yet: an honest notice.
AppPickerEvent enum#
Swift Rust
. 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 )
.confirm
. progress ( event : AppTeleportRunEvent)
. finished ( report : AppTeleportRunReport)
.back
Variant Description LoadedThe catalog arrived. Fields: entries: Vec<AppCatalogEntry> FailedSomething failed. Fields: message: String, cause_texts: Vec<String>, cause_installed: bool QuerySearch. Fields: query: String SelectHighlight. Fields: id: String ChooseOpen the options for the highlighted (or given) app. Fields: id: Option<String> PreselectStart on an app (a drop or a window drag). Fields: entry: AppCatalogEntry, files: Vec<String> MoveWhat moves. Fields: moves: AppTeleportMove FilesAdd files. Fields: files: Vec<String> RemoveFileRemove a file. Fields: path: String SensitiveAn opt-in checkbox ("Keep me signed in", "Saved passwords", ...). Fields: group: AppSensitiveGroup, value: bool PlanPlan. PlannedThe plan arrived. Fields: plan: AppTeleportPlan AcknowledgeThe secrets checkbox. Fields: value: bool SaveToKeyvaultThe "Save to Keyvault" checkbox. Fields: value: bool AcknowledgeRelayPlaintextThe relay-plaintext warning's checkbox (S1). Fields: value: bool ConfirmConfirm the review. ProgressA run event. Fields: event: AppTeleportRunEvent FinishedThe run finished. Fields: report: AppTeleportRunReport BackBack.
AppPickerStep enum#
Swift Rust
.loading
.pick
.options
.planning
.consent
.running
.done
. error
Variant Description LoadingLoading the catalog. PickChoosing an app. OptionsChoosing what moves. PlanningPlanning. ConsentReviewing the consent list. RunningRunning. DoneDone. ErrorFailed.
AppPickerTab enum#
Variant Description SpaceThis machine's windows, teleported into the Space. ThisMacThe Space's windows, streamed here.
AppTeleportCapability enum#
Swift Rust
.full
.installOnly
.unsupported
Variant Description FullApp and signed-in state. InstallOnlyApp, empty or with files. UnsupportedNot available.
AppTeleportMove enum#
Swift Rust
.appOnly
.appWithFiles
.appWithState
Variant Description AppOnlyJust the app. AppWithFilesThe app with files or folders. AppWithStateThe app with its signed-in state.
AppTeleportRunPhase enum#
Swift Rust
.started
.progress
.finished
.failed
.done
Variant Description StartedA step started. ProgressBytes moved. FinishedA step finished. FailedA step failed. DoneAll done.
AppTransferPhase enum#
Variant Description ActiveUploading. ErrorFailed.
AppTransferStatus enum#
Swift Rust
. start
.progress
.done
. error
Variant Description StartBegan (or retried). ProgressBytes moved. DoneFinished. ErrorFailed.
app_catalog_entries_from_json#
Picker catalog entries from JSON (fixtures, parity flows).
Swift Rust
func appCatalogEntriesFromJson ( json : String ) throws -> [AppCatalogEntry]
Parameter Type Default jsonStringrequired
Returns Vec<AppCatalogEntry> ยท Raises CuaError
app_catalog_entry#
A catalog row from Teleport.catalog, as the picker's entry.
Swift Rust
func appCatalogEntry ( entry : TeleportCatalogEntry) -> AppCatalogEntry
Returns AppCatalogEntry
app_picker_can_plan#
Planning is possible.
Swift Rust
func appPickerCanPlan ( state : AppPickerState) -> Bool
Returns bool
app_picker_consent#
The consent the confirmed review carries.
Swift Rust
func appPickerConsent ( state : AppPickerState) -> AppTeleportConsent
Returns AppTeleportConsent
app_picker_initial#
"Teleport an app..." first state.
Swift Rust
func appPickerInitial ( spaceName : String ) -> AppPickerState
Parameter Type Default space_nameStringrequired
Returns AppPickerState
app_picker_plan_sensitive#
The groups the plan asks for (TeleportPlanOptions.sensitive_groups).
Swift Rust
func appPickerPlanSensitive ( state : AppPickerState) -> [AppSensitiveGroup]
Returns Vec<AppSensitiveGroup>
app_picker_primary#
The primary button of the window picker.
Swift Rust
func appPickerPrimary ( tab : AppPickerTab, selectedSupported : Bool ? ) -> AppPickerPrimary
Parameter Type Default tabAppPickerTabrequired selected_supportedOption<bool>required
Returns AppPickerPrimary
app_picker_progress#
Run progress in [0, 1].
Swift Rust
func appPickerProgress ( state : AppPickerState) -> Double
Returns f64
app_picker_reduce#
Advances the picker.
Swift Rust
func appPickerReduce ( state : AppPickerState, event : AppPickerEvent) -> AppPickerState
Returns AppPickerState
app_picker_review#
The review screen, when a plan is under review.
Swift Rust
func appPickerReview ( state : AppPickerState) -> AppReviewView ?
Returns Option<AppReviewView>
app_picker_sections#
The pick list's sections.
Swift Rust
func appPickerSections ( state : AppPickerState) -> [AppEntrySection]
Returns Vec<AppEntrySection>
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.
Swift Rust
func appPickerSensitiveOptions ( state : AppPickerState) -> [AppSensitiveOption]
Returns Vec<AppSensitiveOption>
app_teleport_plan#
A plan from Teleport.plan, as the review's plan.
Swift Rust
func appTeleportPlan ( plan : TeleportPlan) -> AppTeleportPlan
Returns AppTeleportPlan
app_teleport_plan_from_json#
A teleport plan from JSON (fixtures, parity flows).
Swift Rust
func appTeleportPlanFromJson ( json : String ) throws -> AppTeleportPlan
Parameter Type Default jsonStringrequired
Returns AppTeleportPlan ยท Raises CuaError
app_transfer_reduce#
Advances the transfer overlay (None hides it).
Swift Rust
func appTransferReduce ( state : AppTransferOverlayState ? , signal : AppTransferSignal) -> AppTransferOverlayState ?
Returns Option<AppTransferOverlayState>
app_transfer_title#
The transfer overlay's title.
Swift Rust
func appTransferTitle ( state : AppTransferOverlayState) -> String
Returns String