feat: realtime channel subscriptions in @primora/client

createRealtimeClient opens the project SSE stream via fetch +
ReadableStream (EventSource cannot send X-API-Key), with capped
exponential-backoff reconnect and state callbacks. channel() filters by
event namespace — channel("documents").on("created", cb). Presence and
client-broadcast deliberately deferred.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-24 18:58:58 +02:00
1 parent 8892c6dc43
commit 345cf7918b
4 files changed
+173 -4

No files matched your search

+10
View File
@@ -1,4 +1,14 @@
export type PrimoraEventType = "error" | "metric" | "log" | "heartbeat" | "event";
export {
createRealtimeClient,
type RealtimeChannel,
type RealtimeClient,
type RealtimeClientOptions,
type RealtimeEvent,
type RealtimeHandler,
type RealtimeState,
} from "./realtime.js";
export type PrimoraComponentKind =
| "frontend" | "backend" | "database" | "android" | "desktop" | "web" | "other";