Room plugins: architecture

A room plugin is an external code package that a room author uploads and enables in their own room. The platform is not rebuilt or restarted, and no global administrator token is needed. Plugin code is treated as untrusted: it runs in an isolated environment in each participant's browser and changes the room only through operations the platform allows.

The first real plugin is automatic seating on entry. It is enabled in a chosen room only and does not change the behavior of other rooms.

Availability

Who does what

Package

A package is a single UTF-8 .vrata-plugin.json file shaped { manifest, entry }: a description and one bundled JavaScript module. There are no archives, extra resources or external URLs. A package is at most 1 MiB.

Manifest field Value
schemaVersion, sdkApiVersion Currently 1.
id Up to 64 characters: lowercase Latin letters, digits, dots and hyphens.
version Strictly MAJOR.MINOR.PATCH. A version cannot be reused with different contents.
displayName Up to 128 bytes.
requestedCapabilities Permissions this version asks for.
configSchema A flat settings schema: string, number, boolean, enum; up to 32 fields and 16 KiB.
entrySha256 SHA-256 of the exact module bytes.

The server keeps the original file bytes and computes artifactSha256 over them. Nothing is re-serialized, so the hash identifies a version unambiguously.

SDK

Event When it arrives
room.ready The room is ready; a seat snapshot and the alias of the own participant.
room.connection Connection state: connected, reconnecting or disconnected.
seating.snapshot Seat occupancy changed.
lifecycle.dispose The instance ends: disabled, updated, session-ended or lease-expired.
Permission SDK call What it allows
seating.claimSelfOnEntry sdk.seating.claimSelfOnEntry(seatId) Claim a free seat for oneself on entry. Result: accepted, busy, cancelled or offline.
seating.cancelPendingOwnClaim sdk.seating.cancelPendingOwnClaim() Cancel one's own unconfirmed claim.
status.set sdk.status.set(text) A plugin status line visible to participants: up to 512 bytes, at most twice per second.

A broker refusal is returned as a code: capability-denied, stale-generation, lease-expired, arrival-not-allowed, seat-busy, cancelled, offline, quota-exceeded or plugin-failed.

Server side

All routes are scoped to one room:

Rules:

Execution in the browser

Plugin code runs along the chain: room page → trusted kernel Worker → nested guest Worker → QuickJS 0.32.0 compiled to WebAssembly. The WASM module is served by the platform itself, without a CDN.

Limit Value
VM memory heap 16 MiB, stack 32 KiB; WASM memory 16 to 48 MiB
Time 50 ms per handler; 100 ms per second and 2 s per minute in total
Worker response within 500 ms
SDK requests 10 per second, queue of 32, one seat claim in flight
Data message up to 16 KiB, nesting up to 8, up to 512 nodes
WASM load up to 2 MiB and 3 s, one retry per page lifetime

When a limit is exceeded, only that instance stops. It is restarted at most 3 times within 10 minutes. If the environment itself cannot start (WASM fails to load after the retry, or a Worker does not boot), plugins are disabled on that page until it is reloaded. The meeting, voice and manual seating keep working.

Example: seating on entry

Documents in the platform repository

At revision cbf0f7cebaec:

What is not done yet is listed in Room plugins: roadmap.