GamePresence
Lobby presence over seam, backed by an EphemeralMap replicated by Quilter.
Carries each peer's host-declaration flag so the game host entry point can fail fast when a duplicate host is detected, and the host's admission-closed signal so gameJoin can throw RosterFullException when the roster is already full.
Dedicated seam required. Pass a us.tractat.kuilt.core.MuxSeam channel, not the Raft seam — Seam.incoming is single-collection (ADR-034). Task 6 wires this to the game host entry point.
Parameters
the Seam to replicate presence over.
the CoroutineScope whose kotlinx.coroutines.Job parents the replicator's owned child job. In tests, pass backgroundScope from kotlinx.coroutines.test.TestScope so the Quilter's infinite collectors cancel cleanly at test end.
suppress the Quilter TestDispatcher guard warning; set true in tests that run under kotlinx.coroutines.test.UnconfinedTestDispatcher.
Properties
The final voter set once admission has closed on this presence channel, null until then.
The set of replicas that have announced themselves on this presence channel — every replica that has called declareHost or declarePresent, as observed in the converged map.
true once the host has signalled that the spectator gallery is closed — either because spectators are disabled or because maxSpectators has been reached.
Functions
Publishes the admission-closed signal on the host's presence slot, replacing the "host" marker with an encoded form that carries the final voter set.
Re-opens admission by reverting the host's slot to HOST_DECLARED.
The converged set of replicas that have declared themselves host.
Declare this peer as the game host.
Declare this peer as a non-host participant ("present").
Declare this peer as a spectator (permanent non-voting learner).
Publishes the spectators-closed signal on the host's presence slot.
Declare that this voter is voluntarily leaving the session.
The converged set of replicas that have declared themselves as spectators.
The converged set of replicas that have declared a voluntary departure via declareVacate.