Package-level declarations

Types

Link copied to clipboard
data class RemoteAddress(val endpoint: RemoteEndpoint, val incarnation: UUID = UUID.randomUUID())

Host-generated transport incarnation, independent of screen and operation identities. A newly joined backend chooses a fresh identity; frames for its predecessor cannot enter its protocol connection.

Link copied to clipboard
data class RemoteBindingSnapshot(val identity: Long, val generation: Long, val acknowledged: Long, val value: ProjectionValue, val endpoint: Long)

Detached source identity, replacement generation, edit confirmation, value, and current input endpoint.

Link copied to clipboard

Standard codec registration shared by every versioned Minecraft client adapter.

Link copied to clipboard

Explicit client-installed Canvas renderer schemas and server-only references to their typed properties. Native source acquisition and GPU work follow the client's existing Canvas attachment and presenter contracts.

Link copied to clipboard

Agreed limits and supported declaration schemas for one live player connection. A missing value at the adapter boundary means that negotiation has not completed.

Link copied to clipboard
fun interface RemoteClientActions

Owner-thread action sender captured by locally installed input behavior. An expired screen rejects calls without sending an event to a subsequent screen.

Link copied to clipboard
class RemoteClientSession(snapshot: RemoteMessage.Snapshot, registry: RemoteRegistry, limits: RemoteLimits = RemoteLimits(), send: (RemoteMessage) -> Unit) : AutoCloseable

One client-side retained declaration source bound to a server-issued session identity. All calls run under the construction execution owner; network receivers must enqueue work for that owner. Invalid patch bases request one snapshot; actions are never replayed during resynchronization.

Link copied to clipboard

Execution-owner-confined presentation-state store bounded by the current decoded screen and its negotiated entry limit. Keys combine a remote identity and a trusted type token; removed identities and terminal screens release their entries. Preparation runs before declaration evaluation, so incoming values never mutate state from a render callback.

Link copied to clipboard

Owner-thread declaration runtime for server-owned screens using the existing component DSL. It retains state and callbacks while projecting only portable properties; fonts and native widgets remain client-owned.

Link copied to clipboard
class RemoteConnection(types: Set<ProjectionType>, limits: RemoteLimits = RemoteLimits(), send: (ByteArray) -> Unit) : AutoCloseable

Protocol negotiation and ordered transport for one authenticated connection, confined to its execution owner. The adapter supplies authenticated bytes and synchronous transport writes, never arbitrary peers. The fixed bootstrap limits apply until both greetings have been sent; thereafter both sides use their intersection. All partial buffers and the transport callback are released on close or protocol failure.

Link copied to clipboard
data class RemoteDeclaration(val identity: Long, val type: ProjectionType, val value: ProjectionValue)

Detached typed component or modifier properties for one stable retained identity.

Link copied to clipboard
fun interface RemoteEditableValue

Optional owner-thread value behavior for flushing committed edits before a business action or client tick. Implementations compare their local value with their last sent value and preserve unacknowledged newer edits.

Link copied to clipboard
class RemoteEditBuffer<T : Any>(initial: T, generation: Long = 1)

Owner-thread optimistic editing state independent of any particular text or form control. Older acknowledgements cannot overwrite a newer local edit; a newer authoritative generation resets pending edits.

Link copied to clipboard
class RemoteEditingState<S : Any, T : Any>(val state: S, type: ProjectionType, snapshot: RemoteBindingSnapshot, decode: (ProjectionValue) -> T, encode: (T) -> ProjectionValue, read: (S) -> T, write: (S, T) -> Unit) : RemoteEditableValue

One stable native editing state with optimistic value ordering shared by standard and custom controls. The enclosing RemoteClientStates owns its lifetime and calls updates outside declaration evaluation. Unacknowledged values and unchanged confirmations never invoke write, preserving native selection and composition.

Link copied to clipboard

Complete decoded surroundings supplied to a trusted component factory. Factories use key and modifier unchanged so remote identity and modifier order survive reconstruction.

