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 AdoptRole

Which side of a room an SeamRoomFactory.adopt takes, and what that side needs.

Link copied to clipboard
sealed interface FailureReason

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

Link copied to clipboard
class FramesLost(val member: PeerId, val dropped: Long, val claimed: Boolean) : RuntimeException

Frames from one admitted member were routed and are gone: the reason a Room.incomingFrom flow failed instead of delivering them (#2802).

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, deviceKeyStore: DeviceKeyStore, admission: HostAdmission, 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 key: DidKey, 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)

What a member says about itself: its display name and the ids its Hello carried.

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

A raw Room.broadcast or Room.sendTo payload would be interpreted as room protocol traffic.

Link copied to clipboard
data class ReturningMark(val previousId: PeerId?)

A MembershipEvent.Joined member is a device coming back on the pass its host gave it (#3222): its seat was gone, and the host let it in again without asking its admission policy.

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, deviceKeyStore: DeviceKeyStore, heartbeatConfig: HeartbeatConfig = HeartbeatConfig(), admitTimeout: Duration = DEFAULT_ADMIT_TIMEOUT, memberInboxCapacity: Int = DEFAULT_MEMBER_INBOX_CAPACITY, reconnectControllerFactory: JoinerReconnectControllerFactory? = null) : RoomFactory

Loom-backed implementation of RoomFactory.

Link copied to clipboard
@RequiresOptIn(message = "Session types only the room builds in production. No stability promise; they may change in any release.", level = RequiresOptIn.Level.ERROR)
annotation class SessionInternalApi

Marks what :kuilt-session shares with kuilt's own session test support, and nothing else. It carries no stability promise for consumers.

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.