Mesh
A Seam over a fully-connected N-peer mesh of point-to-point Connections, with support for admitting links that arrive after construction.
Obtain one from meshSeam. Beyond the Seam contract it adds addLink for dynamic peer-join, and it is a PrincipalRoster: host-verified principals attached to admitted connections (via us.tractat.kuilt.core.withPrincipal) are observable per peer, maintained atomically with the link set.
Properties
Host-verified principals of currently-linked peers, keyed by the PeerId each was verified against at admission. Peers with no attestation are absent. An entry is removed when its peer's link drops; the map empties when the seam tears down.
Live capability of the fabric carrying this session — its role(s) and whether it is usable right now. Updates as radios, permissions, and network paths change.
Functions
Admit a Connection to a peer that dialed in after construction.
Disconnect from the session. Idempotent.
Run body but abort it with a SeamCollapsedException the instant this Seam collapses mid-operation — either the fabric latches SeamState.Torn (transport tear) OR the live peer set satisfies abortWhen (membership drain). Whichever of body, the tear, or the drain resolves first wins; the losers are cancelled.