Teleport picker
The teleport picker and its catalog.
The teleport picker and its catalog.
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 and drives the steps up to the review. The overlays that show a teleport in progress are on Teleport transfer and drag.
AppEntrySection record#Returned by app_picker_sections.
| Field | Type | Default | Description |
|---|---|---|---|
title | String | "Recent", "Apps", "Not available". | |
entries | Vec<AppCatalogEntry> | Entries. |
AppCatalogEntry record#Returned by app_catalog_entries_from_json, 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 | Capability. | |
reason | Option<String> | Why unsupported, or a caveat. | |
moves | Vec<AppTeleportMove> | Offered moves, UI order. | |
provider_id / providerId | Option<String> | Provider id. | |
sensitive_groups / sensitiveGroups | Vec<AppSensitiveGroup> | 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.
| Field | Type | Default | Description |
|---|---|---|---|
label | String | "Teleport" / "Stream". | |
action | AppPickerAction | Action. | |
enabled | bool | Enabled. |
AppPickerState record#Returned by app_picker_initial, app_picker_reduce.
| Field | Type | Default | Description |
|---|---|---|---|
step | AppPickerStep | Step. | |
space_name / spaceName | String | The target Space's name. | |
entries | Option<Vec<AppCatalogEntry>> | The catalog, once loaded. | |
query | String | Search. | |
selected_id / selectedId | Option<String> | Highlighted app. | |
entry | Option<AppCatalogEntry> | The chosen app. | |
moves | Option<AppTeleportMove> | What moves. | |
files | Vec<String> | Chosen files. | |
sensitive | Vec<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. | |
plan | Option<AppTeleportPlan> | 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 | What the review sends: which sites, which items, from where. | |
events | Vec<AppTeleportRunEvent> | Run events (last MAX_EVENTS). | |
report | Option<AppTeleportRunReport> | The run's report. | |
error | Option<String> | Error text. | |
install_prompt / installPrompt | Option<AppInstallCuaPrompt> | The "needs the Cua app" prompt. | |
error_back / errorBack | AppPickerStep | Where Back from an error goes. |
AppPickerAction enum#.teleport
.streamRemote
.streamLocalSoon| 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#.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])
.togglePasswords(value: Bool)
.vaultSelection(selected: [String])
.confirm
.progress(event: AppTeleportRunEvent)
.finished(report: AppTeleportRunReport)
.back| 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> |
TogglePasswords | Tick or untick "Also send saved passwords". Fields: value: bool |
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#.loading
.pick
.options
.planning
.consent
.running
.done
.error| 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#.space
.thisMac| 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).
func appCatalogEntriesFromJson(json: String) throws -> [AppCatalogEntry]| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns Vec<AppCatalogEntry> ยท Raises CuaError
app_catalog_entry#A catalog row from Teleport.catalog, as the picker's entry.
func appCatalogEntry(entry: TeleportCatalogEntry) -> AppCatalogEntry| Parameter | Type | Default |
|---|---|---|
entry | TeleportCatalogEntry | required |
Returns AppCatalogEntry
app_picker_can_plan#Planning is possible.
func appPickerCanPlan(state: AppPickerState) -> Bool| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns bool
app_picker_consent#The consent the confirmed review carries.
func appPickerConsent(state: AppPickerState) -> AppTeleportConsent| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns AppTeleportConsent
app_picker_initial#"Teleport an app..." first state.
func appPickerInitial(spaceName: String) -> AppPickerState| Parameter | Type | Default |
|---|---|---|
space_name | String | required |
Returns AppPickerState
app_picker_plan_sensitive#The groups the plan asks for (TeleportPlanOptions.sensitive_groups).
func appPickerPlanSensitive(state: AppPickerState) -> [AppSensitiveGroup]| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns Vec<AppSensitiveGroup>
app_picker_primary#The primary button of the window picker.
func appPickerPrimary(tab: AppPickerTab, selectedSupported: Bool?) -> AppPickerPrimary| Parameter | Type | Default |
|---|---|---|
tab | AppPickerTab | required |
selected_supported | Option<bool> | required |
Returns AppPickerPrimary
app_picker_progress#Run progress in [0, 1].
func appPickerProgress(state: AppPickerState) -> Double| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns f64
app_picker_reduce#Advances the picker.
func appPickerReduce(state: AppPickerState, event: AppPickerEvent) -> AppPickerState| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
event | AppPickerEvent | required |
Returns AppPickerState
app_picker_review#The review screen, when a plan is under review.
func appPickerReview(state: AppPickerState) -> AppReviewView?| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns Option<AppReviewView>
app_picker_sections#The pick list's sections.
func appPickerSections(state: AppPickerState) -> [AppEntrySection]| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
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.
func appPickerSensitiveOptions(state: AppPickerState) -> [AppSensitiveOption]| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns Vec<AppSensitiveOption>
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.
func appPickerStatus(state: AppPickerState) -> String?| Parameter | Type | Default |
|---|---|---|
state | AppPickerState | required |
Returns Option<String>