Skip to main content

CollabRequest

Enum CollabRequest 

pub enum CollabRequest {
Show 36 variants LocalFileClipboard { request_id: u64, command: Command, on_behalf_of: Option<InvocationId>, }, Hello { app_id: String, cluster_id: Uuid, record: Option<String>, record_kind: Option<String>, handle: Option<String>, }, Document { mutation: DocumentMutation, authorization: Option<DocumentAuthorization>, }, RequestDocumentSnapshot, OfferContent { hash: String, bytes: Vec<u8>, }, WantContent { hash: String, }, Presence { key: PresenceKey, payload: PresencePayload, }, SignedOperation { envelope: Box<SignedOp>, }, FetchScrollback { artifact: ArtifactId, before_seq: u64, max: u16, }, PublishActions { app_id: String, actions: Vec<ExportedAction>, }, ReportContinuation { app_id: String, schema_version: u16, metadata: Vec<u8>, }, ClearContinuation { app_id: String, }, ReportHandoff { app_id: String, message: Vec<u8>, }, ReportPlayback { app_id: String, reports_json: Vec<u8>, }, NativeMediaCommand { request_id: u64, command: Request, }, RealtimeCommand { request_id: u64, app_id: String, command: RealtimeCommand, }, NearbyTransferCommand { request_id: u64, app_id: String, command: NearbyTransferCommand, }, OpenWorkspaceControl { session_id: u64, target_device: [u8; 32], }, WorkspaceControlInput { session_id: u64, event: WorkspaceControlInput, }, CloseWorkspaceControl { session_id: u64, }, CompleteInvocation { id: u64, code: String, message: String, }, UpdateInvocation { id: u64, update: InvocationUpdate, }, RecordLocalEffect { address: ActionAddress, update: InvocationUpdate, }, RemoteAction { message: RemoteActionMessage, }, QueryActionDirectory { request_id: u64, query: ActionDirectoryQuery, }, ResolvePublishedAction { request_id: u64, peer_id: u64, revision: String, resource: String, action: String, }, ManagedInvocationAttempt { attempt: ManagedAttempt, }, InvokeResolvedPublishedAction { request_id: u64, peer_id: u64, revision: String, resource: String, action: String, arguments: Map<String, Value>, confirmation: Value, }, InvokePublishedAction { request_id: u64, peer_id: u64, resource: String, action: String, arguments: Map<String, Value>, confirmation: Value, }, PublishedInvocationStatus { request_id: u64, id: u64, }, CancelPublishedInvocation { request_id: u64, id: u64, }, LaunchPublishedApplication { request_id: u64, app_id: String, content_hash: Option<String>, }, LaunchInstalledApplication { request_id: u64, app_id: String, package_root: Option<String>, on_behalf_of: Option<InvocationId>, }, ReportTaskRun { request_id: Option<u64>, run_id: u64, lease: String, update: TaskRunUpdate, }, InvokeTaskAction { request_id: u64, invocation: InvocationId, run_id: u64, lease: String, peer_id: u64, provider: String, resource: String, action: String, arguments: Map<String, Value>, wait: Option<TaskChildWait>, }, TaskRunCancellation { request_id: u64, run_id: u64, lease: String, },
}

Variants§

§

LocalFileClipboard

Fields

§request_id: u64
§command: Command
§on_behalf_of: Option<InvocationId>
§

Hello

Fields

§app_id: String
§cluster_id: Uuid
§record: Option<String>

Which record (crate::record) this connection carries, when adopted. The broker delivers payloads only to connections announcing the same record, so two people editing different files in one room don’t merge each other’s state; None means one document per (app, room).

§record_kind: Option<String>

The resource kind of record, named so a host that creates a missing record on the app’s first write knows what it holds.

§handle: Option<String>

Name on the caret pill; None gets a synthetic peer-<n>. Informational only — never used for routing or grants.

§

Document

A typed complete snapshot or incremental change set. The SDK wraps the mutation in a signed envelope from the certified launcher identity. Keeping the kind in DocumentMutation avoids parallel request and wire enums drifting apart.

Fields

§authorization: Option<DocumentAuthorization>

Host-local original contributor custody; never serialized on the wire.

§

RequestDocumentSnapshot

Ask the broker to select one existing holder of this exact route as a snapshot responder. Safe to retry while no holder is available.

§

OfferContent

Content this route’s record references, which the app stored: the host keeps it where the record’s readers are served from.

Fields

§hash: String
§bytes: Vec<u8>
§

WantContent

Content this route’s record references and the app lacks. Answered, from this device or the route’s other devices, with CollabEvent::RecordContent.

Fields

§hash: String
§

Presence

Outbound presence update — pointer moved, caret changed, selection shifted, or arrived/left a keyed object. Fanned out to every connected peer as CollabEvent::RemotePresenceUpdate.

Fields

§

SignedOperation

Signed incremental CRDT mutation. The broker validates against the channel’s role table before fanning out; invalid envelopes are dropped and logged, never reaching peers.

Boxed to keep the discriminant thin on the stack — SignedOp is large (32-byte pubkey + 64-byte sig + payload + UUIDs).

Fields

§envelope: Box<SignedOp>
§

FetchScrollback

