Interface RealtimeExtension<Options, Session>Experimental

A customer-installable realtime protocol implementation.

Which extension opens a session is the caller's decision, made at the call site by naming one. The kernel owns lifecycle; the extension owns negotiation and the model-specific session API.

The fal.realtime.open() extension API is experimental and may change in a minor release.

interface RealtimeExtension<Options, Session> {
    defaultEndpoint?: string;
    id: string;
    open(context: RealtimeExtensionContext, options: Options): Promise<Session>;
    supports?(endpointId: string): boolean;
}

Type Parameters

Properties

Methods

Properties

defaultEndpoint?: string

Endpoint opened when the options do not name one.

id: string

Stable diagnostic name, for example fal/webrtc or acme/dragon-world.

Methods

  • Experimental

    Reject an endpoint this extension knows it cannot open.

    A guard, not a router. It exists for the extension that owns a closed set of endpoints — Lucy ships two — so a mistyped or stale id fails at the call site instead of partway through a negotiation that was never going to succeed.

    Optional because most protocols have no such set. Any customer can build an app on the WMA transport, so no list of ids describes it, and an extension in that position should say nothing rather than assert something it cannot know.

    Parameters

    • endpointId: string

    Returns boolean