@memberjunction/ai-realtime-client 6.2.0-edge.3 → 6.2.0-edge.4

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 (206) hide show
  1. package/README.md +156 -29
  2. package/dist/audio/audioMeter.d.ts +71 -0
  3. package/dist/audio/audioMeter.d.ts.map +1 -1
  4. package/dist/audio/audioMeter.js +83 -0
  5. package/dist/audio/audioMeter.js.map +1 -1
  6. package/dist/audio/mediaElementAudioRouter.d.ts +41 -0
  7. package/dist/audio/mediaElementAudioRouter.d.ts.map +1 -0
  8. package/dist/audio/mediaElementAudioRouter.js +82 -0
  9. package/dist/audio/mediaElementAudioRouter.js.map +1 -0
  10. package/dist/audio/micCapture.d.ts +12 -3
  11. package/dist/audio/micCapture.d.ts.map +1 -1
  12. package/dist/audio/micCapture.js +15 -1
  13. package/dist/audio/micCapture.js.map +1 -1
  14. package/dist/audio/pcmPlayback.d.ts +72 -4
  15. package/dist/audio/pcmPlayback.d.ts.map +1 -1
  16. package/dist/audio/pcmPlayback.js +101 -1
  17. package/dist/audio/pcmPlayback.js.map +1 -1
  18. package/dist/drivers/assemblyAIRealtimeClient.d.ts +2 -0
  19. package/dist/drivers/assemblyAIRealtimeClient.d.ts.map +1 -1
  20. package/dist/drivers/assemblyAIRealtimeClient.js +14 -0
  21. package/dist/drivers/assemblyAIRealtimeClient.js.map +1 -1
  22. package/dist/drivers/elevenLabsRealtimeClient.d.ts +2 -0
  23. package/dist/drivers/elevenLabsRealtimeClient.d.ts.map +1 -1
  24. package/dist/drivers/elevenLabsRealtimeClient.js +14 -0
  25. package/dist/drivers/elevenLabsRealtimeClient.js.map +1 -1
  26. package/dist/drivers/geminiAvatarOutput.d.ts +132 -0
  27. package/dist/drivers/geminiAvatarOutput.d.ts.map +1 -0
  28. package/dist/drivers/geminiAvatarOutput.js +310 -0
  29. package/dist/drivers/geminiAvatarOutput.js.map +1 -0
  30. package/dist/drivers/geminiEnterpriseRealtimeClient.d.ts +38 -0
  31. package/dist/drivers/geminiEnterpriseRealtimeClient.d.ts.map +1 -0
  32. package/dist/drivers/geminiEnterpriseRealtimeClient.js +107 -0
  33. package/dist/drivers/geminiEnterpriseRealtimeClient.js.map +1 -0
  34. package/dist/drivers/geminiRealtimeClient.d.ts +314 -48
  35. package/dist/drivers/geminiRealtimeClient.d.ts.map +1 -1
  36. package/dist/drivers/geminiRealtimeClient.js +759 -176
  37. package/dist/drivers/geminiRealtimeClient.js.map +1 -1
  38. package/dist/drivers/openAILiveClient.d.ts +5 -8
  39. package/dist/drivers/openAILiveClient.d.ts.map +1 -1
  40. package/dist/drivers/openAILiveClient.js +19 -32
  41. package/dist/drivers/openAILiveClient.js.map +1 -1
  42. package/dist/drivers/openAIRealtimeClient.d.ts +13 -26
  43. package/dist/drivers/openAIRealtimeClient.d.ts.map +1 -1
  44. package/dist/drivers/openAIRealtimeClient.js +28 -55
  45. package/dist/drivers/openAIRealtimeClient.js.map +1 -1
  46. package/dist/generic/baseRealtimeClient.d.ts +173 -29
  47. package/dist/generic/baseRealtimeClient.d.ts.map +1 -1
  48. package/dist/generic/baseRealtimeClient.js +233 -14
  49. package/dist/generic/baseRealtimeClient.js.map +1 -1
  50. package/dist/generic/openAIProtocolClient.d.ts +2 -0
  51. package/dist/generic/openAIProtocolClient.d.ts.map +1 -1
  52. package/dist/generic/openAIProtocolClient.js +14 -0
  53. package/dist/generic/openAIProtocolClient.js.map +1 -1
  54. package/dist/index.d.ts +2 -3
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +3 -3
  57. package/dist/index.js.map +1 -1
  58. package/dist/media/attachVideoSource.d.ts +23 -0
  59. package/dist/media/attachVideoSource.d.ts.map +1 -0
  60. package/dist/media/attachVideoSource.js +49 -0
  61. package/dist/media/attachVideoSource.js.map +1 -0
  62. package/dist/media/channelVideoSource.d.ts +110 -14
  63. package/dist/media/channelVideoSource.d.ts.map +1 -1
  64. package/dist/media/channelVideoSource.js +183 -18
  65. package/dist/media/channelVideoSource.js.map +1 -1
  66. package/dist/media/decoders/frameScheduler.d.ts +119 -0
  67. package/dist/media/decoders/frameScheduler.d.ts.map +1 -0
  68. package/dist/media/decoders/frameScheduler.js +238 -0
  69. package/dist/media/decoders/frameScheduler.js.map +1 -0
  70. package/dist/media/decoders/imageFrameDecoder.d.ts +58 -0
  71. package/dist/media/decoders/imageFrameDecoder.d.ts.map +1 -0
  72. package/dist/media/decoders/imageFrameDecoder.js +110 -0
  73. package/dist/media/decoders/imageFrameDecoder.js.map +1 -0
  74. package/dist/media/decoders/mseFmp4Decoder.d.ts +130 -0
  75. package/dist/media/decoders/mseFmp4Decoder.d.ts.map +1 -0
  76. package/dist/media/decoders/mseFmp4Decoder.js +402 -0
  77. package/dist/media/decoders/mseFmp4Decoder.js.map +1 -0
  78. package/dist/media/decoders/streamCanvas.d.ts +46 -0
  79. package/dist/media/decoders/streamCanvas.d.ts.map +1 -0
  80. package/dist/media/decoders/streamCanvas.js +163 -0
  81. package/dist/media/decoders/streamCanvas.js.map +1 -0
  82. package/dist/media/decoders/videoMimeTypes.d.ts +29 -0
  83. package/dist/media/decoders/videoMimeTypes.d.ts.map +1 -0
  84. package/dist/media/decoders/videoMimeTypes.js +50 -0
  85. package/dist/media/decoders/videoMimeTypes.js.map +1 -0
  86. package/dist/media/decoders/webCodecsChunkDecoder.d.ts +99 -0
  87. package/dist/media/decoders/webCodecsChunkDecoder.d.ts.map +1 -0
  88. package/dist/media/decoders/webCodecsChunkDecoder.js +265 -0
  89. package/dist/media/decoders/webCodecsChunkDecoder.js.map +1 -0
  90. package/dist/media/displayCapture.d.ts +128 -0
  91. package/dist/media/displayCapture.d.ts.map +1 -0
  92. package/dist/media/displayCapture.js +245 -0
  93. package/dist/media/displayCapture.js.map +1 -0
  94. package/dist/media/frameCapture.d.ts +25 -8
  95. package/dist/media/frameCapture.d.ts.map +1 -1
  96. package/dist/media/frameCapture.js +42 -72
  97. package/dist/media/frameCapture.js.map +1 -1
  98. package/dist/media/frameSampler.d.ts +94 -0
  99. package/dist/media/frameSampler.d.ts.map +1 -0
  100. package/dist/media/frameSampler.js +134 -0
  101. package/dist/media/frameSampler.js.map +1 -0
  102. package/dist/media/index.d.ts +32 -0
  103. package/dist/media/index.d.ts.map +1 -0
  104. package/dist/media/index.js +32 -0
  105. package/dist/media/index.js.map +1 -0
  106. package/dist/media/localMediaController.d.ts +116 -0
  107. package/dist/media/localMediaController.d.ts.map +1 -0
  108. package/dist/media/localMediaController.js +281 -0
  109. package/dist/media/localMediaController.js.map +1 -0
  110. package/dist/media/mediaLayout.d.ts +93 -0
  111. package/dist/media/mediaLayout.d.ts.map +1 -0
  112. package/dist/media/mediaLayout.js +187 -0
  113. package/dist/media/mediaLayout.js.map +1 -0
  114. package/dist/media/mediaPreview.d.ts +94 -0
  115. package/dist/media/mediaPreview.d.ts.map +1 -0
  116. package/dist/media/mediaPreview.js +154 -0
  117. package/dist/media/mediaPreview.js.map +1 -0
  118. package/dist/media/mediaStage.d.ts +99 -0
  119. package/dist/media/mediaStage.d.ts.map +1 -0
  120. package/dist/media/mediaStage.js +171 -0
  121. package/dist/media/mediaStage.js.map +1 -0
  122. package/dist/media/model.d.ts +154 -0
  123. package/dist/media/model.d.ts.map +1 -0
  124. package/dist/media/model.js +9 -0
  125. package/dist/media/model.js.map +1 -0
  126. package/dist/media/playbackClock.d.ts +20 -0
  127. package/dist/media/playbackClock.d.ts.map +1 -0
  128. package/dist/media/playbackClock.js +13 -0
  129. package/dist/media/playbackClock.js.map +1 -0
  130. package/dist/media/videoFrameDecoder.d.ts +86 -0
  131. package/dist/media/videoFrameDecoder.d.ts.map +1 -0
  132. package/dist/media/videoFrameDecoder.js +2 -0
  133. package/dist/media/videoFrameDecoder.js.map +1 -0
  134. package/dist/media/videoFrameDecoderRegistry.d.ts +40 -0
  135. package/dist/media/videoFrameDecoderRegistry.d.ts.map +1 -0
  136. package/dist/media/videoFrameDecoderRegistry.js +69 -0
  137. package/dist/media/videoFrameDecoderRegistry.js.map +1 -0
  138. package/dist/media/videoPacing.d.ts +32 -0
  139. package/dist/media/videoPacing.d.ts.map +1 -0
  140. package/dist/media/videoPacing.js +37 -0
  141. package/dist/media/videoPacing.js.map +1 -0
  142. package/dist/media/videoPlayout.d.ts +168 -0
  143. package/dist/media/videoPlayout.d.ts.map +1 -0
  144. package/dist/media/videoPlayout.js +217 -0
  145. package/dist/media/videoPlayout.js.map +1 -0
  146. package/dist/media/videoSourceArbiter.d.ts +250 -0
  147. package/dist/media/videoSourceArbiter.d.ts.map +1 -0
  148. package/dist/media/videoSourceArbiter.js +423 -0
  149. package/dist/media/videoSourceArbiter.js.map +1 -0
  150. package/dist/testing/conformanceAssertions.d.ts +25 -0
  151. package/dist/testing/conformanceAssertions.d.ts.map +1 -0
  152. package/dist/testing/conformanceAssertions.js +64 -0
  153. package/dist/testing/conformanceAssertions.js.map +1 -0
  154. package/dist/testing/conformanceFixtures.d.ts +76 -0
  155. package/dist/testing/conformanceFixtures.d.ts.map +1 -0
  156. package/dist/testing/conformanceFixtures.js +169 -0
  157. package/dist/testing/conformanceFixtures.js.map +1 -0
  158. package/dist/testing/conformanceGates.d.ts +32 -0
  159. package/dist/testing/conformanceGates.d.ts.map +1 -0
  160. package/dist/testing/conformanceGates.js +35 -0
  161. package/dist/testing/conformanceGates.js.map +1 -0
  162. package/dist/testing/conformanceMicrophone.d.ts +10 -0
  163. package/dist/testing/conformanceMicrophone.d.ts.map +1 -0
  164. package/dist/testing/conformanceMicrophone.js +71 -0
  165. package/dist/testing/conformanceMicrophone.js.map +1 -0
  166. package/dist/testing/conformanceTimeline.d.ts +128 -0
  167. package/dist/testing/conformanceTimeline.d.ts.map +1 -0
  168. package/dist/testing/conformanceTimeline.js +32 -0
  169. package/dist/testing/conformanceTimeline.js.map +1 -0
  170. package/dist/testing/conformanceVideoStream.d.ts +29 -0
  171. package/dist/testing/conformanceVideoStream.d.ts.map +1 -0
  172. package/dist/testing/conformanceVideoStream.js +39 -0
  173. package/dist/testing/conformanceVideoStream.js.map +1 -0
  174. package/dist/testing/index.d.ts +29 -0
  175. package/dist/testing/index.d.ts.map +1 -0
  176. package/dist/testing/index.js +28 -0
  177. package/dist/testing/index.js.map +1 -0
  178. package/dist/testing/realtimeVideoConformance.d.ts +23 -0
  179. package/dist/testing/realtimeVideoConformance.d.ts.map +1 -0
  180. package/dist/testing/realtimeVideoConformance.js +139 -0
  181. package/dist/testing/realtimeVideoConformance.js.map +1 -0
  182. package/dist/testing/realtimeVideoConformanceChecks.d.ts +4 -0
  183. package/dist/testing/realtimeVideoConformanceChecks.d.ts.map +1 -0
  184. package/dist/testing/realtimeVideoConformanceChecks.js +164 -0
  185. package/dist/testing/realtimeVideoConformanceChecks.js.map +1 -0
  186. package/dist/testing/realtimeVideoConformanceFrameChecks.d.ts +4 -0
  187. package/dist/testing/realtimeVideoConformanceFrameChecks.d.ts.map +1 -0
  188. package/dist/testing/realtimeVideoConformanceFrameChecks.js +63 -0
  189. package/dist/testing/realtimeVideoConformanceFrameChecks.js.map +1 -0
  190. package/dist/testing/realtimeVideoConformanceSession.d.ts +108 -0
  191. package/dist/testing/realtimeVideoConformanceSession.d.ts.map +1 -0
  192. package/dist/testing/realtimeVideoConformanceSession.js +270 -0
  193. package/dist/testing/realtimeVideoConformanceSession.js.map +1 -0
  194. package/dist/testing/realtimeVideoConformanceTurnChecks.d.ts +4 -0
  195. package/dist/testing/realtimeVideoConformanceTurnChecks.d.ts.map +1 -0
  196. package/dist/testing/realtimeVideoConformanceTurnChecks.js +248 -0
  197. package/dist/testing/realtimeVideoConformanceTurnChecks.js.map +1 -0
  198. package/dist/testing/realtimeVideoConformanceTypes.d.ts +155 -0
  199. package/dist/testing/realtimeVideoConformanceTypes.d.ts.map +1 -0
  200. package/dist/testing/realtimeVideoConformanceTypes.js +2 -0
  201. package/dist/testing/realtimeVideoConformanceTypes.js.map +1 -0
  202. package/dist/testing/recordingPlayout.d.ts +84 -0
  203. package/dist/testing/recordingPlayout.d.ts.map +1 -0
  204. package/dist/testing/recordingPlayout.js +120 -0
  205. package/dist/testing/recordingPlayout.js.map +1 -0
  206. package/package.json +29 -4
