@memberjunction/ai-openai 5.47.0 → 5.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,151 @@
1
- import { BaseRealtimeModel, IRealtimeSession, RealtimeSessionCapabilities, RealtimeReconfigureParams, RealtimeSessionParams, RealtimeToolDefinition, RealtimeTranscript, RealtimeToolCall, RealtimeUsage, RealtimeSessionError, RealtimeVoiceOption } from '@memberjunction/ai';
1
+ import { BaseRealtimeModel, IRealtimeSession, RealtimeSessionCapabilities, RealtimeReconfigureParams, RealtimeSessionParams, RealtimeToolDefinition, RealtimeTranscript, RealtimeToolCall, RealtimeUsage, RealtimeUsageModalityDetail, RealtimeSessionError, RealtimeVoiceOption, JSONObject } from '@memberjunction/ai';
2
2
  import { ClientRealtimeSessionConfig } from '@memberjunction/ai';
3
3
  import { OpenAI } from 'openai';
4
4
  import type { OpenAIRealtimeError } from 'openai/realtime/index';
5
- import type { RealtimeClientEvent, RealtimeServerEvent } from 'openai/resources/realtime/realtime';
5
+ import type { RealtimeClientEvent, RealtimeServerEvent, RealtimeAudioInputTurnDetection, RealtimeToolsConfigUnion } from 'openai/resources/realtime/realtime';
6
6
  import type { ClientSecretCreateParams, ClientSecretCreateResponse } from 'openai/resources/realtime/client-secrets';
