@memberjunction/ai-realtime-client 0.0.1 → 5.42.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.
Files changed (46) hide show
  1. package/README.md +148 -28
  2. package/dist/audio/audioMeter.d.ts +101 -0
  3. package/dist/audio/audioMeter.d.ts.map +1 -0
  4. package/dist/audio/audioMeter.js +193 -0
  5. package/dist/audio/audioMeter.js.map +1 -0
  6. package/dist/audio/micCapture.d.ts +26 -0
  7. package/dist/audio/micCapture.d.ts.map +1 -0
  8. package/dist/audio/micCapture.js +69 -0
  9. package/dist/audio/micCapture.js.map +1 -0
  10. package/dist/audio/pcmPlayback.d.ts +73 -0
  11. package/dist/audio/pcmPlayback.d.ts.map +1 -0
  12. package/dist/audio/pcmPlayback.js +78 -0
  13. package/dist/audio/pcmPlayback.js.map +1 -0
  14. package/dist/audio/pcmUtils.d.ts +17 -0
  15. package/dist/audio/pcmUtils.d.ts.map +1 -0
  16. package/dist/audio/pcmUtils.js +46 -0
  17. package/dist/audio/pcmUtils.js.map +1 -0
  18. package/dist/drivers/assemblyAIRealtimeClient.d.ts +384 -0
  19. package/dist/drivers/assemblyAIRealtimeClient.d.ts.map +1 -0
  20. package/dist/drivers/assemblyAIRealtimeClient.js +732 -0
  21. package/dist/drivers/assemblyAIRealtimeClient.js.map +1 -0
  22. package/dist/drivers/elevenLabsRealtimeClient.d.ts +362 -0
  23. package/dist/drivers/elevenLabsRealtimeClient.d.ts.map +1 -0
  24. package/dist/drivers/elevenLabsRealtimeClient.js +686 -0
  25. package/dist/drivers/elevenLabsRealtimeClient.js.map +1 -0
  26. package/dist/drivers/geminiRealtimeClient.d.ts +406 -0
  27. package/dist/drivers/geminiRealtimeClient.d.ts.map +1 -0
  28. package/dist/drivers/geminiRealtimeClient.js +675 -0
  29. package/dist/drivers/geminiRealtimeClient.js.map +1 -0
  30. package/dist/drivers/openAIRealtimeClient.d.ts +381 -0
  31. package/dist/drivers/openAIRealtimeClient.d.ts.map +1 -0
  32. package/dist/drivers/openAIRealtimeClient.js +602 -0
  33. package/dist/drivers/openAIRealtimeClient.js.map +1 -0
  34. package/dist/drivers/xaiRealtimeClient.d.ts +430 -0
  35. package/dist/drivers/xaiRealtimeClient.d.ts.map +1 -0
  36. package/dist/drivers/xaiRealtimeClient.js +676 -0
  37. package/dist/drivers/xaiRealtimeClient.js.map +1 -0
  38. package/dist/generic/baseRealtimeClient.d.ts +401 -0
  39. package/dist/generic/baseRealtimeClient.d.ts.map +1 -0
  40. package/dist/generic/baseRealtimeClient.js +226 -0
  41. package/dist/generic/baseRealtimeClient.js.map +1 -0
  42. package/dist/index.d.ts +11 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +11 -0
  45. package/dist/index.js.map +1 -0
  46. package/package.json +28 -7