@@ -0,0 +1,155 @@
1
+ /**
2
+ * @fileoverview The contract between the video conformance kit and a provider's test: the harness a provider writes
3
+ * (what its server mints, its client driver with a fake transport, and the model's side of the wire), and what the kit
4
+ * reports back.
5
+ *
6
+ * @module @memberjunction/ai-realtime-client/testing
7
+ */
8
+ import type { ClientRealtimeSessionConfig, RealtimeVideoFrame, RealtimeVideoFrameKind } from '@memberjunction/ai';
9
+ import type { BaseRealtimeClient } from '../generic/baseRealtimeClient.js';
10
+ import type { VideoPlayoutOptions } from '../media/videoPlayout.js';
11
+ import type { RecordingPcmPlayback, RecordingVideoPlayout } from './recordingPlayout.js';
12
+ /** What the provider's server granted the session: an avatar or not. The kit adds the host's track request itself. */
13
+ export interface RealtimeVideoConformanceGrant {
14
+ /** The server granted an avatar: the model will send the agent's video. */
15
+ Avatar: boolean;
16
+ /**
17
+ * The avatar's video carries the voice (a muxed MP4); otherwise the voice comes separately, as PCM. Default: whether
18
+ * the provider's video can carry the voice ({@link RealtimeVideoConformanceTraits.VideoCanCarryVoice}).
19
+ */
20
+ VideoCarriesVoice?: boolean;
21
+ }
22
+ /** What a provider can do. A check that needs something the provider can't do is skipped with the reason. */
23
+ export interface RealtimeVideoConformanceTraits {
24
+ /**
25
+ * How the agent's video reaches the host: a player the driver creates through its creation seam (`'playout'`, the
26
+ * kit records it), a live `MediaStream` (`'stream'`, as a WebRTC provider hands over), or never (`'none'`, audio
27
+ * only).
28
+ */
29
+ AgentVideo: 'playout' | 'stream' | 'none';
30
+ /** Whether this provider's server can grant an avatar at all. The Gemini Developer API can't. */
31
+ GrantsAvatar: boolean;
32
+ /** Who plays the agent's voice: the driver's PCM playback (the kit's recorder), or the transport (WebRTC). */
33
+ Voice: 'pcm' | 'transport';
34
+ /** Whether the avatar's video can carry the voice, so the kit checks the voice never plays twice. */
35
+ VideoCanCarryVoice: boolean;
36
+ /** Whether the driver reports the seconds of video the model generated (`OutputTokenDetails.VideoSeconds`). */
37
+ VideoUsage: boolean;
38
+ /**
39
+ * The form the model's video comes in, as Core's `RealtimeVideoFrame` kinds: fragmented MP4 (a Gemini avatar), encoded
40
+ * chunks, or images. The kit sends frames of this kind. Default `'fmp4'`.
41
+ */
42
+ VideoFrameKind?: RealtimeVideoFrameKind;
43
+ /**
44
+ * Whether the model's voice and video share one media timeline that the driver keeps: it queues each PCM chunk with
45
+ * its media time and hands its voice playback to the video player as the clock (`VideoPlayoutOptions.Clock`), so the
46
+ * face moves with the voice. Default `false` (Gemini's PCM carries no media time).
47
+ */
48
+ TimedVoice?: boolean;
49
+ /**
50
+ * Checks this test environment can't run faithfully, by id, with the reason. They are reported skipped; a skip here
51
+ * says nothing about the provider.
52
+ */
53
+ EnvironmentSkips?: Readonly<Record<string, string>>;
54
+ }
55
+ /** What the kit hands a harness to wire into its driver's creation seams. */
56
+ export interface RealtimeVideoConformanceMedia {
57
+ /** A microphone stream with one audio track, to connect with. */
58
+ readonly Microphone: MediaStream;
59
+ /** The agent's voice playback, for a driver that plays PCM itself. */
60
+ readonly Voice: RecordingPcmPlayback;
61
+ /** Creates the avatar's video player, for a driver that plays the video itself; each one records what it is given. */
62
+ CreateVideoPlayer(options: VideoPlayoutOptions): RecordingVideoPlayout;
63
+ }
64
+ /**
65
+ * One provider, set up for one check: the factory makes a new one per check, and once more to read its traits and
66
+ * methods when the checks are listed. Keep construction free of side effects (install fakes in {@link CreateClient}, undo
67
+ * them in {@link Dispose}).
68
+ *
69
+ * Methods marked optional gate checks: a check that needs one the harness lacks is skipped with the reason.
70
+ */
71
+ export interface IRealtimeVideoConformanceHarness {
72
+ /** The run's name, for messages, e.g. `'gemini-enterprise'`. */
73
+ readonly Name: string;
74
+ readonly Traits: RealtimeVideoConformanceTraits;
75
+ /** The session config the provider's server mints for the grant. The kit adds the host's track request to it. */
76
+ Mint(grant: RealtimeVideoConformanceGrant): ClientRealtimeSessionConfig;
77
+ /**
78
+ * A client driver with a fake transport, its creation seams wired to `media`. Register no handlers on it: the kit
79
+ * registers its own. A check may run two sessions one after the other, so a second call starts over with a new client.
80
+ */
81
+ CreateClient(media: RealtimeVideoConformanceMedia): BaseRealtimeClient;
82
+ /** Connects the client, and opens whatever the fake transport needs, until the session listens. */
83
+ Connect(client: BaseRealtimeClient, config: ClientRealtimeSessionConfig, microphone: MediaStream): Promise<void>;
84
+ /** Makes this browser unable to play the provider's video, before the next connect. Returns the undo. */
85
+ RefusePlayback?(): () => void;
86
+ /** Whether the last connect asked the provider for video: an avatar nobody sees is still generated, and billed. */
87
+ AskedProviderForVideo?(): boolean;
88
+ /**
89
+ * The model sends a frame of the agent's video, of the provider's kind ({@link RealtimeVideoConformanceTraits.VideoFrameKind}),
90
+ * as Core's `RealtimeVideoFrame`: the harness puts it on its wire as the provider would. Resolves once the client has
91
+ * handled it.
92
+ */
93
+ SendVideo(frame: RealtimeVideoFrame): Promise<void>;
94
+ /**
95
+ * The model sends PCM16 of the agent's voice. Resolves once the client has handled it.
96
+ *
97
+ * @param pcm16 The chunk.
98
+ * @param mediaTimeMs Where the chunk starts on the stream's media timeline, for a provider with
99
+ * {@link RealtimeVideoConformanceTraits.TimedVoice}; a provider whose wire has no time ignores it.
100
+ */
101
+ SendVoice(pcm16: ArrayBuffer, mediaTimeMs?: number): Promise<void>;
102
+ /** The model sends a part of any MIME type, as the provider's wire names it. */
103
+ SendPart?(mimeType: string, data: ArrayBuffer): Promise<void>;
104
+ /**
105
+ * The model starts speaking its answer: its first words, as the provider transcribes them (Gemini: the output
106
+ * transcription). The video that follows is the answer's until the turn's generation completes; video outside an
107
+ * answer (an avatar's between answers, which Vertex AI streams) plays, but is not the agent speaking. Without it the
108
+ * kit can't tell the two apart, and VC13 leaves that part out.
109
+ */
110
+ AnswerStarted?(): Promise<void>;
111
+ /** The model has generated the whole turn; its media may still be arriving. Without it the kit uses {@link TurnComplete}. */
112
+ GenerationComplete?(): Promise<void>;
113
+ /** The model's turn is over. */
114
+ TurnComplete(): Promise<void>;
115
+ /** The user barged in: the provider stopped the model's turn. */
116
+ Interrupted(): Promise<void>;
117
+ /** A planned move to a new connection, mid-turn (the provider's session resumption). Resolves once the session listens again. */
118
+ Resume?(): Promise<void>;
119
+ /** Releases what the harness set up. Called once after each check, failed ones too. */
120
+ Dispose?(): void | Promise<void>;
121
+ }
122
+ /** Makes a new harness for each check. */
123
+ export type RealtimeVideoConformanceDriverFactory = () => IRealtimeVideoConformanceHarness;
124
+ /** The outcome of one check. */
125
+ export interface RealtimeVideoConformanceResult {
126
+ Id: string;
127
+ Title: string;
128
+ Status: 'Passed' | 'Failed' | 'Skipped';
129
+ /** Why it failed, or why it was skipped; `null` when it passed. */
130
+ Detail: string | null;
131
+ DurationMs: number;
132
+ }
133
+ /** One check: a scripted session against a harness, with plain assertions. */
134
+ export interface RealtimeVideoConformanceCheck {
135
+ /** `VC01`, `VC02`, ... */
136
+ Id: string;
137
+ Title: string;
138
+ /** Why the check can't run against this harness, or `null` when it can. */
139
+ Gate(harness: IRealtimeVideoConformanceHarness): string | null;
140
+ /** Runs the check. Rejects with a `RealtimeVideoConformanceError` naming the rule a driver broke. */
141
+ Run(harness: IRealtimeVideoConformanceHarness): Promise<void>;
142
+ }
143
+ /** A check bound to a driver factory, for a test runner: one test per check. */
144
+ export interface RealtimeVideoConformanceCheckRun {
145
+ Id: string;
146
+ Title: string;
147
+ /** Why the check is skipped for this driver (register the test as skipped), or `null`. */
148
+ SkipReason: string | null;
149
+ /**
150
+ * Runs the check on a new harness and disposes it. Rejects with a `RealtimeVideoConformanceError` on a failure.
151
+ * Does nothing when {@link SkipReason} is set.
152
+ */
153
+ Run(): Promise<void>;
154
+ }
155
+ //# sourceMappingURL=realtimeVideoConformanceTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtimeVideoConformanceTypes.d.ts","sourceRoot":"","sources":["../../src/testing/realtimeVideoConformanceTypes.ts"],"names":[],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AI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC;AAED,0CAA0C;AAC1C,MAAM,MAAM,qCAAqC,GAAG,MAAM,gCAAgC,CAAC;AAE3F,gCAAgC;AAChC,MAAM,WAAW,8BAA8B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,mEAAmE;IACnE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,8EAA8E;AAC9E,MAAM,WAAW,6BAA6B;IAC1C,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,OAAO,EAAE,gCAAgC,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/D,qGAAqG;IACrG,GAAG,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED,gFAAgF;AAChF,MAAM,WAAW,gCAAgC;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=realtimeVideoConformanceTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtimeVideoConformanceTypes.js","sourceRoot":"","sources":["../../src/testing/realtimeVideoConformanceTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * @fileoverview The kit's recorders: a video player and a PCM playback that play nothing and write down, in order, what
3
+ * the driver did with them. A harness wires them into the driver's creation seams, so the kit checks the driver's
4
+ * obligations to the avatar's video and voice whatever decodes them in a browser.
5
+ *
6
+ * @module @memberjunction/ai-realtime-client/testing
7
+ */
8
+ import type { RealtimeVideoFrame } from '@memberjunction/ai';
9
+ import type { IRealtimePcmPlayback } from '../audio/pcmPlayback.js';
10
+ import type { MediaVideoSource } from '../media/model.js';
11
+ import type { IPlaybackClock } from '../media/playbackClock.js';
12
+ import type { IAvatarVideoPlayout, VideoPlayoutOptions, VideoPlayoutProblem } from '../media/videoPlayout.js';
13
+ import { RealtimeVideoConformanceTimeline } from './conformanceTimeline.js';
14
+ /**
15
+ * A video player that records what the driver does with it: each frame appended, each end of turn, flush and dispose.
16
+ *
17
+ * `IsPlaying` models the element: true once a piece is appended, false after a flush, a dispose or
18
+ * {@link FinishPlaying}. An end of turn leaves it playing (the element plays out what it has). `FramesAhead` models the
19
+ * playhead the same way: every frame appended since the last flush, dispose or {@link FinishPlaying} is still to play.
20
+ */
21
+ export declare class RecordingVideoPlayout implements IAvatarVideoPlayout {
22
+ readonly Options: VideoPlayoutOptions;
23
+ readonly Timeline: RealtimeVideoConformanceTimeline;
24
+ readonly Index: number;
25
+ /** The video to show. The same object every time, so a check can tell this player's video from another's. */
26
+ readonly Source: MediaVideoSource;
27
+ private carriesVoice;
28
+ private playing;
29
+ private framesAhead;
30
+ /**
31
+ * @param Options What the driver created the player with.
32
+ * @param Timeline Where the player records; a timeline of its own when absent.
33
+ * @param Index This player's number in its session, from 0.
34
+ */
35
+ constructor(Options: VideoPlayoutOptions, Timeline?: RealtimeVideoConformanceTimeline, Index?: number);
36
+ /** Whether the player plays forward with media buffered ahead of its playhead. */
37
+ get IsPlaying(): boolean;
38
+ /** How many of the frames appended are still to play: those since the last flush, dispose or {@link FinishPlaying}. */
39
+ get FramesAhead(): number;
40
+ /** Whether the player plays the video's audio; `false` mutes it. Each change is recorded. */
41
+ get CarriesVoice(): boolean;
42
+ set CarriesVoice(value: boolean);
43
+ /** Records the frame; the player now plays, and the frame is still to play. */
44
+ Append(frame: RealtimeVideoFrame): void;
45
+ /** Records the end of the turn's video. */
46
+ EndOfTurn(): void;
47
+ /** Records the flush; the player stops, and drops every frame still to play. */
48
+ Flush(): void;
49
+ /** The recorder reports no problems: it plays nothing. Returns the function that removes the handler. */
50
+ OnProblem(_handler: (problem: VideoPlayoutProblem, message: string) => void): () => void;
51
+ /** Records the dispose; the player stops, with nothing left to play. */
52
+ Dispose(): void;
53
+ /** Models the element reaching the end of what it was given: it stops playing, every frame played. Not recorded. */
54
+ FinishPlaying(): void;
55
+ }
56
+ /**
57
+ * A PCM playback that records what the driver queues and flushes. `IsPlaying` is true once PCM is queued, false after a
58
+ * flush, a close or {@link FinishPlaying}.
59
+ *
60
+ * It is also a playback clock, as `RealtimePcmPlayback` is, so a driver can hand it to its video player as
61
+ * `VideoPlayoutOptions.Clock`. It plays nothing, so its clock is a model: {@link CurrentTimeMs} reads the media time of the
62
+ * last chunk queued with one, as if that chunk were being heard, and `null` before one, after an untimed chunk and once
63
+ * the voice stops.
64
+ */
65
+ export declare class RecordingPcmPlayback implements IRealtimePcmPlayback, IPlaybackClock {
66
+ readonly Timeline: RealtimeVideoConformanceTimeline;
67
+ private playing;
68
+ private heardMs;
69
+ /** @param Timeline Where the playback records; a timeline of its own when absent. */
70
+ constructor(Timeline?: RealtimeVideoConformanceTimeline);
71
+ /** Whether queued PCM is playing. */
72
+ get IsPlaying(): boolean;
73
+ /** The media time (ms) of the voice heard now, as the recorder models it; `null` while no timed voice plays. */
74
+ get CurrentTimeMs(): number | null;
75
+ /** Records the chunk and its media time; the voice now plays. */
76
+ Enqueue(pcm16: ArrayBuffer, mediaTimeMs?: number): void;
77
+ /** Records the flush; the voice stops. */
78
+ Flush(): void;
79
+ /** Records the close; the voice stops. */
80
+ Close(): void;
81
+ /** Models the queued PCM running out: the voice stops. Not recorded. */
82
+ FinishPlaying(): void;
83
+ }
84
+ //# sourceMappingURL=recordingPlayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordingPlayout.d.ts","sourceRoot":"","sources":["../../src/test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,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAI/F,wEAAwE;IACjE,OAAO,IAAI,IAAI;IAMtB,oHAAoH;IAC7G,aAAa,IAAI,IAAI;CAI/B;AAED;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,YAAW,oBAAoB,EAAE,cAAc;aAKjD,QAAQ,EAAE,gCAAgC;IAJtE,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAuB;IAEtC,qFAAqF;gBACzD,QAAQ,GAAE,gCAAyE;IAE/G,qCAAqC;IACrC,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED,gHAAgH;IAChH,IAAW,aAAa,IAAI,MAAM,GAAG,IAAI,CAExC;IAED,iEAAiE;IAC1D,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAO9D,0CAA0C;IACnC,KAAK,IAAI,IAAI;IAKpB,0CAA0C;IACnC,KAAK,IAAI,IAAI;IAKpB,wEAAwE;IACjE,aAAa,IAAI,IAAI;CAG/B"}
@@ -0,0 +1,120 @@
1
+ import { RealtimeVideoConformanceTimeline } from './conformanceTimeline.js';
2
+ /**
3
+ * A video player that records what the driver does with it: each frame appended, each end of turn, flush and dispose.
4
+ *
5
+ * `IsPlaying` models the element: true once a piece is appended, false after a flush, a dispose or
6
+ * {@link FinishPlaying}. An end of turn leaves it playing (the element plays out what it has). `FramesAhead` models the
7
+ * playhead the same way: every frame appended since the last flush, dispose or {@link FinishPlaying} is still to play.
8
+ */
9
+ export class RecordingVideoPlayout {
10
+ /**
11
+ * @param Options What the driver created the player with.
12
+ * @param Timeline Where the player records; a timeline of its own when absent.
13
+ * @param Index This player's number in its session, from 0.
14
+ */
15
+ constructor(Options, Timeline = new RealtimeVideoConformanceTimeline(), Index = 0) {
16
+ this.Options = Options;
17
+ this.Timeline = Timeline;
18
+ this.Index = Index;
19
+ /** The video to show. The same object every time, so a check can tell this player's video from another's. */
20
+ this.Source = { Kind: 'element', Attach: () => () => undefined };
21
+ this.playing = false;
22
+ this.framesAhead = 0;
23
+ this.carriesVoice = Options.CarriesVoice ?? true;
24
+ Timeline.Record({ Kind: 'player-created', Player: Index, Options });
25
+ }
26
+ /** Whether the player plays forward with media buffered ahead of its playhead. */
27
+ get IsPlaying() {
28
+ return this.playing;
29
+ }
30
+ /** How many of the frames appended are still to play: those since the last flush, dispose or {@link FinishPlaying}. */
31
+ get FramesAhead() {
32
+ return this.framesAhead;
33
+ }
34
+ /** Whether the player plays the video's audio; `false` mutes it. Each change is recorded. */
35
+ get CarriesVoice() {
36
+ return this.carriesVoice;
37
+ }
38
+ set CarriesVoice(value) {
39
+ this.carriesVoice = value;
40
+ this.Timeline.Record({ Kind: 'player-carries-voice', Player: this.Index, CarriesVoice: value });
41
+ }
42
+ /** Records the frame; the player now plays, and the frame is still to play. */
43
+ Append(frame) {
44
+ this.Timeline.Record({ Kind: 'player-append', Player: this.Index, Frame: frame });
45
+ this.playing = true;
46
+ this.framesAhead++;
47
+ }
48
+ /** Records the end of the turn's video. */
49
+ EndOfTurn() {
50
+ this.Timeline.Record({ Kind: 'player-end-of-turn', Player: this.Index });
51
+ }
52
+ /** Records the flush; the player stops, and drops every frame still to play. */
53
+ Flush() {
54
+ this.Timeline.Record({ Kind: 'player-flush', Player: this.Index });
55
+ this.playing = false;
56
+ this.framesAhead = 0;
57
+ }
58
+ /** The recorder reports no problems: it plays nothing. Returns the function that removes the handler. */
59
+ OnProblem(_handler) {
60
+ return () => undefined;
61
+ }
62
+ /** Records the dispose; the player stops, with nothing left to play. */
63
+ Dispose() {
64
+ this.Timeline.Record({ Kind: 'player-dispose', Player: this.Index });
65
+ this.playing = false;
66
+ this.framesAhead = 0;
67
+ }
68
+ /** Models the element reaching the end of what it was given: it stops playing, every frame played. Not recorded. */
69
+ FinishPlaying() {
70
+ this.playing = false;
71
+ this.framesAhead = 0;
72
+ }
73
+ }
74
+ /**
75
+ * A PCM playback that records what the driver queues and flushes. `IsPlaying` is true once PCM is queued, false after a
76
+ * flush, a close or {@link FinishPlaying}.
77
+ *
78
+ * It is also a playback clock, as `RealtimePcmPlayback` is, so a driver can hand it to its video player as
79
+ * `VideoPlayoutOptions.Clock`. It plays nothing, so its clock is a model: {@link CurrentTimeMs} reads the media time of the
80
+ * last chunk queued with one, as if that chunk were being heard, and `null` before one, after an untimed chunk and once
81
+ * the voice stops.
82
+ */
83
+ export class RecordingPcmPlayback {
84
+ /** @param Timeline Where the playback records; a timeline of its own when absent. */
85
+ constructor(Timeline = new RealtimeVideoConformanceTimeline()) {
86
+ this.Timeline = Timeline;
87
+ this.playing = false;
88
+ this.heardMs = null;
89
+ }
90
+ /** Whether queued PCM is playing. */
91
+ get IsPlaying() {
92
+ return this.playing;
93
+ }
94
+ /** The media time (ms) of the voice heard now, as the recorder models it; `null` while no timed voice plays. */
95
+ get CurrentTimeMs() {
96
+ return this.playing ? this.heardMs : null;
97
+ }
98
+ /** Records the chunk and its media time; the voice now plays. */
99
+ Enqueue(pcm16, mediaTimeMs) {
100
+ const timed = typeof mediaTimeMs === 'number';
101
+ this.Timeline.Record(timed ? { Kind: 'voice-enqueue', Data: pcm16, MediaTimeMs: mediaTimeMs } : { Kind: 'voice-enqueue', Data: pcm16 });
102
+ this.heardMs = timed ? mediaTimeMs : null;
103
+ this.playing = true;
104
+ }
105
+ /** Records the flush; the voice stops. */
106
+ Flush() {
107
+ this.Timeline.Record({ Kind: 'voice-flush' });
108
+ this.playing = false;
109
+ }
110
+ /** Records the close; the voice stops. */
111
+ Close() {
112
+ this.Timeline.Record({ Kind: 'voice-close' });
113
+ this.playing = false;
114
+ }
115
+ /** Models the queued PCM running out: the voice stops. Not recorded. */
116
+ FinishPlaying() {
117
+ this.playing = false;
118
+ }
119
+ }
120
+ //# sourceMappingURL=recordingPlayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordingPlayout.js","sourceRoot":"","sources":["../../src/testing/recordingPlayout.ts"],"names":[],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ai-realtime-client",
3
3
  "type": "module",
