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§
- agent_
runs - Runs of asks to this session’s agents, as the session publishes them.
- crash_
records - What this computer recorded of the times it went wrong: a desktop that stopped responding or stopped unexpectedly, a part of it that restarted, the computer itself stopping (the kernel’s record from before a reset), and a fault the system’s core went on from.
- device_
pairing - Pairing a nearby device with the person’s identity. The host runs it — LAN discovery, and the approval an administrator authenticates — so no application starts a privileged process. It is answered under the host’s provider, which a caller names without reading a catalogue, for the person at this device in the workspace their connection was admitted to.
- downloaded_
apps - The programs the person downloaded and added to their apps: the
AppImages, tarball programs and loose binaries that ship no desktop entry, and the entry Tilo keeps for each of them. - feedback
- Read-only feedback admission and canonical acknowledgment on the existing authenticated action transport. These values never grant membership.
- home_
relay_ hosting - Hosting the person’s workspaces on their home relay as well as on the device that governs them: per workspace, the relay is one of the workspace’s hosts or it is not, as the workspace’s governor records its hosts. It is answered under the host’s provider, which a caller names without reading a catalogue, for the person at this device.
- identity_
admin - Administering the person’s identities and the devices trusted under them. The host keeps the identity store — records, root secrets, the active selector, device fleets — and runs every step, so no application reads a secret or signs with the root key. It is answered under the host’s provider, which a caller names without reading a catalogue, for the person at this device in the workspace their connection was admitted to.
- own_
device - Using an action on another of the person’s own devices and hearing its answer.
- settings_
records - The person’s settings, kept by the host whether or not the app that shows
them is open: each section a record published with its field edits and
verbs (
settings:<kind>), changed through them as that app’s window changes them. It is answered under the host’s provider for the person at this device in the workspace their connection was admitted to. - task_
programs - An agent task’s tilolang programs (
docs/designs/app-language/agents.md, “How a program runs”), served by the session to the Tasks agent’s loop. - workspace_
activity - A workspace’s activity as the session serves it: what changed since this device last looked, the full history, and the replay of its layout.
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. It can instead deliver a published resource action after launch (ApplicationLaunch::with_action). The source app never hands over a local path or starts a process itself. - 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 - 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. - Confirmation
Question - A question a device of the person’s puts to them on another of their own devices: one invocation of an action their grants leave to them.
- Confirmed
Invocation - The person’s answer to
ActionHost::confirm: the confirmation to invoke again with, and the arguments to invoke with. - Execution
Lease - Host-owned execution lifetime. Clones share closure, never authority. Equality and hashing use the immutable minted identity, not liveness.
- Found
- One resource a search found, as every caller of the one search reads a result: the resource it is about, what it is, and what it reads as.
- 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
Address - One record of a workspace, by its app (the id whose records it is) and its id there (empty for the app’s record of the workspace).
- Record
Change - An action to run on one record at the record’s origin, as an agent task invokes it: the record (by its app and its id there), the action’s subject resource and the action, its arguments, and what the task’s preview planned, when it planned.
- 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 workspace 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.
- Confirmation
Reply - The person’s answer to a
ConfirmationQuestion. - 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.
- Record
Copy - What a read of one record answers.
- 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_
OPEN_ TYPE - Encoded operation of the shared view action that shows the item at an anchor, as picking that item’s search hit does.
- 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_ KIND - Resource kind of an installed Tilo application a workspace lists, which
a catalogue query’s
resource_nameanswers whole. - 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.
- CONTENT_
PUTS_ UNAVAILABLE - What a host without a content store answers.
- DEFAULT_
LEDGER_ CAPACITY - Default number of invocations an
InvocationLedgerremembers. - MAX_
CATALOGUE_ PAGE - Largest page a host returns, whatever a query asks for.
- MAX_
CONTENT_ PUT_ CHUNK - The most raw bytes one append carries. MCP requests are bounded at 1 MiB; 512 KiB is about 683 KiB of base64, leaving room for the rest of the request.
- MAX_
OPEN_ CONTENT_ PUTS - Uploads one session keeps open at once.
- 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. - NODE_
PERMITS_ ACTION - Whether the caller may change the node: output
{"undoable": bool}, as the workspace decides their writes there. - NODE_
RESOURCE_ PREFIX - Resource prefix of a workspace’s actions on one node of its published
tree (a record, an item of it): the rest is the node’s text form
(
workspace:…/app:…/kind:…/resource:…/item:…). Seenode_target. - OWN_
PROVIDER - Provider token naming the calling application’s own connection, for an app that routes one of its own actions through the host.
- RECORD_
READS_ FOR_ TASKS - What a caller that is not an agent task acting for its person is told.
- RECORD_
READS_ UNAVAILABLE - What a host without record reads answers.
- REMOTE_
ACTIONS_ VERSION - Version of the
RemoteActionFrameschema this build speaks. - SHARE_
NODE_ ACTION - Share a node with the workspace’s members: grant them, on that node
only, what argument
accessnames (vieworedit), as much as the person sharing holds there, under the share’s id (argumentshare). - STALE_
REVISION_ REASON - What
ActionHostError::StaleRevisionsays, and the reason it carries on the wire as anActionHostError::InvalidRequest. - UNSHARE_
NODE_ ACTION - Take back what the share named by argument
sharegranted. - WORKSPACE_
GOVERNANCE_ KIND - The resource kind of a workspace’s governance resource.
- WORKSPACE_
GOVERNANCE_ PROVIDER - The provider a workspace’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.
- Content
Put - One upload in progress, owned by the session that began it: dropped unfinished (the session ended), it stores nothing.
- Content
Puts - A host’s door for content puts.
- Record
Changes - A host’s door for an agent task’s changes to records outside their apps. A change goes to
the record’s origin, which runs the action against the record as it is then, applies what it
wrote as the task’s step and answers with its JSON:
{"ok": {value, resources}, "differs": bool}, or{"failed": why}when the action did not run. - Record
Reads - A host’s door for reading records outside their app.
- Resource
Search - The desktop’s one search, as a host that holds it offers it to a caller who asks by words: the palette’s ranking, the same results in the same order. The search itself lives on the thread that holds the desktop, so an answer comes back later, as an action’s does.
Functions§
- activate_
spec - The shared view action
APPLICATION_ACTIVATE_ACTION(“Show this window”), calledlabeland described bydescriptionin the reader’s language: every app’s window publishes it, a framework app’s and a tilolang host’s instance alike, and it answers{"activation_requested": true}once the window was asked to come forward. - activation_
requested - What
APPLICATION_ACTIVATE_ACTIONanswers once the window was asked to come forward. - application_
action_ target - The target of the action
app_idoffers onresourcein workspaceworkspace. 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 workspaceworkspace. An invocation may carry the content hash of bytes to open read-only as its text argument. - application_
provider - The workspace and application an
application_action_targetprovider token names, orNonefor any other provider. - application_
provider_ record - The record an
application_record_targetprovider token names, orNonewhen it names none. - application_
record_ target application_action_targetinapp_id’s recordrecord: the host delivers to the app showing that record, or launches the app on it. Opening a reference is the resource’sopenon this target.- node_
target - The target of
action(one ofSHARE_NODE_ACTION,UNSHARE_NODE_ACTION,NODE_PERMITS_ACTION) onnode, the text form of a node of workspaceworkspace’s tree. - pending
- provider_
workspace - The workspace a workspace provider token names, or
Nonefor an application provider. - 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. - 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. - stem_
word - The stem an English word is matched by: its plural, its participle and its “-ing” form reduce to the word a description most likely spells (“drawing” and “draw”, “dragging” and “drag”, “scrolling” and “scroll”, “signed” and “sign”). An inflection is only undone when what is left is still a word of reasonable length, so “ring” and “thing” keep their own letters rather than becoming “r” and “th”.
- workspace_
governance_ resource - workspace_
provider - The provider token for the actions workspace
workspaceitself offers.