Teleport plan and run
The teleport plan, its consent and capabilities, and the run's steps.
The teleport plan, its consent and capabilities, and the run's steps.
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (import CuaSpacesFFI); the Rust tab shows the cua-spaces-ffi crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
app_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.
| 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). |
AppTeleportPlan record#Returned by app_teleport_plan, app_teleport_plan_from_json.
| Field | Type | Default | Description |
|---|---|---|---|
app | AppCatalogEntry | The app. | |
space_id / spaceId | String | Target Space. | |
moves | AppTeleportMove | What moves. | |
steps | Vec<AppPlanStepView> | Steps. | |
consent | Vec<AppConsentItem> | 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.
| Field | Type | Default | Description |
|---|---|---|---|
step | u32 | Step index. | |
steps | u32 | Steps. | |
kind | String | Step kind. | |
phase | AppTeleportRunPhase | 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#.full
.installOnly
.unsupported| Variant | Description |
|---|---|
Full | App and signed-in state. |
InstallOnly | App, empty or with files. |
Unsupported | Not available. |
AppTeleportMove enum#.appOnly
.appWithFiles
.appWithState| Variant | Description |
|---|---|
AppOnly | Just the app. |
AppWithFiles | The app with files or folders. |
AppWithState | The app with its signed-in state. |
AppTeleportRunPhase enum#.started
.progress
.finished
.failed
.done| 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.
func appTeleportPlan(plan: TeleportPlan) -> AppTeleportPlan| Parameter | Type | Default |
|---|---|---|
plan | TeleportPlan | required |
Returns AppTeleportPlan
app_teleport_plan_from_json#A teleport plan from JSON (fixtures, parity flows).
func appTeleportPlanFromJson(json: String) throws -> AppTeleportPlan| Parameter | Type | Default |
|---|---|---|
json | String | required |
Returns AppTeleportPlan ยท Raises CuaError
app_teleport_run_event#An SDK run event as the picker's (AppPickerEvent.progress).
func appTeleportRunEvent(event: TeleportRunEvent) -> AppTeleportRunEvent| Parameter | Type | Default |
|---|---|---|
event | TeleportRunEvent | required |
Returns AppTeleportRunEvent
app_teleport_run_status#app_picker_status for a run's events as the SDK delivered them.
func appTeleportRunStatus(events: [TeleportRunEvent]) -> String?| Parameter | Type | Default |
|---|---|---|
events | Vec<TeleportRunEvent> | required |
Returns Option<String>