Module collaboration
Expand description
Toolkit-side collab client. The broker client (routes, transport,
committed reads, signing, invocation updates, presence transport) is the
collaboration crate, which a process that commits to a workspace links
without the toolkit; it keeps its path here. What stays is the widget
side: who is in the workspace as the toolkit shows them, and the content a
view reads.
Modules§
- action_
directory - An application’s action directory, without the toolkit: the
ActionDirectorySnapshota publication of resources and actions builds, the bounded pages of it the broker asks for (a level, a named resource, or the actions a search names) and the exact row it resolves before an invocation. - app_
surface - Which app surface the changes an app makes are decided against.
- approved_
checks - Typed bounded jobs on an existing acknowledged record channel.
- browser_
service_ sessions - Private, one-shot requests to the session’s services, on the app’s own route. These replies never enter the document, history or durable event queues.
- channel_
key - The routing key one connection names on the collaboration wire.
- channel_
live_ activity - An app’s live activity — what it keeps showing outside its windows, a running timer — reached over its collaboration channel.
- channel_
settings - An app’s settings when the shell keeps them: its view of the session’s records, reached over the app’s collaboration channel.
- commit_
log - The action log: the index this endpoint builds as changes and commits arrive, answering which actions wrote a resource and which action a change belongs to.
- commits
- The workspace commits an endpoint has seen: one action, every unit it wrote, delivered all together or not at all.
- document_
routes - A document envelope as a route’s endpoint takes it in: the whole payload, checked against the route it arrived on, and the mutation it carries.
- external_
moderation - Bounded action-only moderation requests on acknowledged record channels.
- file_
clipboard - The local host’s Files clipboard. Offers are opaque, never path lists.
- handoff
- Handoff: what the shell and one application instance say to each other while that instance’s window moves to another workspace.
- history_
source - A document’s history below the toolkit: its steps (undo, redo, restore and checkpoints written into the document itself), the revert they are taken back by, and who wrote them.
- invocation_
scope - The invoker a delivered invocation runs for on this thread, and the
one-shot replies the collaboration lanes answer an invocation with.
The toolkit’s invocation scope (
ui::invocation_scope) builds the door’s custody on these. - local_
document_ action - A local action observation as the collab client reports it: the
published invocation and the exact execution it captured. These are not
authorizations; the toolkit’s
ui::local_document_actionqueues them. - local_
identity - Who sits at this device, as far as undo attribution and history authors are concerned.
- native_
initial - Private native construction custody. It borrows the existing SDK worker; neither an environment value nor a data capture is a positive authority.
- open_
selected - Bounded navigation requests, never serialized source or edit authority.
- owner_
view - Session-local native owner-view control. Documents retain their normal CRDT routes; these messages carry presentation only and grant no focus or input.
- participants
- Remote participants (agents, collaborators) that hold their own view of a widget, and the retained topology collaboration sessions walk.
- portable_
storage - Hydrated, explicitly namespaced browser persistence. Durable writes are acknowledged by the host only after its backing transaction commits.
- record
- A record’s identity: what it is (
RecordKind), which one it is (RecordId), what it references (RecordRef) and the checkout that names all three (RecordCheckout). The id travels on the collaboration wire and names a file on disk; the toolkit’s record store (ui::record) keeps the documents these name. - record_
content - The content a record references: its lanes and stores are the collab
client’s (
collaboration::record_content); what a view reads of it, as arrivals, is the toolkit’s. - semantic_
schema - The numbers a semantic checkpoint carries for the portable schemas a
signed manifest can declare (
continuity.semantic_schema). The tag says what the payload means, so a device that has not installed the app can still check its shape. They matchContinuitySemanticSchema::wire_tagintilo-app-package. - state
- A document and the history it keeps, below the toolkit: the primitive that writes a past state forward as a new change, which undo, redo and restore all write through.
- write_
attribution - Which of an app’s own live invocations its next writes belong to.
- write_
attribution_ lane - The lane on which an app names the paths it is about to write for one of
its own invocations, so the host can record the agent behind them
(
runtime_collab::write_attribution). It sends no actor: the host takes that from its own custody of the invocation.
Structs§
- Broker
Action Catalogue Wire - Broker
Action Surface - One application connection’s exported actions, as the broker’s action catalogue lists them to an application.
- Calibration
Info - Calibration
Member Info - Calibration
Microphone Info - One device’s microphone as a calibration candidate for a group.
- Calibration
Microphone Run - Certified
Agent Identity - Explicit correlation supplied by owner-backed membership, never decoded from a participant label or an actor-id prefix.
- Certified
Endpoint Identity - Certified identity for a client connecting to an explicit collaboration endpoint rather than through a launcher-inherited identity service.
- Collaboration
Manager - Collaborator
- Commit
Author - Who made an action: the authenticated principal that invoked it, and the device that signed it.
- Commit
Part - One unit an action wrote: which app’s record, and the hashes of the changes it made there.
- Committed
Document - A disposable capture from the actual admitted SDK channel. It cannot be constructed by an application. Its ACK opens only this route generation.
- Continuation
Metadata - Inert, app-owned resume projection sent only to the local shell.
- Document
History - Lazy history paging state for every artifact the app has seen.
- Document
Publication Receipt - Completion of the document prefix preceding one publication barrier.
- Exported
Action - One inert operation an application exports, without execution authority.
- Host
Session Connector - A one-shot host handoff factory, evaluated on the SDK worker’s
LocalSet. - Native
Join - The wait for a joining manager’s primary route
(
CollaborationManager::join_native), made on a thread of its own: a window whose record is not on this device yet builds once the route is joined, from the workspace’s committed history. Its outcome is an event (Self::when_done); no clock decides it. The window’s thread shows the window’s loading state meanwhile and builds the window once it is told (Self::finish). - Nearby
Destination Handle - A short-lived shell capability naming one receiver destination for one authenticated Files connection. Applications never receive its host path.
- Nearby
Target Handle - A short-lived shell capability naming one picker target. It carries no cryptographic peer identity and has no authority outside the authenticated app connection that received it.
- Nearby
Transfer Destination - Path-free receiver destination projected from this Files instance’s current writable grants.
- Nearby
Transfer Handle - A short-lived shell capability naming one transfer for one authenticated Files connection. It is never the transport’s global transfer identity.
- Nearby
Transfer Snapshot - Nearby
Transfer Status - Bounded status projection. Paths and file contents are absent: receiver UI needs a portable display name, exact peer and byte progress.
- Nearby
Transfer Target - A certified personal-device target safe to show in an application picker.
- Network
Wake Status - Bounded local observations; no field claims verified physical recovery.
- Primary
Route Witness - Successful primary-route metadata; an epoch invalidates cursors even when the same route is re-announced. This is not an application-mintable credential.
- Route
Spec - An explicit typed collaboration route.
- Session
Resource - One the session’s published resources (
sound,displays, the person’s settings), as the app’s UI thread reaches it: the reading it stands at, each later reading, and the actions that change it. - Session
Services - A surface app’s connection to its session’s services: the same connection every app reaches its session through, held by a process that shows a window placed by the session and joins no workspace of its own.
- Speaker
Device Info - Speaker
Endpoint Info - Speaker
Group Info - Speaker
Member Info - Speaker
Member Spec - Speaker
Snapshot - Speaker
Trim Info - A member’s calibration correction in display units.
- Surface
Delta - A change to a connection’s published surface.
- Surface
Publication - What the broker holds of one connection’s surface, as the publisher last sent it.
- Surface
Table - A connection’s surface as the broker holds it: the shapes and templates its resources name, and the resources in the order they were first published.
- Unit
Mutation - One unit and what changed in it, as the publisher of a pass holds it.
- Workspace
Commit - One signed action across every unit it wrote.
Enums§
- Action
Directory Request - A broker directory request awaiting main-thread authority. This crosses threads as inert strings and budgets only; no widget reference or Cap’n Proto handle ever leaves the UI/collaboration boundary.
- Calibration
Member State - Calibration
Microphone State - What one microphone contributed to a run.
- Calibration
Phase Info - Channel
Access State - What an endpoint’s route can do with content, as apps see it.
- Collab
Request - Collab
Send Error - Why a request did not reach the collaboration transport.
- Collaboration
State - Where a manager’s connection stands, as the UI shows it.
- Display
Origin - The host distinguishes local UI intent from continuation of a published action. A published id is resolved only against broker-retained original custody.
- Document
Mutation - Meaning of a signed document payload. Keeping this tag inside
[
SignedOp::payload] makes snapshot-vs-incremental part of the bytes the device signs without changing the persistedSignedOplayout. - Document
Publication Error - Failure to complete a prefix of document publications.
- Exported
Input - What one exported action’s invocation must carry, as it crosses the
wire — the transport-side twin of
tilo_actions::InputSpec, which says what kind of text it collects rather than whether it names content. - Join
Hold - What holds up a primary route’s join, as the broker reports it while the
join is pending (
CollaborationManager::join_hold). - Microphone
Status - Whether one device’s microphone can listen while a group is calibrated.
- Native
Connection - Which connection a native launch’s manager joins its workspace on.
- Native
Launch Error - Why a native launch’s manager could not join its workspace.
- Nearby
Transfer Command - Commands accepted by the shell-owned Nearby Send authority.
source_pathis raw Unix path bytes so a valid file never becomes inaccessible merely because its name is not UTF-8. The broker acceptsSendonly from the certified Files application and revalidates the exact target and source. - Nearby
Transfer Direction - Nearby
Transfer Phase - Nearby
Transfer Reply - Portable
Wifi Security - Portable Wi-Fi authentication modes understood by the sealed personal secret bridge. Enterprise identity/certificate state is intentionally not representable here.
- Presence
Payload - SdkCustody
- The custody types only this toolkit’s endpoint mints: the committed captures its collaboration events carry.
- Speaker
Command - Speaker
Member Status - Where one member of a group stands right now.
- Speaker
Playback Info - A session playing on the group right now, most urgent state first.
- Speaker
Reply - Speaker
Role Spec - What one member contributes, in wire form.
- Transport
Command - Everything the manager asks of its transport.
- Transport
Error - Why a transport refused a command.
- Transport
Status - Liveness of a transport as the owner sees it this frame.
- Wifi
Continuity Command - Wifi
Continuity Reply
Constants§
- CURRENT_
CONNECTION_ PEER_ ID - Reserved
invokePublishedAction.peerIdmeaning “the application connection making this request”. Live broker peer ids are allocated from zero upward; the broker never assigns this sentinel. - HISTORY_
PAGE_ SIZE - Ops per history page. Large enough that a scroll gesture rarely waits, small enough to keep each page’s decrypt and apply well under a frame.
- HISTORY_
PREFETCH_ MARGIN - Prefetch when a view is within this many loaded ops of the oldest one.
- MAX_
SPEAKER_ NAME_ CHARS - ROUTE_
JOIN_ FAILED - How an app’s error begins when it could not join its collaboration route and stopped. The shell recognises it in a failed launch’s output to say why the app did not open.
- SESSION_
RUNTIME_ SUPPORTED - Whether this host supports the local session runtime transport. This describes transport availability, not an inherited capability or permission.
Traits§
- Collab
Transport - A synchronous, poll-driven collaboration transport. See the module documentation for the contract every implementation upholds.
- Document
Custody - Host-local original contributor custody a document change carries to the
transport, never serialized on the wire. The toolkit’s invocation scope
mints it (
ui::invocation_scope::DocumentAuthorization); the transport checks it against the change it is about to sign. - Peer
Transport - Transport adapters must authenticate ordinary peer joins and verify inbound envelopes before publishing events. Installing this adapter grants no model, action, HostContext, or storage authority. Queue failures are fail-closed.
Functions§
- colour_
from_ packed - The colour a roster row’s packed
0x00RRGGBBnames: the presence hue nearest it,Nonefor0or a grey. - continuation_
restore_ env - The launcher-only resume payload the host passed this window
([
crate::host::HostIdentity::continuity_resume]). - display_
control - Ask the native host to inspect or change its display transaction. Call off the frame thread; the existing bridge and response wait remain bounded.
- install_
channel_ settings - Make the shell’s records this process’s settings from the start of its launch, when the launcher handed it the shell’s collaboration service. A setting the app reads or writes while it builds its window, before its collaboration manager connects, is then the shell’s: a write waits in the channel’s outbox and the primary route’s join sends it, in the order it was made. Installed only when the manager was built, an early write went to the sandbox’s own settings file and was lost.
- local_
app_ id - The application’s authenticated durable route (falling back to its signed
package id, then
QUICK_APP_IDfor dev). Read from the same place the channel key is built, so what an app publishes can’t disagree with its connection. - local_
cluster_ id - The workspace this process collaborates in. Exposed so presence scopes from the same source routing uses, rather than a derivation that could drift.
- local_
user_ id - The person sitting at this machine. Actions are stamped with this so
undo can tell collaborators apart (see
[
crate::state::State::undo_as]): the id must be stable across a document’s life and distinct between people, or one person’s Ctrl+Z reverts another’s work. - presence_
handle_ env - The presence handle announced on
Hello.TILO_PRESENCE_HANDLEwins, thenTILO_USER_ID; absent both, the broker’s synthetic name. - speaker_
command - Ask the shell’s speaker-group authority over the launcher-authenticated Settings route. Run it off the frame thread; a lost broker times out into an ordinary unavailable result.
- wifi_
continuity_ command - Invoke the shell’s launcher-authenticated, sealed Wi-Fi continuity path. Callers should run this off the frame thread; the bounded timeout turns a lost broker into an ordinary unavailable result.
Type Aliases§
- Collab
Event - 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. - Endpoint
Channel Keys - Where an endpoint with no identity service asks for its routes’ channel keys, as an identity service answers them: the record’s workspace, its app, the record, and the key generation the route holds.