Link copied to clipboard

Authenticated host of a remote screen on one native player connection. Proxies must never forward backend frames claiming the proxy endpoint.

Link copied to clipboard

Detached terminal reasons understood without exposing server exception messages or stack traces.

Link copied to clipboard
class RemoteFrameInbox(limits: RemoteLimits = RemoteLimits()) : AutoCloseable

Bounded ingress between network callbacks and the connection's owner thread. Exhaustion permanently fails the inbox and clears its bytes; the owner must terminate the connection. Queue entries own defensive byte snapshots, bounded by both byte count and entry count.

Link copied to clipboard
class RemoteFraming(limits: RemoteLimits = RemoteLimits()) : AutoCloseable

Ordered bounded framing for one player connection. Only one partially received logical message is retained; interleaving or replay is rejected. A zero-length cancellation frame retires that transfer without delivering partial application data. The owner supplies monotonic milliseconds and closes this object on disconnect or protocol failure.

Link copied to clipboard
class RemoteImageCodec(maximumBytes: Int = RemoteLimits().messageBytes)

Portable image sources retaining resource identifiers or bounded immutable straight-ARGB pixels. Transport fragmentation is handled independently; pixel decoding never allocates from unchecked dimensions.

Link copied to clipboard
sealed interface RemoteLifecycleEvent<out Owner>

Committed lifecycle notifications emitted inside the service's execution owner. Adapters translate these into their platform event API; listener failures never undo committed state. UI identity is scoped to the service and connection; application event fields are detached snapshots.

Link copied to clipboard
data class RemoteLimits(val frameBytes: Int = 24 * 1024, val messageBytes: Int = 8 * 1024 * 1024, val valueDepth: Int = 64, val collectionEntries: Int = 65536, val treeNodes: Int = 8192, val pendingBytes: Int = 16 * 1024 * 1024, val assemblyMillis: Long = 10000, val valueEntries: Int = minOf(messageBytes, 262144), val reconstructionMillis: Long = 1000, val hudSessions: Int = 16)

Hard per-connection admission bounds, negotiated by taking each endpoint's minimum. Byte limits include encoded headers; values are checked before incoming allocation.

Link copied to clipboard
sealed interface RemoteMessage

Typed messages carried over an already established player connection. Session and sequence validation belongs to the connection/session owners, not the byte decoder.

Link copied to clipboard
class RemoteMessageCodec(limits: RemoteLimits = RemoteLimits())

Version-one message schemas layered on the bounded value codec. All external discriminators are decoded into typed messages before dispatch.

Link copied to clipboard

Trusted client inputs for one active modifier factory. identity remains stable while the corresponding server modifier survives reconciliation. State reads are confined to the client session's owner thread after preparation.

Link copied to clipboard
class RemoteNode(val declaration: RemoteDeclaration, modifiers: List<RemoteDeclaration> = emptyList(), children: List<Long> = emptyList())

Detached logical component with ordered active modifiers and child identities. Both collections are defensive immutable snapshots.

Link copied to clipboard
sealed interface RemotePacket

Bounded native-channel envelope shared by direct servers, proxies, and clients. Discovery requests greetings from both hosts; subsequent frames target one exact host incarnation. The fixed envelope is included in the native channel bound and excluded from the negotiated inner fragment bound.

Link copied to clipboard
class RemotePacketStream(val address: RemoteAddress, limits: RemoteLimits = RemotePacket.limits, send: (ByteArray) -> Unit) : AutoCloseable

Execution-owner-confined ordering boundary for one host incarnation across asynchronous proxy message events. Retains at most the negotiated pending bytes and entry count; gaps expire on monotonic adapter ticks. Screen cancellation occupies its ordinary ordered frame position, so dropped transfers cannot leave sequence gaps. Terminal close releases all queued bytes and the native writer.

Link copied to clipboard
class RemotePatch(val root: Long, changed: Collection<RemoteNode>, removed: Collection<Long>)

