Module remote
Expand description
Using another peer’s actions: a transport-neutral vocabulary.
A peer that hosts live apps (a desktop session, a headless app-serving host) can let an authenticated remote caller list the actions it publishes, invoke one, follow its progress, and cancel it. This module is the whole contract between the two sides:
RemoteActionMessage— requests and their answers, wrapped in a versionedRemoteActionFramethat any transport carries as opaque bytes.ActionHost— what a peer implements to answer them, andserve, which maps one request frame onto a host. Answers that need an application’s help arrive later as aPending, so no caller blocks.CatalogueQuery— paged, filtered browsing of what a host offers.InvocationLedger— the idempotency rule every host shares: an invocation is keyed by its caller-chosenInvocationId, so a retry after a lost reply observes the original invocation instead of running the action twice.
Who is calling is never read from a payload. The transport that
authenticated the connection constructs the Caller and hands it to the
host beside the message; nothing in a frame can name or change it.
Descriptors, addresses, arguments, outputs and lifecycle updates are the
same types the local action surface already uses (ActionDescriptor,
ActionAddress, InvocationUpdate, ActionOutput,
ActionFailure), so a remote caller sees exactly what a local one does.
Modules§
- feedback
- Read-only feedback admission and canonical acknowledgment on the existing authenticated action transport. These values never grant membership.
Structs§
- Abandoned
Completer::abandoned: resolves once the answer is unobservable.- Application
Launch - Opening another installed app into the workspace, optionally with
verified content it opens read-only: Photos with a captured picture, a
player with a recorded clip. An app offers it as an action on its own
resources (
ApplicationLaunch::spec); the host routes the admitted invocation through the workspace broker, which stages the bytes and owns the launched process. The source app never hands over a local path. - Caller
- The authenticated principal behind a request.
- Canonical
Action Route - Exact document route whose broker-owned live publisher is requested. This selects custody, not permission: ordinary caller authorization still applies.
- Catalogue
Limits - Bounds on how much work a provider spends on one page. Each is an upper bound a host may lower, never a hint to exceed.
- Catalogue
Page - One page of catalogue rows.
- Catalogue
Provider - A publisher the caller may browse or invoke.
- Catalogue
Query - One bounded request for catalogue rows. Every field narrows; the empty query lists the first page of everything offered.
- Catalogue
Resource - A resource as a catalogue row describes it.
- Catalogue
Row - One row: an action on a resource, or a resource that contains more.
- Completer
- The producing end of a
Pending. Dropping it without completing abandons the answer, which the receiving end observes. - Execution
Lease - Host-owned execution lifetime. Clones share closure, never authority. Equality and hashing use the immutable minted identity, not liveness.
- Invocation
Ledger - The idempotency ledger behind
ActionHost::invoke. - Invocation
Receipt - The host’s answer to an
InvokeRequest. - Invocation
State - The latest lifecycle update of one invocation, carrying the caller’s
InvocationId. - Invoke
Request - A request to run one published action.
- Pending
- The receiving end: an answer that may not exist yet.
- Record
Piece - One piece of a stored record document.
- Record
Query - Which record to read, and from where in its stored bytes.
- Remote
Action Frame - A versioned
RemoteActionMessage, the unit a transport carries. - Remote
Action Target - Which published action an invocation names on the host.
- Resource
View Locator - A host-issued navigation locator. It carries no access grant or credentials.
- RowVisibility
- The action that discloses a resource-only row, and its contract.
- View
Resource Query - One exact existing resource whose inert local-view metadata is requested. The transport supplies identity and current room authority independently.
Enums§
- Action
Host Error - Why a host would not do what was asked. Every variant means nothing ran.
- Admission
- Whether
InvocationLedger::admitstarted a job or found one. - Caller
Principal - Who a request is from, as the host’s policy knows them.
- Confirmation
- Explicit confirmation carried with an invocation.
- Invoke
Argument - What an invocation carries for the action’s declared input.
- Pending
Poll - What
Pending::poll_readyfound. - Receipt
Status - Where an invocation stands, as reported to its caller.
- Remote
Action Message - Everything that crosses the wire for remote action use.
- Remote
Frame Error - Why bytes are not a usable
RemoteActionFrame. - Reservation
- What
InvocationLedger::reservefound. - Update
Mark - How far an invocation’s updates had got when its caller last looked:
what a waiting
Observeasks the host to move past.
Constants§
- APPLICATION_
ACTIVATE_ ACTION - The shared view action that asks the platform to reveal a running window.
- APPLICATION_
ACTIVATE_ TYPE - Encoded operation of
APPLICATION_ACTIVATE_ACTION. - APPLICATION_
CLOSE_ ACTION - Action id that closes a running application’s windows in a workspace.
- APPLICATION_
OPEN_ ACTION - Action id that opens an application into a workspace.
- APPLICATION_
PROVIDER - Prefix of the provider token naming an application in a workspace
whether or not it is running; see
application_action_target. - APPLICATION_
RESOURCE_ PREFIX - Resource prefix of a workspace’s “open this application” actions.
- CONFIRMED_
ACTION_ NEEDS_ REVISION - Why a host refuses a directory action that asks for confirmation when the request names no revision: the confirmation covers the action as the person was shown it, which only that revision identifies. A caller that confirms on its own policy rather than a person’s reads the current revision and retries.
- DEFAULT_
LEDGER_ CAPACITY - Default number of invocations an
InvocationLedgerremembers. - MAX_
CATALOGUE_ PAGE - Largest page a host returns, whatever a query asks for.
- MAX_
FETCHED_ RECORD_ BYTES - Largest record a device fetches from another at all.
- MAX_
RECORD_ PIECE_ BYTES - Largest piece of a record one answer carries, before encoding.
- MAX_
REMOTE_ ACTION_ FRAME_ BYTES - Upper bound on one encoded frame. Catalogues are the largest messages; a host that needs more pages them rather than raising this.
- MAX_
REMOTE_ WAIT - The longest a host holds a waiting answer, whatever
wait_msasked, so a relay connection or a broker call is never held open indefinitely. - OWN_
PROVIDER - Provider token naming the calling application’s own connection, for an app that routes one of its own actions through the host.
- REMOTE_
ACTIONS_ VERSION - Version of the
RemoteActionFrameschema this build speaks. - ROOM_
GOVERNANCE_ KIND - The resource kind of a room’s governance resource.
- ROOM_
GOVERNANCE_ PROVIDER - The provider a room’s own governance actions (membership, roles, grants, bans) are answered under. It is the host’s, not an app’s, so it is the one provider a caller names without reading it from a catalogue page.
- WORKSPACE_
PROVIDER - Prefix of the provider token for actions a workspace itself offers
rather than an application; see
workspace_provider.
Traits§
- Action
Host - A peer that runs actions on behalf of authenticated remote callers.
Functions§
- application_
action_ target - The target of the action
app_idoffers onresourcein workspaceroom. The host delivers it to the running app, or launches the app into the workspace first and delivers it once the app offers the action; the app’s own published contract admits it either way. - application_
open_ target - The target that opens
app_idinto workspaceroom. An invocation may carry the content hash of bytes to open read-only as its text argument. - application_
provider - The room and application an
application_action_targetprovider token names, orNonefor any other provider. - pending
- A connected
CompleterandPending. - refuse
- The answer that refuses request
messagewitherror— for a host that cannot be reached or is not running. ReturnsNonefor a message that is not a request. - room_
governance_ resource - The id of the room
room’s governance resource. - serve
- Answer one request from
calleragainsthost. - settle_
with - The state of
invocation, asActionHost::observereports it tocaller, once it has moved pastseen— or, with noseen, once it settles — or atuntil, whichever comes first. - workspace_
provider - The provider token for the actions workspace
roomitself offers. - workspace_
provider_ room - The room a workspace provider token names, or
Nonefor an application provider.