Published in openvibe-contracts v0.454.0 (docs/adr/ADR-005-realtime.md), rendered as is.

ADR-005: Realtime topics, cursor/resume and whether OpenVibe.Realtime exists

Status: Accepted 2026-09-22: realtime runs inside OpenVibe.Events

Context and current evidence

The charter for OpenVibe.Realtime was frozen pending this decision. Browser realtime today is five product-local WebSocket servers in Live.

Decision

Alternatives considered

Migration consequences

Live's product WebSockets stay until their domains move (Chat in Wave 6).

Rollback

SSE is additive; disabling it leaves durable delivery untouched.

Acceptance tests

Guessed private topic yields nothing; reconnect from a cursor gets the complete authorised sequence or a gap marker.

Amendment 1 (2026-09-26): presence

Status: Accepted (roadmap WS-F task 2).

Decision. Presence — who is connected right now — is ephemeral and lives in Chat's delivery plane, not in OpenVibe.Events.

Alternatives considered.

Consequences. A product that shows "online" (a profile, a DM list) calls Chat's read and caches it for seconds at most. When realtime moves out of Events (the original decision's revisit clause), presence stays with whatever holds chat connections.

Acceptance. A connected person reads online. A hidden person reads offline while connected. A person whose preference is unknown reads offline. No chat.presence* event type exists in the catalog (Chat test/chat-modules.test.js, Contracts npm test).

Amendment 2 (2026-09-26): a person's topic, and realtime tickets

Status: Accepted (roadmap WS-E task 3, WS-F task 1).

Decision.

Alternatives considered.

Consequences. Every notification is one more event in Events' log (a go-live to N followers is N events). The outbox relays them in batches of 50, and Events' retention and redaction apply. Where Network's relay is off, the rows wait in network_event_outbox. The badge still works by polling.

Acceptance.

These are Events test/realtime-tickets.test.js, Network test/notification-events.test.js and Shared test/notification-live.test.js.

Amendment 3 (2026-11-07): a person's own online status, owned by Network

Status: Accepted (plan 2026-10-22 track X item 9). This amendment supersedes amendment 1 for a person's chosen online status; amendment 1 still governs who is connected to a room right now.

Decision. Each person has a presence of online, away, do not disturb or invisible, with an optional status line and one emoji. It lives in OpenVibe.Network (network.presence@1), not in Chat's WebSocket map: the person carries it across every site, and a DM list must show it when the person is not in that room.

Alternatives considered.

Consequences. Network stores one row per person who has ever sent a heartbeat (erased with the account and included in its export, ADR-033). Services read the API with a person's own token, or with a service token and network.presence.read on behalf of one person; the DM part of the rule is read from Chat through chat.dm.peers.read. A stranger's presence is indistinguishable from an offline one.

Acceptance. A stranger gets no row; a follower gets online/away/dnd; an invisible person gets no row and the event says offline; a heartbeat older than 3 minutes reads offline; an idle heartbeat does not move last_active_at; the event is debounced. These are Network test/presence.test.js and Chat test/presence.test.js.