API index and search · Build metadata
Source snapshot
packages/room/src/index.ts
1// @rindle/room — the Rindle Realtime room (P0 read-only follower + P1 lease-gated2// downstream + P2 shared optimistic writes).3//4// Four layers, deliberately separable:5// - `initRoomWasm` / `WasmRoom` (src/wasm.ts): the wasm room core — rindle-room-wasm6// compiled to `pkg/`, host-neutral (the Durable Object shell runs the SAME artifact).7// - `mintRoomToken` / `verifyRoomToken` (src/token.ts): the §10.1 self-authorizing8// signed lease token — minted by the API server (the authority), verified by any9// shell via WebCrypto (Node and Workers alike).10// - `MutationTx` / `RoomJournal` (src/mutation-tx.ts, src/journal.ts): the §5.1 write11// plane's two seams — the §4.2 mutator interface (a shared app registry drops in12// verbatim) and the pluggable durable sidecar an ack means (§8.1).13// - `createRoomShell` (src/shell.ts): the Node test shell — upstream ws subscriber of a14// live rindled, downstream ws server speaking the `@rindle/remote` protocol verbatim,15// gated by the tokens, with lease-TTL enforcement, the `/revoke` control plane, and16// the journaled write path.1718export { initRoomWasm, WasmRoom } from "./wasm.ts";19export { createRoomShell } from "./shell.ts";20export type {21 DownstreamOptions,22 RoomScopeSpec,23 RoomShell,24 RoomShellOptions,25 UpstreamOptions,26 WritesOptions,27} from "./shell.ts";28export { journalEntryOutcome, memoryJournal } from "./journal.ts";29export type { RoomFlushRecord, RoomJournal, RoomJournalEntry } from "./journal.ts";30export { fatalAuthorityError, httpAuthority } from "./authority.ts";31export type {32 AuthorityApplyResult,33 AuthorityConflict,34 HttpAuthorityOptions,35 RoomAuthority,36} from "./authority.ts";37export type {38 KeyedRow,39 MutationTx,40 RoomMutator,41 RoomMutatorCtx,42 WireValue,43} from "./mutation-tx.ts";44export { mintRoomToken, verifyRoomToken, RoomTokenError, scopeSpecsHash } from "./token.ts";45export type {46 MintRoomTokenOptions,47 RoomTokenPayload,48 VerifyRoomTokenOptions,49} from "./token.ts";50