Immutable changes between two successive complete declaration trees. Applying a patch validates the entire candidate before returning it, leaving the previous tree intact on failure.

Link copied to clipboard

Callback-lifetime context for preparing decoded state before a client declaration becomes visible. Factories retain values through states, never this callback-lifetime context.

Link copied to clipboard

Ordering for client state preparation, independent of component order in a received tree. Owners prepare compound native state before references such as scrollbars attach to its shared position.

Link copied to clipboard
class RemoteProtocolException(val reason: RemoteFailure, message: String, cause: Throwable? = null) : IllegalArgumentException

A terminal protocol failure carrying the reason exposed to both session owners.

Link copied to clipboard

Explicit trusted client factories for negotiated component and modifier schemas. Registration is complete before a connection captures types; peers can never supply factories or class names. Property decoders validate untrusted values before invoking a typed factory.

Link copied to clipboard
class RemoteScreenService<Player : Any, Owner : Any>(endpoint: RemoteEndpoint, send: (Player, ByteArray) -> Unit, report: (Throwable) -> Unit, dispatchClose: (() -> Unit) -> Unit = { it() }, notify: (Player, RemoteLifecycleEvent<Owner>) -> Unit = { _, _ -> }) : AutoCloseable

Owns authenticated player transports and declarations under one adapter execution owner. Network callbacks only enqueue bounded bytes; handlers never run in messaging callbacks.

Link copied to clipboard

Detached lifecycle handle for one host-owned screen. Status can be read from any thread; close uses the host's execution contract (Paper primary thread, Folia player region, or Velocity's UI queue). The common uiSession requires its execution owner for all property reads and controls. Terminal handles retain no player, plugin, handler, or UI state references.

Link copied to clipboard
class RemoteServerSession(val identity: Long, title: ProjectionValue, supportedTypes: Set<ProjectionType>, limits: RemoteLimits = RemoteLimits(), send: (RemoteMessage) -> Unit, pausesGame: Boolean = false, eventSession: UiSession? = null, controller: RuntimeUiController? = null, settings: RemoteUiSettings = RemoteUiSettings(), content: () -> Element) : AutoCloseable

One authoritative screen bound by its transport owner to one authenticated connection. All calls run under the construction execution owner; source callbacks remain owned by the shared core session. Only the current tree and current action table are retained, and terminal cleanup releases both.

Link copied to clipboard
sealed interface RemoteSessionStatus

Observable local state of a remote screen's ownership lifetime.

Link copied to clipboard
class RemoteStateKey<T : Any>(type: KClass<T>)

Stable referential type token for one client extension's retained presentation state. Keep a singleton token per logical state kind; server data never selects a JVM class.

Link copied to clipboard

Portable unresolved text preserving translation arguments and resource-pack font selection. Opaque platform payloads require an explicit application extension and are rejected here.

Link copied to clipboard
class RemoteTree(val root: Long, nodes: Collection<RemoteNode>, limits: RemoteLimits = RemoteLimits())

Validated immutable rooted declaration tree; each component and modifier has a unique identity. Construction rejects cycles, shared children, unreachable records, and excess depth or node count.

Link copied to clipboard
data class RemoteUiSettings(val presentation: UiPresentation = UiPresentation.Screen, val category: UiCategory? = null, val inputPolicy: UiInputPolicy = UiInputPolicy.BlockAll, val visibility: UiVisibilityPolicy = UiVisibilityPolicy(), val hudOrder: Int = 0)

Immutable, typed presentation settings negotiated with the remote UI's initial snapshot.

Link copied to clipboard
class RemoteValueCodec(limits: RemoteLimits = RemoteLimits())

Strict bounded binary encoding for detached projection values. The format uses explicit tags, big-endian numbers, and length-prefixed strict UTF-8. Instances are immutable and do not retain encoded values or decoded buffers.

Functions

Link copied to clipboard

Copies negotiated application support without exposing wire framing or runtime implementation types.