Late-join scrollback fetch: up to max ops with seq < before_seq, answered with one CollabEvent::ScrollbackBatch.

Apps page by repeating with before_seq set to the lowest seq from the previous batch until exhausted == true, then fall back to the cooperative path (broker queries gossip peers).

Fields

§artifact: ArtifactId
§before_seq: u64

Exclusive upper bound on seq.

§max: u16

Page size cap; chrome UX bounds pages to ~50 ops.

§

PublishActions

Replace this application’s complete exported resource/action surface.

Fields

§app_id: String
§

ReportContinuation

App-owned CRDT state projected for same-identity continuation. The local broker authenticates the route and stores this only for shell capture; it is never a room action or a restore command.

Fields

§app_id: String
§schema_version: u16
§metadata: Vec<u8>
§

ClearContinuation

Remove the last continuation report after the app can no longer produce a safe projection.

Fields

§app_id: String
§

ReportHandoff

Answer a handoff request, or report a retirement (handoff::HandoffReport, encoded). Session-local, on the primary route; never relayed to peers.

Fields

§app_id: String
§message: Vec<u8>
§

ReportPlayback

Private, level-triggered playback descriptors for shell-mediated same-person handoff. Never part of the room CRDT or peer fan-out.

Fields

§app_id: String
§reports_json: Vec<u8>
§

NativeMediaCommand

One generic active-session continuity transition. The shell binds the command to this connection’s certified app/workspace route.

Fields

§request_id: u64
§command: Request
§

RealtimeCommand

Fields

§request_id: u64
§app_id: String
§

NearbyTransferCommand

One Files-owned picker/status/consent command. The broker authenticates the app route and keeps payload bytes on the shell transfer transport.

Fields

§request_id: u64
§app_id: String
§

OpenWorkspaceControl

Fields

§session_id: u64
§target_device: [u8; 32]
§

WorkspaceControlInput

Fields

§session_id: u64
§event: WorkspaceControlInput
§

CloseWorkspaceControl

Fields

§session_id: u64
§

CompleteInvocation

Report the terminal result of a directed invocation.

Fields

§id: u64
§code: String
§message: String
§

UpdateInvocation

Fields

§id: u64
§

RecordLocalEffect

Terminal receipt for an Effect initiated by this app’s local UI.

Fields

§

RemoteAction

One remote-action request to the session’s action host: list the actions offered to this connection, invoke one, observe or cancel an invocation. The answer arrives as CollabEvent::RemoteAction.

Fields

§

QueryActionDirectory

Fields

§request_id: u64
§query: ActionDirectoryQuery
§

ResolvePublishedAction

Fields

§request_id: u64
§peer_id: u64
§revision: String
§resource: String
§action: String
§

ManagedInvocationAttempt

Opaque funded work from the owner-thread managed sender. Queue acceptance does not establish durable local acceptance or receiver admission.

Fields

§

InvokeResolvedPublishedAction

Fields

§request_id: u64
§peer_id: u64
§revision: String
§resource: String
§action: String
§arguments: Map<String, Value>
§confirmation: Value
§

InvokePublishedAction

Fields

§request_id: u64
§peer_id: u64
§resource: String
§action: String
§arguments: Map<String, Value>
§confirmation: Value
§

PublishedInvocationStatus

Fields

§request_id: u64
§id: u64
§

CancelPublishedInvocation

Fields

§request_id: u64
§id: u64
§

LaunchPublishedApplication

Fields

§request_id: u64
§app_id: String
§content_hash: Option<String>

Optional portable blob identity staged read-only by the session before it launches the target application.

§

LaunchInstalledApplication

A Store launch, with a dedicated reply vocabulary so a widget’s correlation id cannot complete an unrelated SDK action invocation.

Fields

§request_id: u64
§app_id: String
§package_root: Option<String>
§on_behalf_of: Option<InvocationId>
§

ReportTaskRun

Lifecycle record for a broker-minted task lease. Only an admitted agent connection can make this request; the broker checks the lease.

Fields

§request_id: Option<u64>
§run_id: u64
§lease: String
§update: TaskRunUpdate
§

InvokeTaskAction

Invoke an already permission-filtered published action under the broker-owned task context. request_id correlates the async reply.

Fields

§request_id: u64
§invocation: InvocationId

The caller’s id for this invocation. A retry reuses it; the broker reports the original, and Self::RemoteAction observes or cancels it.

§run_id: u64
§lease: String
§peer_id: u64
§provider: String

Stable catalogue provider for a closed app; never a publisher identity.

§resource: String
§action: String
§arguments: Map<String, Value>
§wait: Option<TaskChildWait>

On a re-ask of a native task’s own child: let the broker hold the answer until the child moves on (see [runtime_collab::TaskChildWait]). The connection’s other requests do not wait behind it.

§

TaskRunCancellation

Poll the native Task Center’s cooperative cancellation bit for a lease. It cannot cancel a task and carries no task state itself.

Fields

§request_id: u64
§run_id: u64
§lease: String

Implementations§

Trait Implementations§

§

impl Clone for CollabRequest

§

fn clone(&self) -> CollabRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CollabRequest

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T

§

impl<T> WasmNotSync for T
where T: Sync,