7
+ /**
8
+ * The reasoning effort levels the GA Realtime API accepts for reasoning-capable realtime models
9
+ * (gpt-realtime-2 / gpt-realtime-2.1 line). `low` is the provider default — it keeps latency down
10
+ * for voice; raise only when task complexity justifies the added latency and reasoning tokens.
11
+ */
12
+ export type RealtimeReasoningEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
13
+ /**
14
+ * Maps MJ's NORMALIZED effort level (the same `ChatParams.effortLevel` vocabulary the LLM drivers
15
+ * consume: a numeric 1–100 value, or a named level) onto OpenAI's realtime
16
+ * {@link RealtimeReasoningEffort} union. This is the OpenAI implementation of the
17
+ * {@link OpenAIRealtimeProfile.mapEffortLevel} seam — providers with a DIFFERENT effort vocabulary
18
+ * override the profile function rather than the protocol code.
19
+ *
20
+ * Numeric mapping is quintile-based across OpenAI's five levels: ≤20 → `minimal`, ≤40 → `low`,
21
+ * ≤60 → `medium`, ≤80 → `high`, >80 → `xhigh`. Named values already in the union pass through.
22
+ * Unmappable values return `undefined` (dropped with a diag log — never sent raw).
23
+ *
24
+ * @param effortLevel The MJ-normalized effort level (numeric string/number 1–100 or named level).
25
+ * @returns The provider effort literal, or `undefined` when the value cannot be mapped.
26
+ */
27
+ export declare function MapEffortLevelToOpenAIRealtime(effortLevel: string): RealtimeReasoningEffort | undefined;
28
+ /** Wire shape of a per-modality usage-detail block on the GA API. */
29
+ interface GARealtimeUsageDetail {
30
+ text_tokens?: number;
31
+ audio_tokens?: number;
32
+ image_tokens?: number;
33
+ cached_tokens?: number;
34
+ }
35
+ /**
36
+ * Maps a GA per-modality usage-detail block onto the Core {@link RealtimeUsageModalityDetail}
37
+ * shape. Returns `undefined` when the provider reported no detail block (totals-only flows).
38
+ */
39
+ export declare function MapUsageModalityDetail(detail: GARealtimeUsageDetail | undefined): RealtimeUsageModalityDetail | undefined;
40
+ /**
41
+ * Provider profile for the OpenAI-Realtime-protocol driver family.
42
+ *
43
+ * `OpenAIRealtime` implements the full OpenAI Realtime wire protocol once; OpenAI-compatible
44
+ * providers (e.g. xAI Grok Voice) subclass it and supply their own profile instead of cloning the
45
+ * driver. The profile carries the per-provider knobs — transcription model, turn detection, GA
46
+ * feature gates — so protocol/feature work lands here once and flows to every compatible provider,
47
+ * while providers that have NOT confirmed a GA feature keep it gated off (a one-line flip later).
48
+ */
49
+ export interface OpenAIRealtimeProfile {
50
+ /** The {@link ClientRealtimeSessionConfig.Provider} key the browser uses to pick its client driver. */
51
+ providerKey: string;
52
+ /**
53
+ * The ASR model for USER input transcription (opt-in pass; see {@link OPENAI_INPUT_TRANSCRIPTION_MODEL}).
54
+ * `undefined` means the provider transcribes natively (e.g. a cascaded STT stage) and no
55
+ * transcription block is sent unless the Config bag supplies `inputTranscriptionModel`.
56
+ */
57
+ inputTranscriptionModel?: string;
58
+ /**
59
+ * Whether the initial `session.update` must wait for the server's `session.created` frame.
60
+ * OpenAI's socket drops config sent during the handshake; xAI's accepts it immediately.
61
+ */
62
+ deferInitialConfigUntilSessionCreated: boolean;
63
+ /**
64
+ * When true, `InitialContext` is folded into the system prompt under a "Prior context" heading
65
+ * instead of being seeded as a separate user conversation item — for compat endpoints with no
66
+ * guaranteed history-seeding channel (HuggingFace speech-to-speech).
67
+ */
68
+ foldInitialContextIntoPrompt: boolean;
69
+ /** Whether the provider accepts the GA `reasoning.effort` session field. */
70
+ supportsReasoningEffort: boolean;
71
+ /** Whether the provider accepts the GA `parallel_tool_calls` session field. */
72
+ supportsParallelToolCalls: boolean;
73
+ /** Whether the provider accepts remote MCP server tools (`type: "mcp"`) in `session.tools`. */
74
+ supportsMcpTools: boolean;
75
+ /** Whether the provider accepts an output voice at `audio.output.voice`. */
76
+ supportsVoiceOutput: boolean;
77
+ /**
78
+ * Whether the provider supports LIVE turn-mode reconfiguration via a partial `session.update`
79
+ * (drives both the session's `Capabilities.CanReconfigureTurnMode` and whether `Reconfigure`
80
+ * emits anything). Compat endpoints without `create_response` gating set false.
81
+ */
82
+ supportsLiveReconfigure: boolean;
83
+ /** The fatal-error message surfaced when the socket closes unexpectedly. */
84
+ unexpectedCloseMessage: string;
85
+ /**
86
+ * Builds the `audio.input.turn_detection` block. `disableAutoResponse` comes from the Config
87
+ * bag (meeting mode: the bridge, not server VAD, decides when the model speaks). Return
88
+ * `undefined` to omit the block and accept the provider default.
89
+ */
90
+ buildTurnDetection(disableAutoResponse: boolean): RealtimeAudioInputTurnDetection | undefined;
91
+ /**
92
+ * Maps MJ's NORMALIZED effort level (numeric 1–100 or named — the same vocabulary as
93
+ * `ChatParams.effortLevel`) onto THIS provider's realtime effort literals. Providers whose
94
+ * endpoint uses a different level set override this seam; return `undefined` to drop an
95
+ * unmappable value (it is never sent raw). Only consulted when `supportsReasoningEffort` is on.
96
+ */
97
+ mapEffortLevel(effortLevel: string): string | undefined;
98
+ }
99
+ /** The OpenAI provider profile — the defaults every OpenAI-compatible subclass overrides from. */
100
+ export declare const OPENAI_REALTIME_PROFILE: OpenAIRealtimeProfile;
101
+ /**
102
+ * The realtime feature values extracted (and removed) from the open {@link RealtimeSessionParams.Config}
103
+ * bag before the remainder is spread into the provider session payload.
104
+ */
105
+ interface ExtractedRealtimeFeatures {
106
+ /**
107
+ * The raw effort value awaiting the profile's `mapEffortLevel` translation. Sourced from the
108
+ * provider-native `reasoningEffort` bag key when present (explicit override), else from the
109
+ * MJ-normalized `effortLevel` key (numeric 1–100 or named — `ChatParams.effortLevel` vocabulary).
110
+ */
111
+ effortLevel?: string;
112
+ /** `parallelToolCalls` bag value, if present. */
113
+ parallelToolCalls?: boolean;
114
+ /** Remote MCP server tool declarations from the `mcpTools` bag value, if present. */
115
+ mcpTools?: RealtimeToolsConfigUnion.Mcp[];
116
+ /** Trimmed `voice` bag value, if present and non-blank. */
117
+ voice?: string;
118
+ /** The host-neutral meeting flag (`disableAutoResponse`) — never sent raw to a provider. */
119
+ disableAutoResponse: boolean;
120
+ /** Per-session input-transcription model override (`inputTranscriptionModel` bag key). */
121
+ inputTranscriptionModel?: string;
122
+ /**
123
+ * MJ-side transport settings (`endpoint`, `sampleRate`, `proxyBaseUrl` bag keys) consumed by
124
+ * self-hosted/proxied drivers — ALWAYS scrubbed so they never leak into a provider payload.
125
+ */
126
+ endpoint?: string;
127
+ /** See {@link ExtractedRealtimeFeatures.endpoint}. */
128
+ sampleRate?: number;
129
+ /** See {@link ExtractedRealtimeFeatures.endpoint}. */
130
+ proxyBaseUrl?: string;
131
+ /** The remaining bag entries, safe to spread into the session payload. */
132
+ rest: JSONObject;
133
+ }
134
+ /**
135
+ * Pulls the MJ-idiomatic feature keys OUT of the open Config bag so they are (a) translated to
136
+ * their provider-native session fields only when the profile confirms support, and (b) NEVER
137
+ * leaked raw into a provider payload that would reject unknown fields.
138
+ *
139
+ * Recognized bag keys: `effortLevel` (MJ-normalized: numeric 1–100 or named), `reasoningEffort`
140
+ * (provider-native literal — wins over `effortLevel` when both are present), `parallelToolCalls`,
141
+ * `mcpTools`, `voice`, `disableAutoResponse`. Everything else passes through in `rest`
142
+ * (provider-native keys like `tool_choice` or `output_modalities` can be set directly by config
143
+ * authors).
144
+ *
145
+ * @param config The open session Config bag (may be undefined).
146
+ * @returns The extracted features plus the residual bag.
147
+ */
148
+ export declare function ExtractRealtimeFeatures(config: JSONObject | undefined): ExtractedRealtimeFeatures;
7
149
  /**
8
150
  * Minimal connection surface the {@link OpenAIRealtime} driver depends on.
9
151
  *
@@ -57,25 +199,55 @@ export interface IOpenAIRealtimeConnection {
57
199
  * context), and translates the provider's server-event stream into the modality-agnostic
58
200
  * {@link IRealtimeSession} contract.
59
201
  *
202
+ * **This class is also the shared implementation for OpenAI-Realtime-compatible providers.**
203
+ * Compatible providers (e.g. xAI Grok Voice) subclass it, pass their base URL to the constructor,
204
+ * and override {@link OpenAIRealtime.Profile} — inheriting the whole protocol implementation and
205
+ * every future GA feature (gated per-provider by the profile) instead of maintaining a clone.
206
+ *
207
+ * **GA features** (gpt-realtime-2 / 2.1 era) are driven from the open
208
+ * {@link RealtimeSessionParams.Config} bag with MJ-idiomatic keys, translated to provider-native
209
+ * session fields only when the profile confirms support:
210
+ * - `reasoningEffort: 'minimal'|'low'|'medium'|'high'|'xhigh'` → `reasoning.effort`
211
+ * - `parallelToolCalls: boolean` → `parallel_tool_calls`
212
+ * - `mcpTools: [{ type:'mcp', server_label, server_url|connector_id, ... }]` → appended to `session.tools`
213
+ *
60
214
  * **Tool results** complete the tool-call loop: the returned session implements the Core
61
215
  * `IRealtimeSession.SendToolResult` contract method, which the agent layer calls after executing a
62
216
  * tool to feed its result back to the model. See {@link OpenAIRealtimeSession.SendToolResult}.
63
217
  */
