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
- Plugins are on the platform
mainbranch after the v0.1.0 release. This page describes revisioncbf0f7cebaec. They are not part of the tagged release or the0.1.0images. - Room identity protocol v2 is required. On a server still on protocol 1 the plugin routes answer
409 plugin_identity_not_active, the author panel is hidden and the sandbox is not loaded. Activation is described in the "Room Identity v2 Activation" section ofdocs/self-hosting.mdin the platform repository. - SDK API version 1 is not declared stable yet: before
1.0it may change, with the changes described in release notes.
Who does what
- A plugin author builds a package outside the platform repository with the SDK and CLI.
- A room author is the current Host or the owner of a personal room with a proven session. They upload the package, review the requested permissions, approve them and enable an exact version. Members, Guests and Presenters cannot manage plugins; the server checks the role on every request. The platform administrator can perform the same operations through the API.
- The platform stores the package, serves it to the room participants and runs the code in an isolated browser environment. The server decides room state, for example whether a seat is free.
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
- Package
@vrata/room-plugin-sdk0.2.0, Apache-2.0, source inpackages/room-plugin-sdk. The platform server distributes the SDK itself:/assets/plugin-sdk/releases.jsonlists versions 0.1.0 and 0.2.0 with SHA-256 of the archives. - CLI
vrata-room-plugin:bundlebuilds the module,packpacks the manifest and module into.vrata-plugin.json,validatechecks a package with the same validator the server uses. - The module exports
init(context),onEvent(event, context)anddispose(context).context.configholds the room settings,context.sdkthe platform API. - Examples:
welcome-statusshows a status line,auto-seatseats a participant on entry.
| 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:
GET /api/rooms/:roomId/plugins/packages— the room library: packages, bindings and revision.POST /api/rooms/:roomId/plugins/packages— upload package bytes.DELETE /api/rooms/:roomId/plugins/packages/:packageId— delete an unbound version.PUT /api/rooms/:roomId/plugins/bindings/:pluginId— enable, update, configure and approve permissions.DELETE /api/rooms/:roomId/plugins/bindings/:pluginId— remove a binding.GET /api/rooms/:roomId/plugins/runtimeandGET /api/rooms/:roomId/plugins/packages/:packageId/content— the snapshot of enabled plugins and package contents for participants. Available only with a room session, not with the administrator token.
Rules:
- An upload stores an immutable version and runs nothing. The same
idandversionwith different contents is rejected (plugin_version_conflict). - A binding names an exact
packageId,versionandartifactSha256. A permission the previous version did not have needs a separate explicit approval for the same hash. - Every change sends the expected room revision. On a conflict the server refuses, and the client re-reads the list instead of overwriting it.
- At most 2 plugins are enabled at once. Room quotas: 10 packages, 10 MiB, 200 versions over the room's lifetime.
- A bound version cannot be deleted. When a room is deleted, its bindings are removed and its packages are marked for cleanup and removed from storage.
- Packages live in a private object storage bucket, separate from the public one, and are part of the platform backup.
- The session control state carries
pluginBindingsRevision, which tells clients when to re-read the plugin snapshot.
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.
- A plugin has no access to the DOM, network, cookies, tokens or media. The content security policy forbids network connections from the guest Worker. Participant identifiers never enter the sandbox, only a random alias that differs per instance.
- Every SDK call goes through a broker. Before each effect it checks the approved permissions, the binding generation and the lease.
- The server grants a binding lease for 5 seconds, never past the session expiry. The client refreshes the snapshot every 2 seconds. Disabling, a version update, the end of the session or an expired lease end the instance with
lifecycle.dispose. - Instances start only after the first rendered frame of the loaded scene, so a heavy first frame does not eat into load and claim deadlines.
| 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
- The
auto-seatplugin picks a free seat onroom.readyand callsseating.claimSelfOnEntry. - The platform allows automatic seating once per page session. The window is 5 seconds after
room.ready, androom.readyitself must arrive within 20 seconds of the room becoming ready. Up to 8 seats can be tried, and a claim answer is awaited for up to 3 seconds. Automatic seating is not allowed in VR, for a participant who is already seated, or after the participant's own action. - The claim is sent as a regular room-state command with its own identifier. The server decides whether the seat is free; the platform, not the plugin, applies the participant's pose. A late answer to a cancelled claim is ignored.
- Manual seating, Stand up, teleport or movement cancel automatic seating. After Stand up the opt-out is remembered for that tab.
- Without the plugin, or when it is disabled or fails, a participant enters standing and sits down manually. An already confirmed seat is kept when the plugin is disabled.
Documents in the platform repository
At revision cbf0f7cebaec:
packages/room-plugin-sdk/README.md— the full SDK contract: format, limits, CLI and examples.docs/room-plugins/author-guide.md— the room author guide: the "Room behaviors" panel and the API.docs/arch/2026-10-04-room-plugin-sandbox.md— how the sandbox is built and the measured limits.docs/arch/2026-10-04-room-plugin-storage-cli.md— package storage, the author API and the CLI.docs/plugin-storage-lifecycle.md— delivery, restart, restore and cleanup.
What is not done yet is listed in Room plugins: roadmap.