Package-level declarations

Types

Link copied to clipboard
sealed interface AdmissionFailure

Why a joiner's admit handshake failed terminally. See MembershipEvent.AdmissionFailed.

Link copied to clipboard
sealed interface FailureReason

Why a joiner's session terminally failed. Attached to MembershipEvent.HostLost.

Link copied to clipboard
typealias JoinerReconnectControllerFactory = (roomId: RoomId, scope: CoroutineScope, clock: () -> Instant) -> JoinerReconnectController

Factory for a host-side JoinerReconnectController, invoked once when a host room starts with the room-owned roomId, scope, and clock — the three inputs a controller needs but that only exist after the seam is woven (the roomId is minted against the host's woven selfId), so a caller cannot pre-build the instance and must supply this lambda instead.

Link copied to clipboard
sealed interface LeaveReason

Why a peer is leaving a room.

Link copied to clipboard
sealed interface Liveness

The liveness state of an admitted member.

Link copied to clipboard
class LoomRoomHost(loom: Loom, pattern: Pattern, clock: () -> Instant = { Clock.System.now() }, heartbeatConfig: HeartbeatConfig = HeartbeatConfig()) : RoomHost

Transport-agnostic single-room RoomHost over any Loom. Opens one host session via SeamRoomFactory.host, hands the live Room to onRoom exactly once, then suspends until cancelled (leaving the room cleanly on the way out).

Link copied to clipboard
data class Member(val id: PeerId, val identity: MemberIdentity, val liveness: Liveness, val principal: Principal? = null)

An admitted member of a Room.

Link copied to clipboard
data class MemberIdentity(val displayName: String, val sessionId: String, val deviceId: String? = null)

Stable identity for a room member, used for dedup across reconnects.

Link copied to clipboard

Per-member display names tracked with last-writer-wins semantics, backed by LWWMap.

Link copied to clipboard
sealed interface MembershipEvent

Events emitted by Room describing changes to member membership and liveness.

Link copied to clipboard

Moved to kuilt-core (us.tractat.kuilt.core.Principal) so fabric-level admission (LinkAdmission on the hosted-hub path) can consume it without depending on kuilt-session. This alias keeps existing kuilt-session consumers source-compatible.

Link copied to clipboard

Moved to kuilt-core (us.tractat.kuilt.core.PrincipalAttested). This alias keeps existing kuilt-session consumers source-compatible. SeamRoom reads the attested principal at admit time and carries it onto the admitted Member.

Link copied to clipboard
sealed interface ReconnectReason

Why a peer's link is currently down and a reconnect / grace window is in progress.

Link copied to clipboard
interface Room

A membership-aware session room built over a us.tractat.kuilt.core.Seam.

Link copied to clipboard

Constants and framing helpers for Room.channel channel views.

Link copied to clipboard
interface RoomFactory

Creates Rooms backed by a us.tractat.kuilt.core.Loom.

Link copied to clipboard
data class RoomFrame(val sender: PeerId, val payload: ByteArray)

A frame received from an admitted Member, tagged with their PeerId.

Link copied to clipboard

The single source of truth for the room frame-prefix byte space (#2007).

Link copied to clipboard

Accepts incoming connections and surfaces each as an admitted Room.

Link copied to clipboard
class SeamRoomFactory(loom: Loom, scope: CoroutineScope, clock: () -> Instant, heartbeatConfig: HeartbeatConfig = HeartbeatConfig(), admitTimeout: Duration = DEFAULT_ADMIT_TIMEOUT, reconnectControllerFactory: JoinerReconnectControllerFactory? = null) : RoomFactory

Loom-backed implementation of RoomFactory.

Link copied to clipboard

The role this peer plays in the room.

Functions

Link copied to clipboard
fun <S : Quilted<S>> RoomReplicator(room: Room, id: String, initial: S, stateSerializer: KSerializer<S>, scope: CoroutineScope, config: QuilterConfig = QuilterConfig()): Quilter<S>

Creates a Quilter over Room.channel(id) in one call.

Link copied to clipboard
fun Seam.withPrincipal(principal: Principal?): Seam

Returns a Seam that reports principal via PrincipalAttested. When principal is null the receiver is returned unchanged — an unauthenticated connection carries no attestation and is never wrapped.