ExperimentalReadonly Experimentalready: Promise<ManagedRealtimeSession<Session> & { Resolves with this same handle once the session is live; rejects with the failure when
opening fails or is aborted. Optional — every failure it can carry also reaches onError
and onState("failed"), so a caller living entirely on callbacks never needs to touch it,
and an ignored ready never becomes an unhandled rejection.
The resolved type narrows session to PRESENT: the kernel always sets it before
resolving, so a caller who awaited ready never pays an optional-chain for an invariant
the runtime already guarantees.
Readonly Experimentalsession: Session | undefinedThe extension's own session: undefined while opening, set once negotiation completes,
and left readable after close. This is where extension-specific fields and methods live —
the handle itself never grows them.
Readonly Experimentalstate: RealtimeStateExperimentalAlways a promise, whatever the extension declared. The kernel substitutes its own idempotent
teardown for the extension's close, and that teardown awaits every registered cleanup — so a
caller that awaits this knows the resources are actually released, which is not something an
extension returning void could promise. Calling it while the session is still opening
cancels the negotiation.
What
fal.realtime.open()returns: a small, plain handle owned by the kernel.Returned SYNCHRONOUSLY, in state
"opening", while negotiation runs eagerly behind it. The caller can hold the handle, render fromstate, and callsend()immediately — queued sends are flushed in order the moment the session is live. Extension-specific members live on ManagedRealtimeSession.session, which is set once negotiation completes;readyis for the caller that wants the awaited style.Deliberately a plain object rather than a facade impersonating the extension's session: the handle's members never change shape, and the raw session — with whatever fields and methods its extension declared — is reached explicitly through
session.The
fal.realtime.open()extension API is experimental and may change in a minor release.