@@ -0,0 +1,226 @@
1
+ import { REALTIME_AUDIO_BIN_COUNT } from '../audio/audioMeter.js';
2
+ /**
3
+ * Abstract base class for **browser-side, provider-direct** realtime (voice) clients.
4
+ *
5
+ * This is the client-side mirror of the server's `BaseRealtimeModel` pattern: the server
6
+ * mints an ephemeral credential + session config (`ClientRealtimeSessionConfig`) via its
7
+ * provider driver, and the browser resolves the matching CLIENT driver through the
8
+ * MemberJunction `ClassFactory` using the config's `Provider` string as the registration
9
+ * key (e.g. `'openai'`):
10
+ *
11
+ * ```typescript
12
+ * const client = MJGlobal.Instance.ClassFactory.CreateInstance<BaseRealtimeClient>(
13
+ * BaseRealtimeClient, startResult.Provider);
14
+ * ```
15
+ *
16
+ * Concrete drivers (e.g. {@link OpenAIRealtimeClient}) own ALL provider wire concerns:
17
+ * transport (WebRTC/WebSocket), event-name translation, the response state machine
18
+ * (never letting a tool-result reply collide with an in-flight response), narration-kind
19
+ * tagging, and audible-playback tracking. Hosts own POLICY: when to narrate, what
20
+ * instructions to speak, transcript persistence, and UI state.
21
+ *
22
+ * All `On*` methods register a single handler (matching the server `IRealtimeSession`
23
+ * style); registering again replaces the previous handler.
24
+ *
25
+ * ## DRIVER AUTHOR OBLIGATIONS
26
+ *
27
+ * Hard-won, provider-independent rules every client driver MUST honor (the client-side
28
+ * mirror of the obligations documented on the server's `BaseRealtimeModel` in
29
+ * `@memberjunction/ai`). Most were paid for in live debugging; do not relearn them:
30
+ *
31
+ * 1. **Silent exit from `'speaking'` after a tool call.** When the model emits a tool
32
+ * call, the host typically shows its own busy ("thinking") indicator while the tool
33
+ * executes. The driver must leave the `'speaking'` state *silently* (no state
34
+ * emission) at tool-call time so the turn's trailing frames don't clobber the host's
35
+ * indicator.
36
+ * 2. **Busy-flag release on tool-call emission (deadlock guard).** A tool-call frame
37
+ * means the model has yielded the floor pending the result. Any internal "response
38
+ * active" flag MUST be cleared then — otherwise the eventual {@link SendToolResult}
39
+ * (or a queued send) deadlocks waiting for a turn boundary that will never arrive
40
+ * until after the result is sent.
41
+ * 3. **Playback flush + honest {@link IsAudioPlaying} on interruption.** On a true
42
+ * barge-in the driver must flush any locally-owned audio playback and report
43
+ * `IsAudioPlaying === false` promptly — stale queued audio after an interruption is
44
+ * a product bug, not a nicety. The same flush applies to {@link CancelActiveResponse}.
45
+ * 4. **{@link SendText} must NOT echo a user transcript — and implies barge-in.** The
46
+ * driver must not synthesize a user-role transcript event for injected text (the host
47
+ * owns the local echo and would render the message twice), and an active spoken
48
+ * response is cancelled via the driver's own cancel path before the text is injected
49
+ * (see {@link CancelActiveResponse}).
50
+ * 5. **Tool-result delivery invariant.** Every result fed back via {@link SendToolResult}
51
+ * must EVENTUALLY be voiced/processed by the model and never dropped. If the provider
52
+ * rejects overlapping generation triggers, the driver queues the result's trigger
53
+ * behind the in-flight response and flushes it at the next turn boundary. The result
54
+ * must also EXPLICITLY trigger generation on providers that don't auto-continue after
55
+ * a tool response: OpenAI requires an explicit `response.create`; Gemini auto-continues
56
+ * UNLESS prior client content (a context note's `turnComplete: false`) left the turn
57
+ * open, in which case the driver must commit the turn or the model stays silent.
58
+ * 6. **Token/credential expiry surfaces as a FATAL error.** When the ephemeral credential
59
+ * dies (expiry, revocation, unexpected socket loss), the driver must surface it through
60
+ * {@link OnError} with `Fatal: true` so the host tears down cleanly instead of idling
61
+ * forever on a dead connection.
62
+ * 7. **`'listening'` only after the session config is applied.** The driver must not
63
+ * report the session as listening until the server-built session config (system prompt
64
+ * + tools) has actually been applied to the provider socket — otherwise early turns run
65
+ * against an unconfigured model.
66
+ * 8. **`SessionConfig` is a private pact.** The `ClientRealtimeSessionConfig.SessionConfig`
67
+ * payload is authored by the same-keyed SERVER driver and consumed only by this client
68
+ * driver; its shape may change between the two driver halves without notice. Hosts and
69
+ * intermediaries treat it as an opaque blob — and so must any code outside the matching
70
+ * driver pair.
71
+ * 9. **Audio metering is a CAPABILITY, not an obligation — but wire what you own.** A
72
+ * driver that owns (or can tap) an audio plane should attach
73
+ * {@link BaseRealtimeClient.attachInputAudioMeter} / {@link attachOutputAudioMeter} so
74
+ * {@link GetAudioActivity} reports real levels: the mic stream everywhere
75
+ * (`RealtimeAudioMeter.ForStream`), the shared `RealtimePcmPlayback.CreateMeter()` on
76
+ * client-owned-audio drivers, the remote WebRTC stream on peer-connection drivers.
77
+ * Meters must be released on disconnect ({@link closeAudioMeters}). A driver with no
78
+ * tappable plane simply attaches nothing — hosts fall back to turn-state animation.
79
+ */
80
+ export class BaseRealtimeClient {
81
+ constructor() {
82
+ // ── Audio-activity metering (capability surface — see driver obligation #9) ─
83
+ /** Meter over the USER's microphone, when the driver attached one. */
84
+ this.inputAudioMeter = null;
85
+ /** Meter over the AGENT's audio output, when the driver attached one. */
86
+ this.outputAudioMeter = null;
87
+ }
88
+ /**
89
+ * The session's current audible activity, or `null` when this driver attached no
90
+ * meters at all (hosts then keep their turn-state-driven visuals). Sampled by hosts
91
+ * per animation frame — implementations are cheap, allocation-light reads of an
92
+ * `AnalyserNode`; no per-call provider traffic.
93
+ */
94
+ GetAudioActivity() {
95
+ if (!this.inputAudioMeter && !this.outputAudioMeter) {
96
+ return null;
97
+ }
98
+ return {
99
+ InputLevel: this.inputAudioMeter ? this.inputAudioMeter.Level() : null,
100
+ OutputLevel: this.outputAudioMeter ? this.outputAudioMeter.Level() : null,
101
+ InputBins: this.inputAudioMeter ? this.inputAudioMeter.Bins(REALTIME_AUDIO_BIN_COUNT) : null,
102
+ OutputBins: this.outputAudioMeter ? this.outputAudioMeter.Bins(REALTIME_AUDIO_BIN_COUNT) : null
103
+ };
104
+ }
105
+ /** Attaches (replacing + closing any previous) the USER-microphone meter. `null` detaches. */
106
+ attachInputAudioMeter(meter) {
107
+ this.inputAudioMeter?.Close();
108
+ this.inputAudioMeter = meter;
109
+ }
110
+ /** Attaches (replacing + closing any previous) the AGENT-output meter. `null` detaches. */
111
+ attachOutputAudioMeter(meter) {
112
+ this.outputAudioMeter?.Close();
113
+ this.outputAudioMeter = meter;
114
+ }
115
+ /** Releases both meters — every driver calls this from its disconnect/teardown path. */
116
+ closeAudioMeters() {
117
+ this.attachInputAudioMeter(null);
118
+ this.attachOutputAudioMeter(null);
119
+ }
120
+ // ── Handler registration ──────────────────────────────────────────────────
121
+ /**
122
+ * Registers the (single) transcript handler. Receives interim deltas (`IsFinal: false`)
123
+ * and final turn transcripts (`IsFinal: true`) for both roles, tagged with their
124
+ * {@link RealtimeClientTranscript.Kind}.
125
+ */
126
+ OnTranscript(handler) {
127
+ this.transcriptHandler = handler;
128
+ }
129
+ /**
130
+ * Registers the (single) tool-call handler. The host executes the tool and calls
131
+ * {@link SendToolResult} with the outcome.
132
+ */
133
+ OnToolCall(handler) {
134
+ this.toolCallHandler = handler;
135
+ }
136
+ /**
137
+ * Registers the (single) state-change handler. States may be re-emitted (e.g. repeated
138
+ * `'listening'` on successive barge-ins); hosts should treat emissions as idempotent.
139
+ */
140
+ OnStateChange(handler) {
141
+ this.stateChangeHandler = handler;
142
+ }
143
+ /**
144
+ * Registers the (single) error handler. Receives both fatal transport errors (which are
145
+ * also followed by an `'error'` state change) and non-fatal provider error frames.
146
+ */
147
+ OnError(handler) {
148
+ this.errorHandler = handler;
149
+ }
150
+ /**
151
+ * Registers the (single) interruption handler.
152
+ *
153
+ * **True barge-in only:** fires ONLY when USER INPUT CUT OFF ACTIVE MODEL OUTPUT — a
154
+ * model response in flight or audio audibly playing when the user took the floor. A
155
+ * user simply taking their normal turn while the model is idle is NOT an interruption,
156
+ * and drivers must not report it as one (e.g. a raw "speech started" frame must be
157
+ * gated on whether a response is actually active or audio is playing).
158
+ *
159
+ * On interruption, drivers must also flush locally-owned playback and report
160
+ * {@link IsAudioPlaying} `=== false` promptly (driver obligation #3). Hosts typically
161
+ * use this hook to abort in-flight delegated work so a stale result is never narrated
162
+ * into a conversation that has moved on.
163
+ */
164
+ OnInterruption(handler) {
165
+ this.interruptionHandler = handler;
166
+ }
167
+ /**
168
+ * Registers the (single) usage handler.
169
+ *
170
+ * Emissions carry token **deltas** for the response/turn that just completed (see
171
+ * {@link RealtimeClientUsage} — deltas preferred; cumulative-only providers must convert
172
+ * in the driver). Hosts accumulate and relay/persist on their own cadence (e.g. the voice
173
+ * session service debounces a `RelayRealtimeUsage` mutation onto the co-agent prompt run).
174
+ *
175
+ * **Optional capability:** drivers whose provider exposes no usage telemetry simply never
176
+ * emit — registering a handler is always safe, but hosts must not assume emissions arrive.
177
+ * See {@link RealtimeClientUsage} for per-driver availability.
178
+ */
179
+ OnUsage(handler) {
180
+ this.usageHandler = handler;
181
+ }
182
+ /**
183
+ * Registers the (single) remote-VIDEO handler — the model/avatar's video track for a VIDEO session
184
+ * (a talking-head the host renders, e.g. as the agent's tile). Invoked once the provider publishes
185
+ * its video track.
186
+ *
187
+ * **Optional capability:** audio-only drivers (the default) never emit — registering is always safe,
188
+ * but hosts must not assume a video track arrives. Video-capable drivers
189
+ * ({@link BaseRealtimeModel.SupportsVideo}) call {@link emitRemoteVideo} when the track is live.
190
+ *
191
+ * @param handler Invoked with the remote video `MediaStream` when it becomes available.
192
+ */
193
+ OnRemoteVideo(handler) {
194
+ this.remoteVideoHandler = handler;
195
+ }
196
+ // ── Protected emit helpers for concrete drivers ───────────────────────────
197
+ /** Emits a transcript event to the registered handler (if any). */
198
+ emitTranscript(transcript) {
199
+ this.transcriptHandler?.(transcript);
200
+ }
201
+ /** Emits a tool-call request to the registered handler (if any). */
202
+ emitToolCall(call) {
203
+ this.toolCallHandler?.(call);
204
+ }
205
+ /** Emits a state change to the registered handler (if any). */
206
+ emitStateChange(state) {
207
+ this.stateChangeHandler?.(state);
208
+ }
209
+ /** Emits an error to the registered handler (if any). */
210
+ emitError(error) {
211
+ this.errorHandler?.(error);
212
+ }
213
+ /** Emits a true barge-in interruption to the registered handler (if any). */
214
+ emitInterruption() {
215
+ this.interruptionHandler?.();
216
+ }
217
+ /** Emits a usage update (token deltas for a completed response/turn) to the registered handler (if any). */
218
+ emitUsage(usage) {
219
+ this.usageHandler?.(usage);
220
+ }
221
+ /** Emits the model/avatar's remote video stream to the registered handler (video drivers only). */
222
+ emitRemoteVideo(stream) {
223
+ this.remoteVideoHandler?.(stream);
224
+ }
225
+ }
226
+ //# sourceMappingURL=baseRealtimeClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseRealtimeClient.js","sourceRoot":"","sources":["../../src/generic/baseRealtimeClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AA2HpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,MAAM,OAAgB,kBAAkB;IAAxC;QAUI,+EAA+E;QAC/E,sEAAsE;QAC9D,oBAAe,GAA+B,IAAI,CAAC;QAC3D,yEAAyE;QACjE,qBAAgB,GAA+B,IAAI,CAAC;IAgRhE,CAAC;IA9QG;;;;;OAKG;IACI,gBAAgB;QACnB,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAClD,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAA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 export * from './audio/pcmUtils.js';
3
+ export * from './audio/audioMeter.js';
4
+ export * from './audio/pcmPlayback.js';
5
+ export * from './audio/micCapture.js';
6
+ export * from './drivers/openAIRealtimeClient.js';
7
+ export * from './drivers/geminiRealtimeClient.js';
8
+ export * from './drivers/elevenLabsRealtimeClient.js';
9
+ export * from './drivers/assemblyAIRealtimeClient.js';
10
+ export * from './drivers/xaiRealtimeClient.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ export * from './generic/baseRealtimeClient.js';
2
+ export * from './audio/pcmUtils.js';
3
+ export * from './audio/audioMeter.js';
4
+ export * from './audio/pcmPlayback.js';
5
+ export * from './audio/micCapture.js';
6
+ export * from './drivers/openAIRealtimeClient.js';
7
+ export * from './drivers/geminiRealtimeClient.js';
8
+ export * from './drivers/elevenLabsRealtimeClient.js';
9
+ export * from './drivers/assemblyAIRealtimeClient.js';
10
+ export * from './drivers/xaiRealtimeClient.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,31 @@
1
1
  {
2
2
  "name": "@memberjunction/ai-realtime-client",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @memberjunction/ai-realtime-client",
5
- "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
3
+ "type": "module",
4
+ "version": "5.42.0",
5
+ "description": "MemberJunction: Framework-agnostic browser client abstraction for provider-direct realtime (voice) sessions - BaseRealtimeClient + provider drivers",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "/dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsc && tsc-alias -f",
13
+ "test": "vitest run",
14
+ "test:watch": "vitest"
15
+ },
16
+ "author": "MemberJunction.com",
17
+ "license": "ISC",
18
+ "dependencies": {
19
+ "@memberjunction/global": "5.42.0",
20
+ "@memberjunction/ai": "5.42.0",
21
+ "@google/genai": "^1.40.0"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "24.10.11",
25
+ "typescript": "^5.9.3"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/MemberJunction/MJ"
30
+ }
10
31
  }