@openmarket/rooms-client
v0.5.1
Published
OM Rooms protocol client: wire types, WebSocket + REST clients, and chat view-models. Browser-safe (no node:/bun: imports).
Downloads
1,114
Readme
@openmarket/rooms-client
The OM Rooms protocol client: wire types and frame schemas, the WebSocket client, the REST social client, endpoint resolution, and the chat view-models (sidebar, topics, lanes) shared by every OM Chat surface (TUI, GUI, bots).
Browser-safety contract
Everything in this package runs unmodified in a browser: no node: or bun: imports, no filesystem or OS access, static imports only. Environment reads go through envString() in endpoints.ts, which returns undefined where process does not exist. The repo's boundary gate enforces this on every CI run; if you need daemon-side facilities (SQLite, vault, HTTP server), they live in the om CLI, not here.
Usage
There is no root export; import the surface you need by subpath:
import { createRoomSpace } from "@openmarket/rooms-client/social-client";
import { RoomClientMessageType, SUPPORTED_ROOM_PROTOCOL_VERSION } from "@openmarket/rooms-client/shared/rooms-protocol";
import type { RoomSpaceSummary } from "@openmarket/rooms-client/social-types";Subpaths: client, ws-client, social-client, social-types, library-publisher, doc-reconcile, topic-uri, doc-uri, endpoints, jwt, names, suggestion-attribution, merge3, types, version, agent/{armed-mode, lane-draft, lane-prompts, library-context, library-model, room-context, sidebar-model, topic-inbox, topic-view-batcher}, agent/clients/common, shared/{rooms-protocol, mentions, emoji-data}.
Bun consumers resolve raw TypeScript via the bun export condition; Node and bundlers get compiled JS plus .d.ts from dist/.
Versioning
The npm version is managed by hand: bump package.json here, npm publish, then bump the consumers' pins. The monorepo's release script deliberately skips this package's package.json. src/version.ts is the exception: it carries the wire/runner version and is auto-bumped with every om release so the WebSocket handshake tracks the daemon.