4
- "version": "6.2.0-edge.3",
4
+ "version": "6.2.0-edge.4",
5
5
  "description": "MemberJunction: Framework-agnostic browser client abstraction for provider-direct realtime (voice) sessions - BaseRealtimeClient + provider drivers",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./media": {
14
+ "types": "./dist/media/index.d.ts",
15
+ "default": "./dist/media/index.js"
16
+ },
17
+ "./testing": {
18
+ "types": "./dist/testing/index.d.ts",
19
+ "default": "./dist/testing/index.js"
20
+ }
21
+ },
22
+ "typesVersions": {
23
+ "*": {
24
+ "media": [
25
+ "dist/media/index.d.ts"
26
+ ],
27
+ "testing": [
28
+ "dist/testing/index.d.ts"
29
+ ]
30
+ }
31
+ },
8
32
  "files": [
9
33
  "/dist"
10
34
  ],
11
35
  "author": "MemberJunction.com",
12
36
  "license": "BUSL-1.1",
13
37
  "dependencies": {
14
- "@memberjunction/global": "6.2.0-edge.3",
15
- "@memberjunction/ai": "6.2.0-edge.3",
16
- "@google/genai": "^2.8.0"
38
+ "@memberjunction/global": "6.2.0-edge.4",
39
+ "@memberjunction/ai": "6.2.0-edge.4",
40
+ "@google/genai": "^2.8.0",
41
+ "rxjs": "^7.8.2"
17
42
  },
18
43
  "devDependencies": {
19
44
  "@types/node": "24.10.11",