64
218
  export declare class OpenAIRealtime extends BaseRealtimeModel {
65
219
  private _openAI;
66
- constructor(apiKey: string);
220
+ /**
221
+ * @param apiKey The provider API key.
222
+ * @param baseURL Optional override for OpenAI-compatible providers (subclasses pass their own
223
+ * endpoint; the SDK's `buildRealtimeURL()` derives the wss:// realtime endpoint from it).
224
+ */
225
+ constructor(apiKey: string, baseURL?: string);
67
226
  /** Read-only accessor for the underlying OpenAI SDK client. */
68
227
  get OpenAI(): OpenAI;
228
+ /**
229
+ * The provider profile driving per-provider knobs and GA feature gates. Subclasses override
230
+ * this single seam instead of re-implementing the protocol.
231
+ */
232
+ protected get Profile(): OpenAIRealtimeProfile;
69
233
  /**
70
234
  * Creates the realtime connection for a model. Overridable seam for testing.
71
235
  *
72
236
  * Production returns a real `OpenAIRealtimeWebSocket`. Unit tests override this to return a
73
237
  * fake {@link IOpenAIRealtimeConnection} that emits OpenAI-shaped events and captures sends.
74
238
  *
75
- * @param model The provider realtime model id (e.g. `gpt-realtime`).
239
+ * @param model The provider realtime model id (e.g. `gpt-realtime-2.1`).
76
240
  * @returns A connection implementing {@link IOpenAIRealtimeConnection}.
77
241
  */
78
242
  protected createConnection(model: string): IOpenAIRealtimeConnection;
243
+ /**
244
+ * Creates the session wrapper for a freshly-opened connection. Overridable seam so subclasses
245
+ * can return their own session subclass while {@link StartSession} stays shared.
246
+ *
247
+ * @param connection The open provider connection.
248
+ * @returns The session bound to this driver's {@link Profile}.
249
+ */
250
+ protected createSessionInstance(connection: IOpenAIRealtimeConnection): OpenAIRealtimeSession;
79
251
  /**
80
252
  * Opens a duplex realtime session, applies the session config, and returns the live handle.
81
253
  *
@@ -95,11 +267,12 @@ export declare class OpenAIRealtime extends BaseRealtimeModel {
95
267
  */
96
268
  get SupportedVoices(): RealtimeVoiceOption[];
97
269
  /**
98
- * Mints the ephemeral client secret via OpenAI's Realtime client-secrets API. Overridable
99
- * seam for testing unit tests return a fake response so no network call is made.
270
+ * Mints the ephemeral client secret via the provider's Realtime client-secrets API (resolved
271
+ * from the SDK client's base URL, so OpenAI-compatible subclasses target their own endpoint).
272
+ * Overridable seam for testing — unit tests return a fake response so no network call is made.
100
273
  *
101
274
  * @param body The client-secret create request (carries the realtime session config).
102
- * @returns The OpenAI client-secret create response (token value + expiry + echoed session).
275
+ * @returns The client-secret create response (token value + expiry + echoed session).
103
276
  */
104
277
  protected mintClientSecret(body: ClientSecretCreateParams): Promise<ClientSecretCreateResponse>;
105
278
  /**
@@ -108,6 +281,11 @@ export declare class OpenAIRealtime extends BaseRealtimeModel {
108
281
  * (system prompt + tools + model) so it retains control of behavior even though the browser
109
282
  * owns the socket.
110
283
  *
284
+ * The GA features (reasoning effort, parallel tool calls, MCP tools) and the output voice are
285
+ * extracted from the Config bag and applied here exactly as on the server-bridged path, so the
286
+ * two topologies stay behaviorally identical — the browser applies the minted SessionConfig
287
+ * verbatim with no client-side changes needed.
288
+ *
111
289
  * @param params Session configuration (model, system prompt, tools).
112
290
  * @returns The minted {@link ClientRealtimeSessionConfig} the browser authenticates + applies.
113
291
  */
@@ -118,9 +296,13 @@ export declare class OpenAIRealtime extends BaseRealtimeModel {
118
296
  *
119
297
  * Holds the registered handlers and the single `'event'` listener that fans the provider's
120
298
  * server-event stream out to the contract handlers via {@link OpenAIRealtimeSession.dispatch}.
299
+ *
300
+ * The session is profile-parameterized (see {@link OpenAIRealtimeProfile}) so OpenAI-compatible
301
+ * provider subclasses reuse it verbatim with their own knobs.
121
302
  */
122
303
  export declare class OpenAIRealtimeSession implements IRealtimeSession {
123
304
  private connection;
305
+ private profile;
124
306
  private outputHandler?;
125
307
  private transcriptHandler?;
126
308
  private toolCallHandler?;
@@ -132,6 +314,14 @@ export declare class OpenAIRealtimeSession implements IRealtimeSession {
132
314
  private errorListener;
133
315
  /** Set by {@link Close} so a consumer-initiated teardown never reports an "unexpected" close. */
134
316
  private closedByConsumer;
317
+ /** Backing promise for {@link WaitForConfigApplied}; resolve/reject handles null once settled. */
318
+ private configAppliedPromise;
319
+ private resolveConfigApplied;
320
+ private rejectConfigApplied;
321
+ /** The deferred-config listener awaiting `session.created`, tracked so teardown can remove it. */
322
+ private pendingConfigListener;
323
+ /** Deadline timer for the deferred-config readiness wait (see {@link configReadinessTimeoutMs}). */
324
+ private configReadinessTimer;
135
325
  /**
136
326
  * Whether a model response is currently in flight. Minimal response tracking that mirrors the
137
327
  * client driver's state machine: set on `response.created` (and eagerly whenever this session
@@ -140,24 +330,84 @@ export declare class OpenAIRealtimeSession implements IRealtimeSession {
140
330
  * `cancelled` after barge-in, so the flag can never stick. Consumed by
141
331
  * {@link OpenAIRealtimeSession.RequestSpokenUpdate} to skip (not collide with) an active
142
332
  * response, since the API rejects overlapping `response.create` requests.
333
+ *
334
+ * Protected (not private) so compat-endpoint session subclasses can apply provider-specific
335
+ * robustness tweaks (e.g. HuggingFace marks a response active on the first audio delta and
336
+ * releases the flag when a tool call yields the floor).
337
+ */
338
+ protected responseActive: boolean;
339
+ /**
340
+ * Whether the CURRENT user turn has already produced at least one finalized input transcription.
341
+ * Streamed-transcription providers (Grok) emit `input_audio_transcription.completed` REPEATEDLY
342
+ * for one utterance, each carrying the full growing text; without this flag every repeat lands as
343
+ * a fresh non-replacing final and the persistence layer mints a duplicate `ConversationDetail`
344
+ * row per caption. The second-and-later completeds are flagged {@link RealtimeTranscript.ReplacesPrevious}
345
+ * so they REPLACE the turn's row in place — exactly the client-direct driver's behavior, kept in
346
+ * sync here so the two topologies persist identically. Reset on each `speech_started` (new turn).
347
+ * Harmless for single-completed providers (OpenAI): the flag is always false on the one completed.
348
+ */
349
+ private userTurnTranscribed;
350
+ /**
351
+ * Text of the CURRENT user turn's most recent finalized transcription, used to detect that a new
352
+ * `completed` is the same utterance continuing rather than a new turn.
353
+ *
354
+ * Streaming-transcription providers re-emit the FULL accumulated utterance on every `completed`,
355
+ * and their VAD fires `speech_started` on ordinary mid-sentence pauses. Keying the turn boundary
356
+ * solely off `speech_started` therefore splits one spoken thought into several turns, each a longer
357
+ * copy of the last. Comparing against this text (via {@link IsTranscriptContinuation}, which
358
+ * normalizes punctuation because ASR re-punctuates as a sentence grows) lets a post-pause caption
359
+ * be recognized as a continuation and REPLACE the turn in place instead.
360
+ *
361
+ * Cleared when the model starts responding (`response.created`), which is the real end of the
362
+ * user's turn — so two genuinely separate utterances can never be merged across a model reply.
143
363
  */
144
- private responseActive;
145
- constructor(connection: IOpenAIRealtimeConnection);
364
+ private lastUserTranscript;
365
+ /**
366
+ * @param connection The injectable provider-connection seam.
367
+ * @param profile The provider profile (defaults to OpenAI's so existing direct construction keeps working).
368
+ */
369
+ constructor(connection: IOpenAIRealtimeConnection, profile?: OpenAIRealtimeProfile);
146
370
  /**
147
371
  * Applies the initial session config: system prompt + tools via `session.update`, optional initial
148
372
  * context as a user message. Called once by {@link OpenAIRealtime.StartSession}.
149
373
  *
150
- * **Deferred to `session.created`.** When `StartSession` returns, the realtime WebSocket is NOT open yet
151
- * — sending `session.update` synchronously races the handshake and the instructions (the **system
152
- * prompt + tools**) are silently dropped, so the model runs with NO prompt (no identity, no companion
153
- * framing). We therefore wait for the server's `session.created` frame — the first event once the socket
154
- * is open and the session exists, and the canonical moment to configure a realtime session — exactly the
155
- * point the browser/client-direct path applies its config. Idempotent (a re-emitted `session.created`
156
- * can't double-apply); the listener removes itself once it fires.
374
+ * **Deferral is profile-driven.** On OpenAI the realtime WebSocket is NOT open when `StartSession`
375
+ * returns — sending `session.update` synchronously races the handshake and the instructions (the
376
+ * **system prompt + tools**) are silently dropped, so the model runs with NO prompt (no identity, no
377
+ * companion framing). We therefore wait for the server's `session.created` frame — the first event once
378
+ * the socket is open and the session exists, and the canonical moment to configure a realtime session —
379
+ * exactly the point the browser/client-direct path applies its config. Idempotent (a re-emitted
380
+ * `session.created` can't double-apply); the listener removes itself once it fires. Providers whose
381
+ * socket accepts config immediately (xAI) set the profile flag false and send synchronously.
157
382
  *
158
383
  * @param params The session parameters.
159
384
  */
160
385
  applyInitialConfig(params: RealtimeSessionParams): void;
386
+ /**
387
+ * Readiness deadline in milliseconds for the deferred-config wait. Only affects consumers of
388
+ * {@link WaitForConfigApplied}; the deferred apply itself is not cancelled. Overridable.
389
+ */
390
+ protected get configReadinessTimeoutMs(): number;
391
+ /** Rejects a pending config wait WITHOUT removing the deferred listener (timeout semantics). */
392
+ private failConfigWaitOnly;
393
+ /** Clears the readiness-deadline timer (config applied, or session torn down). */
394
+ private clearConfigReadinessTimer;
395
+ /** Removes a still-pending deferred-config listener (teardown before `session.created`). */
396
+ private clearPendingConfigListener;
397
+ /**
398
+ * Resolves once the initial session config has been APPLIED (sent on the socket) — immediately
399
+ * for providers that configure synchronously, or on the server's `session.created` frame for
400
+ * deferring providers. Rejects if the transport dies (fatal error or unexpected close) or the
401
+ * consumer closes the session before the config went out.
402
+ *
403
+ * The base {@link OpenAIRealtime.StartSession} deliberately does NOT await this (OpenAI
404
+ * semantics: the session handle is returned while the handshake completes). Drivers whose
405
+ * contract promises "ready only after config is applied" (HuggingFace) await it in their
406
+ * `StartSession` override.
407
+ */
408
+ WaitForConfigApplied(): Promise<void>;
409
+ /** Rejects a still-pending {@link WaitForConfigApplied} (transport death / early consumer close). */
410
+ private failConfigWait;
161
411
  /** @inheritdoc */
162
412
  SendInput(chunk: ArrayBuffer): void;
163
413
  /** @inheritdoc */
@@ -203,7 +453,7 @@ export declare class OpenAIRealtimeSession implements IRealtimeSession {
203
453
  * forwarded as a per-response override.
204
454
  */
205
455
  RequestSpokenUpdate(instructions: string): boolean;
206
- /** @inheritdoc — OpenAI's `session.update` is runtime-mutable, so a live turn-mode change is supported. */
456
+ /** @inheritdoc — profile-gated: only providers whose endpoint honors a live partial `session.update`. */
207
457
  get Capabilities(): RealtimeSessionCapabilities;
208
458
  /**
209
459
  * @inheritdoc
@@ -233,12 +483,34 @@ export declare class OpenAIRealtimeSession implements IRealtimeSession {
233
483
  * Routes a provider server event to the matching contract handler. Each branch delegates to a
234
484
  * small, single-purpose handler to keep this dispatcher flat.
235
485
  *
486
+ * Protected (not private) so OpenAI-compatible session subclasses can pre-translate legacy /
487
+ * beta frame aliases before delegating here.
488
+ *
236
489
  * @param event The OpenAI realtime server event.
237
490
  */
238
- private dispatch;
491
+ protected dispatch(event: RealtimeServerEvent): void;
492
+ /**
493
+ * Handles the MCP slice of the server-event stream. MCP tool calls execute SERVER-SIDE at the
494
+ * provider (no MJ round-trip like function tools), so most lifecycle frames are diag-only. The
495
+ * one that needs action — `mcp_approval_request` — cannot be satisfied yet (no approval UX in
496
+ * the agent layer), so it is surfaced as a RECOVERABLE session error instead of silently
497
+ * stalling the session; config authors should declare MCP servers with `require_approval: 'never'`.
498
+ *
499
+ * The frames are matched by type string because the pinned SDK's `RealtimeServerEvent` union
500
+ * carries them with dedicated interfaces already (`McpListToolsFailed`, `ResponseMcpCallFailed`, etc.).
501
+ *
502
+ * @param event The (possibly MCP-related) server event.
503
+ */
504
+ private dispatchMcpEvent;
239
505
  /** Decodes a base64 audio delta and forwards it to the output handler. */
240
506
  private handleAudioDelta;
241
- /** Emits a transcript event to the transcript handler. */
507
+ /**
508
+ * Emits a transcript event, skipping empty/whitespace text — empty captions are pure noise.
509
+ *
510
+ * @param replacesPrevious When true, this final REPLACES the current turn's persisted row in
511
+ * place (streamed-transcription providers whose repeated completeds carry the full growing
512
+ * text) rather than appending a new turn. Defaults to false (append/normal final).
513
+ */
242
514
  private emitTranscript;
243
515
  /** Forwards a completed function call to the tool-call handler. */
244
516
  private handleFunctionCall;
@@ -265,9 +537,13 @@ export declare class OpenAIRealtimeSession implements IRealtimeSession {
265
537
  * so consumers finalize instead of idling on a dead socket — followed by the close handler.
266
538
  */
267
539
  private handleSocketClose;
268
- /** Translates a response's usage block into a {@link RealtimeUsage} update. */
540
+ /**
541
+ * Translates a response's usage block into a {@link RealtimeUsage} update, INCLUDING the
542
+ * per-modality token details the GA API reports — realtime cost attribution is impossible
543
+ * without the audio/text/cached split (audio-in bills ~8x text-in on GPT Realtime 2.1).
544
+ */
269
545
  private handleResponseDone;
270
- /** Sends the `session.update` that establishes instructions, input transcription, and tools. */
546
+ /** Sends the `session.update` that establishes instructions, input transcription, tools, and GA features. */
271
547
  private sendSessionUpdate;
272
548
  /** Seeds the conversation with initial context as a user text message. */
273
549
  private sendInitialContext;
@@ -278,4 +554,5 @@ export declare class OpenAIRealtimeSession implements IRealtimeSession {
278
554
  /** Decodes a base64 audio delta into a freshly-allocated `ArrayBuffer`. */
279
555
  private decodeBase64;
280
556
  }
557
+ export {};
281
558
  //# sourceMappingURL=openAIRealtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openAIRealtime.d.ts","sourceRoot":"","sources":["../../src/models/openAIRealtime.ts"],"names":[],"mappings":"AACA,OAAO,EACH,iBAAiB,EAEjB,gBAAgB,EAChB,2BAA2B,EAC3B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EACR,mBAAmB,EACnB,mBAAmB,EAOtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACR,wBAAwB,EACxB,0BAA0B,EAC7B,MAAM,0CAA0C,CAAC;AA+BlD;;;;;;;;GAQG;AACH,MAAM,WAAW,yBAAyB;IACtC;;;;;;OAMG;IACH,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,GAAG,IAAI,CAAC;IACzE;;;;;OAKG;IACH,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,GAAG,IAAI,CAAC;IACzE,0GAA0G;IAC1G,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAA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