Expand description
What an app server says to the bridge, and how it says it.
Kept separate from sapphire-framework-bridge so that an app server can talk to the
bridge without linking iroh: Cargo unifies features across a workspace build, so a
feature flag on one crate would not have been enough.
See docs/superpowers/specs/2026-09-16-process-architecture-design.md §4.3 and §5.
Structs§
- Ack
- The success payload of a call that returns nothing.
- ApiKey
- The remote slot’s API key. Never printed:
DebugshowsApiKey(..). - DataAck
- The bridge’s answer to a
DataHeader, sent as one line before the raw bytes begin. - Device
Priority SetParams - Parameters of
DEVICE_PRIORITY_SET. - Device
Priority SetResult - Result of
DEVICE_PRIORITY_SET. - Device
Retire Params - Parameters of
DEVICE_RETIRE. - Device
Retire Result - Result of
DEVICE_RETIRE. - Device
Settings - This device’s own settings, never synced.
- Embed
Device SetParams - Parameters of
EMBED_DEVICE_SET. - Embed
Images Params - Parameters of
EMBED_IMAGES. - Embed
Info Result - Result of
EMBED_INFO. - Embed
KeySet Params - Parameters of
EMBED_KEY_SET.Debughides the key. - Embed
Model Info - The embedding model a bridge serves.
- Embed
Model SetParams - Parameters of
EMBED_MODEL_SET. - Embed
Params - Parameters of
EMBED. - Embed
Result - Result of
EMBEDandEMBED_IMAGES. - Embed
Settings Result - Result of every
embed.*settings method: the settings, and what they resolve to. - External
Device AddParams - Parameters of
EXTERNAL_DEVICE_ADD. - External
Device Authenticate Params - Parameters of
EXTERNAL_DEVICE_AUTHENTICATE.Debughides the token. - External
Device Authenticate Result - Result of
EXTERNAL_DEVICE_AUTHENTICATE: who it is. A refusal is an error, never a result. - External
Device Info - One external device, as the ledger has it. Never carries the token or its hash.
- External
Device List Result - Result of
EXTERNAL_DEVICE_LIST. - External
Device Select Params - Parameters naming one record: retire, restore, rotate.
- External
Device SetApps Params - Parameters of
EXTERNAL_DEVICE_SET_APPS. - External
Device Token Result - Result of
EXTERNAL_DEVICE_ADDandEXTERNAL_DEVICE_ROTATE: the record and its new token, which is never available again.Debughides the token. - GrainId
- Grain id struct
- Incoming
Params - Parameters of the
INCOMINGnotification. - Invite
Params - Parameters of
INVITE. - Invite
Result - Result of
INVITE. - Join
Params - Parameters of
JOIN. - Join
Result - Result of
JOIN. - Local
Model - The local slot’s model.
- Model
Settings - The two slots: the workgroup’s synced
embedding.toml, or a host’s own without one. - Peer
Info - One device of the workgroup.
- Peers
Result - Result of
PEERS. - Register
Params - Parameters of
REGISTER. - Register
Result - Result of
REGISTER. - Remote
Model - The remote slot’s model.
- Route
Status - One row of the routing table.
- Status
Result - Result of
STATUS. - Unregister
Params - Parameters of
UNREGISTER. - Workgroup
Create Params - Parameters of
WORKGROUP_CREATE. - Workgroup
Create Result - Result of
WORKGROUP_CREATE. - Workgroup
Status - The workgroup this host belongs to.
- Workgroup
Workspace Info - One workspace the workgroup knows about.
- Workspace
Registration - One workspace an app server owns.
- Workspace
Roles - Who the bridge elected for one workspace this host’s app servers own.
- Workspaces
Result - Result of
WORKSPACES.
Enums§
- Data
Header - The first line of a data-plane connection.
- Embed
Note - Why a bridge does not embed, or what it lacks while it does.
- Embed
Request - One settings request, as either CLI builds it from its arguments.
- External
Device Outcome - What a management request answers.
- External
Device Request - One management request, as either CLI builds it from its arguments.
- Managed
By - How an app server process came to exist, as it tells the bridge in
REGISTER. - Model
Source - Where the model settings in effect come from.
- QType
- How the local model’s weights are held in memory: a device setting, never synced.
- Slot
- One of the two model slots.
- Slot
Model - One slot’s model, for
EmbedModelSetParams.
Constants§
- ALPN
- The application-layer protocol name used on every peer connection.
- API_
VERSION - The version of the bridge’s control-plane API: the methods below and their types.
- BRIDGE_
DATA_ NAME - The endpoint name the bridge’s data plane listens under.
- BRIDGE_
NAME - The endpoint name the bridge’s control plane listens under.
- DEFAULT_
DIMENSION LocalModel::dimension’s default, and the dimension #183 settled on.- DEFAULT_
MAX_ TOKENS LocalModel::max_tokens’s default.- DEFAULT_
PRIORITY - A device’s priority when its record names none. Mirrors the registry’s own constant; this crate does not depend on the registry.
- DEVICE_
PRIORITY_ SET - Set a device’s election priority.
- DEVICE_
RETIRE - Retire a device of this host’s workgroup.
- EMBED
- Embed texts with the bridge’s embedding model.
- EMBED_
DEVICE_ SET - Switch one slot on or off on this device.
- EMBED_
IMAGES - Embed images with the bridge’s embedding model, into the texts’ space. Served only when
EmbedModelInfo::imagesis set; absent from bridges before 2.4. - EMBED_
INFO - Ask the bridge which embedding model it serves, if any.
- EMBED_
KEY_ CLEAR - Remove the remote slot’s API key from this device.
- EMBED_
KEY_ SET - Store the remote slot’s API key on this device.
- EMBED_
MODEL_ SET - Set or clear one model slot.
- EMBED_
SETTINGS - Read the embedding settings and what they resolve to.
- EXTERNAL_
DEVICE_ ADD - Add an external device; the answer carries its token, once.
- EXTERNAL_
DEVICE_ AUTHENTICATE - Check a presented token for an application: who it is, or an error.
- EXTERNAL_
DEVICE_ LIST - List the workgroup’s external devices.
- EXTERNAL_
DEVICE_ RESTORE - Bring a retired external device back, with its token.
- EXTERNAL_
DEVICE_ RETIRE - Retire an external device: its token stops working, the record stays.
- EXTERNAL_
DEVICE_ ROTATE - Replace an external device’s token, keeping its id.
- EXTERNAL_
DEVICE_ SET_ APPS - Set the applications an external device may use.
- INCOMING
- Notification: a peer wants a workspace this app server owns.
- INVITE
- Create an invite, and get the ticket to hand to the joining device.
- JOIN
- Join the workgroup a ticket names.
- LOCAL_
MODEL - The only local model for now.
- MAX_
TOKENS - Upper bound on
LocalModel::max_tokens. - PEERS
- List the workgroup’s devices and whether they are connected.
- REGISTER
- Announce which workspaces this app server owns.
- STATUS
- Describe the bridge.
- UNREGISTER
- Stop owning one workspace.
- WORKGROUP_
CREATE - Found a workgroup on this host, as its first device.
- WORKSPACES
- List the workspaces the workgroup knows about.
Functions§
- describe
- What
embedding showprints, one line each. - describe_
external_ device - One line describing a record: name, id, applications, state.
- describe_
external_ outcome - The lines either CLI prints for an outcome. A token is printed here, and only here.