Type Alias CollabEvent
pub type CollabEvent = CollabEvent<SdkCustody>;Expand description
One event this endpoint receives, carrying the toolkit’s own custody
types. The vocabulary is defined in [runtime_collab::event], which the
session’s brokers share.
Aliased Type§
pub enum CollabEvent {
Show 39 variants
SelectedDiscoveryResult {
request_id: u64,
result: Result<Reply, String>,
},
OpenSelectedV2Result {
request_id: u64,
result: Result<ObservedReply, String>,
},
OpenSelectedResult {
request_id: u64,
result: Result<RootReceipt, String>,
},
LocalFileClipboardResult {
request_id: u64,
result: Result<Reply, String>,
},
CommittedDocument {
route: RouteSpec,
read: CommittedDocument,
},
Context {
collaborators: Vec<Collaborator>,
permissions: Vec<String>,
},
HistoryAgents {
cluster_id: String,
agents: Vec<RosterAgent>,
},
RecordsArrived {
records: Vec<String>,
},
RecordUnavailable {
route: RouteSpec,
},
FollowChanged {
peer_id: Option<String>,
},
DocumentSnapshotRequested {
route: RouteSpec,
},
Handoff {
request: HandoffRequest,
},
RemoteCursorMoved {
user_id: String,
x: f32,
y: f32,
},
RemotePresenceUpdate {
user_id: String,
key: PresenceKey,
payload: PresencePayload,
},
ChannelAccess {
route: RouteSpec,
state: ChannelAccessState,
},
Document {
envelope: Box<SignedOp>,
from_user_id: String,
decrypted_payload: Option<Vec<u8>>,
},
ScrollbackBatch {
artifact: ArtifactId,
ops: Vec<Box<SignedOp>>,
decrypted_payloads: Vec<Option<Vec<u8>>>,
oldest_seq: Option<u64>,
exhausted: bool,
},
Invocation {
id: u64,
invocation: InvocationId,
resource: String,
action: String,
argument: Option<String>,
actor: String,
context: Option<Box<ActionContext>>,
},
InvocationCancellation {
id: u64,
},
RemoteAction {
message: RemoteActionMessage,
},
ActionCatalogue {
surfaces: Vec<BrokerActionSurface>,
},
LocalDocumentActionReported {
request_id: u64,
result: Result<PublishedInvocationObservation, LocalDocumentActionError>,
},
InstalledApplicationLaunchResult {
request_id: u64,
result: Result<(u64, InvocationUpdate), String>,
},
TaskRun(TaskRunEnvelope),
TaskActionInvocationResult {
request_id: u64,
result: Result<(u64, InvocationUpdate), String>,
},
TaskRunCancellation {
request_id: u64,
result: Result<bool, String>,
},
TaskRunControl {
request_id: u64,
control: TaskRunControl,
},
TaskRunReportResult {
request_id: u64,
result: Result<(), String>,
},
WorkspaceControl {
session_id: u64,
event: WorkspaceControlEvent,
},
NativeMediaCommandResult {
request_id: u64,
result: Result<Snapshot, String>,
},
RecordContent {
route: RouteSpec,
hash: String,
bytes: Vec<u8>,
},
RecordContentState {
route: RouteSpec,
hash: String,
state: ContentState,
},
RealtimeCommandResult {
request_id: u64,
result: Result<RealtimeReply, String>,
},
NearbyTransferCommandResult {
request_id: u64,
result: Result<NearbyTransferReply, String>,
},
NearbyTransferChanged,
SpeakersChanged,
DrivesChanged,
ApplicationsChanged,
Realtime(RealtimeEvent),
}Variants§
SelectedDiscoveryResult
OpenSelectedV2Result
OpenSelectedResult
LocalFileClipboardResult
CommittedDocument
Original committed history from this SDK channel, applied by its document owner.
Context
HistoryAgents
The delegated agents on cluster_id’s roster whose person’s root
signed the delegation for exactly that device, as the session
verified them: who the app’s history names for changes their own
device keys signed. Session-local and presentation only.
RecordsArrived
Records of this application’s trees (a chain’s next part, a container’s child) that a peer wrote and no window here holds: whatever follows those trees holds them. Session-local.
The workspace’s hosts sent everything they hold of the on-demand
record on route (neighbour_wire::record_sync) this endpoint read,
and it was not among it, or no host of the workspace is connected:
what reads it shows it unavailable until it arrives, which its
committed read delivers as ever. Session-local; minted by the SDK
endpoint from its committed read.
FollowChanged
Session chrome asked this app to bind its viewport/view mode to a participant, or release that binding. This is local session control: it is never published to collaboration peers.
DocumentSnapshotRequested
The broker selected this connection as the sole snapshot responder for a late joiner on the same document route.
Handoff
The shell asked this instance for a step of moving its window to another workspace. Session-local control; never from a peer.
Fields
request: HandoffRequestRemoteCursorMoved
RemotePresenceUpdate
ChannelAccess
What this endpoint can do with one route’s end-to-end encrypted content changed: it was admitted, is waiting for access (a new device before its welcome arrives), was removed, or cannot join. While a route is not open the SDK holds edits and incoming ciphertext on the device instead of dropping them; apps show the state.
Document
A validated signed document envelope from another peer. For cleartext
routes the mutation kind is inside the outer signed payload. For an
MLS route, envelope.payload remains the original signed ciphertext
and decrypted_payload holds endpoint-only plaintext after the inner
MLS authentication succeeds. A mutation too large for one frame
arrives as several signed segments; the SDK delivers it once, after
every segment arrived and the reassembled bytes matched their signed
digest, with envelope set to the final segment.
Fields
decrypted_payload: Option<Vec<u8>>Endpoint-verified typed mutation bytes when they differ from
envelope.payload: MLS plaintext, or a mutation reassembled from
segments. None for single-frame cleartext envelopes (read
directly from envelope.payload) and for broker events, which
never possess MLS keys.
ScrollbackBatch
Response to a the toolkit’s CollabRequest::FetchScrollback: a page of
previously-validated ops plus exhausted.
Targeted send — unlike every other event here, the broker writes this only to the connection that issued the matching request.
Fields
artifact: ArtifactIdEchoes FetchScrollback::artifact so multiple in-flight
fetches route to the right history view.
ops: Vec<Box<SignedOp>>Ascending seq order. Empty when the broker has no matching range (typically evicted by compaction).
decrypted_payloads: Vec<Option<Vec<u8>>>Endpoint-decrypted payload parallel to ops. Brokers leave this
empty because they have no MLS keys; SDK endpoints populate one
slot per op and drop undecryptable encrypted entries.
Invocation
One capability-checked invocation addressed to this application connection by the session action broker.
Fields
invocation: InvocationIdcontext: Option<Box<ActionContext>>Broker-owned task/session provenance. The concrete application resource and action remain authoritative; this only supplies the surrounding purpose and work-group for durable history.
InvocationCancellation
The invocation owner requested cooperative cancellation. Delivered at most once; the app-side job decides the next safe stopping boundary.
RemoteAction
The session’s answer to a the toolkit’s CollabRequest::RemoteAction.
Fields
message: RemoteActionMessageActionCatalogue
Fields
surfaces: Vec<BrokerActionSurface>LocalDocumentActionReported
Private admission/status or refusal, never a document publication permit.
InstalledApplicationLaunchResult
TaskRun(TaskRunEnvelope)
A run addressed to this admitted agent. The envelope is broker-minted and contains a lease, not a caller-selected authority token.
TaskActionInvocationResult
TaskRunCancellation
TaskRunControl
TaskRunReportResult
WorkspaceControl
NativeMediaCommandResult
RecordContent
Content the record on route references arrived: an answer to
the toolkit’s CollabRequest::WantContent, or content another app on the record
offered. The bytes are verified against hash before use.
RecordContentState
Where a the toolkit’s CollabRequest::WantContent of hash on route has got
to while the content is not here: fetched from a connected device
(ContentState::Pending),
waiting for one that could hand it over to connect, or unavailable
from every connected one. It changes as devices come and go.
RealtimeCommandResult
NearbyTransferCommandResult
NearbyTransferChanged
What a Nearby Send snapshot would show this app may have changed: a
device came or went, an offer arrived, a transfer moved on. It names
nothing; the app asks for a fresh
NearbyTransferCommand::Snapshot
instead of asking on a timer. The first arrives once the route joins,
so it also starts the app’s view. Only the certified Files route
receives these.
SpeakersChanged
What a speaker snapshot would show may have changed: a device came or
went, a member answered, a calibration moved on. It names nothing;
Settings asks for a fresh
SpeakerCommand::Snapshot
instead of asking on a timer. The first arrives once the route joins,
so it also starts the view. Only the certified Settings route
receives these.
DrivesChanged
The drives the shell lists may have changed: one was plugged in, taken out, opened or closed. It names nothing; Files asks the tools service for the list again instead of asking on a timer. The first arrives once the route joins, so it also fetches the first list. Only the certified Files route receives these.
ApplicationsChanged
The person’s apps may have changed: one was installed, removed from their apps or uninstalled, here or on another of their devices. It names nothing; Files asks the tools service for the list again instead of asking on a timer, and asks once when it comes to its Applications place for what changed while it was not there. The first arrives once the route joins. Only the certified Files route receives these.