@memberjunction/ai-bridge-teams 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.
@@ -0,0 +1,356 @@
1
+ /**
2
+ * @fileoverview `TeamsBridge` — the **Microsoft Teams** platform Realtime Bridge driver, connecting the
3
+ * one realtime agent engine to a **Teams meeting**. Implements the {@link BaseRealtimeBridge} contract
4
+ * against an injectable {@link ITeamsMeetingSdk} seam so it builds + unit-tests with NO network and NO
5
+ * real Teams / Azure Communication Services SDK (the Gemini `connectLiveSession` testability pattern).
6
+ * Structurally mirrors `ZoomBridge` (the reference driver) — only the platform names + join-coordinate
7
+ * parsing differ.
8
+ *
9
+ * Teams capability coverage (per the §8 seed row): on-demand + scheduled + invite + native-invite join,
10
+ * inbound routing, audio in/out (video/screen directional flags carried by transport), a diarized roster
11
+ * (`SpeakerDiarization`), participant mute + Teams meeting chat (via the Meeting Controls channel). Native
12
+ * raised-hand is ⚠️ partial over the calling-bot API — wired where the platform surfaces it, tolerant of
13
+ * it never firing. Telephony features (DTMF / transfer / recording) are NOT Teams-meeting features here,
14
+ * so those virtual base methods keep throwing `BridgeCapabilityNotSupportedError`.
15
+ *
16
+ * @module @memberjunction/ai-bridge-teams
17
+ * @author MemberJunction.com
18
+ */
19
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
20
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
21
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
22
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
23
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
24
+ };
25
+ import { RegisterClass } from '@memberjunction/global';
26
+ import { LogError } from '@memberjunction/core';
27
+ import { BaseRealtimeBridge, } from '@memberjunction/ai-bridge-base';
28
+ import { TeamsMeetingControlsEventSource } from './teams-meeting-controls.js';
29
+ /**
30
+ * The `DriverClass` key {@link TeamsBridge} registers under. A `MJ: AI Bridge Providers` row with
31
+ * `DriverClass = 'TeamsBridge'` resolves to this driver via the `ClassFactory`.
32
+ */
33
+ export const TEAMS_BRIDGE_DRIVER_CLASS = 'TeamsBridge';
34
+ /**
35
+ * Maps a Teams participant role to the bridge's {@link BridgeParticipantRole}. The bot (`IsSelf`) is
36
+ * surfaced as `'Agent'`; Teams organizers/presenters map to host/co-host.
37
+ */
38
+ function mapParticipantRole(role, isSelf) {
39
+ if (isSelf) {
40
+ return 'Agent';
41
+ }
42
+ switch (role) {
43
+ case 'Organizer':
44
+ return 'Host';
45
+ case 'Presenter':
46
+ return 'CoHost';
47
+ default:
48
+ return 'Participant';
49
+ }
50
+ }
51
+ /** Maps a Teams participant onto the bridge's {@link BridgeParticipantInfo}. */
52
+ function toBridgeParticipant(p) {
53
+ return {
54
+ ExternalId: p.ParticipantId,
55
+ DisplayName: p.DisplayName,
56
+ Role: mapParticipantRole(p.Role, p.IsSelf),
57
+ IsAgent: p.IsSelf === true,
58
+ };
59
+ }
60
+ /**
61
+ * Realtime Bridge driver for **Microsoft Teams meetings**.
62
+ *
63
+ * Construct the driver with the default constructor (the engine's `ClassFactory` path) — it lazily
64
+ * builds the Teams SDK from the {@link sdkFactory} at {@link Connect} time. Tests inject a `FakeTeamsSdk`
65
+ * by overriding the factory via {@link SetSdkFactory} (the creation seam) before connecting.
66
+ *
67
+ * Registered via `@RegisterClass(BaseRealtimeBridge, 'TeamsBridge')`.
68
+ */
69
+ let TeamsBridge = class TeamsBridge extends BaseRealtimeBridge {
70
+ constructor() {
71
+ super(...arguments);
72
+ /** The live Teams SDK seam for this session, created at {@link Connect}. */
73
+ this.sdk = null;
74
+ /** The bot's own participant id in the joined meeting (set at {@link Connect}). */
75
+ this.botParticipantId = null;
76
+ /** The Meeting Controls event source for this session (only when diarization is supported). */
77
+ this.meetingControls = null;
78
+ /**
79
+ * The SDK creation seam. Defaults to a factory that throws an explicit "bind the real Teams SDK"
80
+ * error, since this package ships WITHOUT the real SDK adapter (a deployment concern). Production
81
+ * sets a real factory via {@link SetSdkFactory}; tests inject a `FakeTeamsSdk`.
82
+ */
83
+ this.sdkFactory = () => {
84
+ throw new Error('TeamsBridge has no Microsoft Teams SDK bound. Call TeamsBridge.SetSdkFactory(...) with a factory ' +
85
+ 'that builds an ITeamsMeetingSdk over the real Azure Communication Services calling-bot / Microsoft Graph ' +
86
+ 'cloud-communications API, or inject a fake in tests.');
87
+ };
88
+ }
89
+ /**
90
+ * Sets the {@link TeamsMeetingSdkFactory} this driver uses to construct its SDK seam at connect —
91
+ * the creation seam (mirroring Gemini's overridable `connectLiveSession`). Production binds the
92
+ * real Teams ACS calling-bot adapter here; tests inject a `FakeTeamsSdk`.
93
+ *
94
+ * @param factory The factory that builds the {@link ITeamsMeetingSdk} for a session.
95
+ */
96
+ SetSdkFactory(factory) {
97
+ this.sdkFactory = factory;
98
+ }
99
+ // ── Abstract — every bridge MUST implement ───────────────────────────────────────
100
+ /**
101
+ * Joins the Teams meeting and brings the bot online. Captures the capability context, builds the SDK
102
+ * from the {@link sdkFactory}, wires the inbound raw-audio path and meeting-ended callback, joins,
103
+ * and (when the provider diarizes) constructs + seeds the Meeting Controls event source.
104
+ *
105
+ * @param ctx The bridge context (features, provider name, the join URL as `Address`, config).
106
+ * @returns The bot participant + call (external connection) identifiers, persisted by the engine.
107
+ */
108
+ async Connect(ctx) {
109
+ this.applyContext(ctx);
110
+ this.RequireFeature('AudioIn'); // a Teams meeting bridge requires bidirectional audio at minimum
111
+ this.RequireFeature('AudioOut');
112
+ this.sdk = this.sdkFactory(ctx.Configuration);
113
+ this.wireInboundAudio(this.sdk);
114
+ this.sdk.onMeetingEnded(() => this.handleMeetingEnded());
115
+ // Roster diarization is optional per provider; only stand up the Meeting Controls source when
116
+ // the platform advertises it (the engine also gates participant tracking on this flag).
117
+ if (this.features.SpeakerDiarization === true) {
118
+ this.meetingControls = new TeamsMeetingControlsEventSource(this.sdk);
119
+ }
120
+ // The driver owns the single SDK subscription set and fans out to BOTH its own roster handler
121
+ // and the Meeting Controls source (the SDK seam is latest-handler-wins, so there is one owner).
122
+ this.wireRoster(this.sdk);
123
+ const result = await this.sdk.join(this.buildJoinArgs(ctx));
124
+ this.botParticipantId = result.BotParticipantId;
125
+ // Seed the initial roster now that the bot has joined.
126
+ await this.refreshRoster(this.sdk);
127
+ return { BotParticipantId: result.BotParticipantId, ExternalConnectionId: result.CallId };
128
+ }
129
+ /**
130
+ * Leaves the Teams meeting and releases all SDK resources. Tolerant of teardown errors.
131
+ *
132
+ * @param _reason Why the disconnect happened (Teams teardown is uniform; the bot simply leaves).
133
+ */
134
+ async Disconnect(_reason) {
135
+ const sdk = this.sdk;
136
+ this.sdk = null;
137
+ this.botParticipantId = null;
138
+ this.meetingControls = null;
139
+ this.mediaHandler = undefined;
140
+ this.participantHandler = undefined;
141
+ if (sdk) {
142
+ try {
143
+ await sdk.leave();
144
+ }
145
+ catch (err) {
146
+ LogError(`[TeamsBridge] leave() failed: ${err instanceof Error ? err.message : String(err)}`);
147
+ }
148
+ }
149
+ }
150
+ /**
151
+ * Sends an outbound media frame into the meeting. Audio is fed to the SDK's outbound audio-socket
152
+ * path; video/screen frames are gated by the directional capability flags (the transport carries
153
+ * them, and the SDK send is a deployment-time binding TODO — today the models emit audio).
154
+ *
155
+ * @param track The outbound track the frame targets.
156
+ * @param frame The media frame to send.
157
+ */
158
+ SendMedia(track, frame) {
159
+ if (!this.sdk) {
160
+ return; // not connected — drop
161
+ }
162
+ switch (track) {
163
+ case 'audio-out': {
164
+ const pcm = this.framePcm(frame);
165
+ if (pcm) {
166
+ this.sdk.sendAudioFrame(pcm);
167
+ }
168
+ break;
169
+ }
170
+ case 'video-out':
171
+ case 'screen-out':
172
+ // Directional video/screen capability is declared; the SDK send binding lands with the
173
+ // first realtime model that emits these tracks (TODO at deployment). No-op for now.
174
+ break;
175
+ default:
176
+ // An inbound track was passed to SendMedia — ignore (defensive).
177
+ break;
178
+ }
179
+ }
180
+ /**
181
+ * Registers the inbound-media handler. The driver forwards each raw per-participant audio frame
182
+ * (with its speaker label) to this handler; the engine routes it to `IRealtimeSession.SendInput`.
183
+ *
184
+ * @param handler Invoked with each inbound media frame.
185
+ */
186
+ OnMedia(handler) {
187
+ this.mediaHandler = handler;
188
+ }
189
+ // ── Capability-gated virtuals Teams supports (gated by SupportedFeatures) ──────────
190
+ /**
191
+ * Returns the current Teams participant roster (gated by `SpeakerDiarization`). Re-asserts the flag
192
+ * (defense-in-depth) so even an engine-bypassing caller cannot pull a roster a disabled provider
193
+ * forbids.
194
+ *
195
+ * @returns The current participants.
196
+ * @throws {BridgeCapabilityNotSupportedError} when diarization is not enabled for the provider.
197
+ */
198
+ async GetParticipants() {
199
+ this.RequireFeature('SpeakerDiarization');
200
+ if (!this.sdk) {
201
+ return [];
202
+ }
203
+ const participants = await this.sdk.getParticipants();
204
+ return participants.map(toBridgeParticipant);
205
+ }
206
+ /**
207
+ * Registers a roster-change handler (gated by `SpeakerDiarization`). The driver fires it from the
208
+ * SDK's participant join/leave stream with the full current roster.
209
+ *
210
+ * @param handler Invoked with the updated participant list on each change.
211
+ * @throws {BridgeCapabilityNotSupportedError} when diarization is not enabled.
212
+ */
213
+ OnParticipantChange(handler) {
214
+ this.RequireFeature('SpeakerDiarization');
215
+ this.participantHandler = handler;
216
+ }
217
+ /**
218
+ * Returns the Teams Meeting Controls event source for this session (roster · hand-raise · speaking ·
219
+ * mute), or `null` when diarization is off (no roster to facilitate). The engine wires the Meeting
220
+ * Controls channel from this.
221
+ */
222
+ GetMeetingControlsEventSource() {
223
+ return this.meetingControls;
224
+ }
225
+ // ── Teams-native surfaces (used by the channel plane / facilitator) ──────────────
226
+ /**
227
+ * Posts a message to the Teams meeting chat. Exposed for the channel plane / turn-taking hybrid
228
+ * mode (the social-cost-free "raise hand"). Best-effort — a chat failure is logged, never fatal.
229
+ *
230
+ * @param text The chat message to post.
231
+ */
232
+ async PostChatMessage(text) {
233
+ if (!this.sdk) {
234
+ return;
235
+ }
236
+ try {
237
+ await this.sdk.postChatMessage(text);
238
+ }
239
+ catch (err) {
240
+ LogError(`[TeamsBridge] postChatMessage failed: ${err instanceof Error ? err.message : String(err)}`);
241
+ }
242
+ }
243
+ /** The bot's participant id in the joined meeting (or `null` before {@link Connect}). */
244
+ get BotParticipantId() {
245
+ return this.botParticipantId;
246
+ }
247
+ // ── internals ────────────────────────────────────────────────────────────────────
248
+ /** Wires the SDK's inbound raw-audio callback to a diarized inbound {@link BridgeMediaFrame}. */
249
+ wireInboundAudio(sdk) {
250
+ sdk.onAudioFrame((frame) => {
251
+ this.mediaHandler?.({
252
+ Track: 'audio-in',
253
+ Bytes: frame.Pcm,
254
+ SpeakerLabel: frame.ParticipantId,
255
+ TimestampMs: frame.TimestampMs ?? Date.now(),
256
+ });
257
+ });
258
+ }
259
+ /**
260
+ * Wires the SDK's participant join/leave + hand-raise streams ONCE (the driver is the single owner;
261
+ * the SDK seam is latest-handler-wins). Each roster change fans out to both the driver's own
262
+ * roster-change handler and the Meeting Controls source; hand-raise signals (⚠️ partial on Teams)
263
+ * feed the source.
264
+ */
265
+ wireRoster(sdk) {
266
+ sdk.onParticipantJoin(() => void this.refreshRoster(sdk));
267
+ sdk.onParticipantLeave(() => void this.refreshRoster(sdk));
268
+ sdk.onHandRaise((id, raised) => this.meetingControls?.IngestHandRaise(id, raised));
269
+ }
270
+ /** Pulls the current roster from the SDK and fans it out to both the participant handler + Meeting Controls. */
271
+ async refreshRoster(sdk) {
272
+ try {
273
+ const participants = await sdk.getParticipants();
274
+ this.participantHandler?.(participants.map(toBridgeParticipant));
275
+ this.meetingControls?.IngestRoster(participants);
276
+ }
277
+ catch (err) {
278
+ LogError(`[TeamsBridge] roster refresh failed: ${err instanceof Error ? err.message : String(err)}`);
279
+ }
280
+ }
281
+ /** Handles the SDK's meeting-ended signal: surface an empty roster so the engine sees everyone gone. */
282
+ handleMeetingEnded() {
283
+ this.participantHandler?.([]);
284
+ this.meetingControls?.IngestRoster([]);
285
+ }
286
+ /** Builds the SDK join args from the bridge context (Address is the meeting join URL). */
287
+ buildJoinArgs(ctx) {
288
+ const config = ctx.Configuration ?? {};
289
+ return {
290
+ JoinUrl: ctx.Address,
291
+ ThreadId: typeof config.ThreadId === 'string' ? config.ThreadId : this.parseThreadId(ctx.Address),
292
+ BotDisplayName: typeof config.BotDisplayName === 'string' ? config.BotDisplayName : `${ctx.ProviderName} Agent`,
293
+ AccessToken: typeof config.AccessToken === 'string' ? config.AccessToken : undefined,
294
+ TenantId: typeof config.TenantId === 'string' ? config.TenantId : undefined,
295
+ };
296
+ }
297
+ /**
298
+ * Extracts the meeting thread id from a Teams `meetup-join` URL when present, else `undefined`. The
299
+ * thread id is the `19:meeting_...@thread.v2` segment embedded (URL-encoded) in the join link.
300
+ * Tolerant — a non-matching address yields `undefined` so the SDK can resolve coordinates itself.
301
+ */
302
+ parseThreadId(address) {
303
+ if (!address) {
304
+ return undefined;
305
+ }
306
+ const decoded = (() => {
307
+ try {
308
+ return decodeURIComponent(address);
309
+ }
310
+ catch {
311
+ return address;
312
+ }
313
+ })();
314
+ const match = decoded.match(/(19:meeting_[^/@]+@thread\.v2)/i);
315
+ return match ? match[1] : undefined;
316
+ }
317
+ /** Returns the PCM bytes of an outbound audio frame, preferring the binary payload. */
318
+ framePcm(frame) {
319
+ if (frame.Bytes) {
320
+ return frame.Bytes;
321
+ }
322
+ if (frame.Base64) {
323
+ return this.decodeBase64(frame.Base64);
324
+ }
325
+ return undefined;
326
+ }
327
+ /** Decodes a base64 payload to an `ArrayBuffer` (Node `Buffer` fast path, `atob` fallback). */
328
+ decodeBase64(base64) {
329
+ if (typeof Buffer !== 'undefined') {
330
+ const buf = Buffer.from(base64, 'base64');
331
+ // Copy into a fresh ArrayBuffer (Buffer.buffer is ArrayBufferLike under newer @types/node).
332
+ const out = new Uint8Array(buf.byteLength);
333
+ out.set(buf);
334
+ return out.buffer;
335
+ }
336
+ const binary = atob(base64);
337
+ const bytes = new Uint8Array(binary.length);
338
+ for (let i = 0; i < binary.length; i++) {
339
+ bytes[i] = binary.charCodeAt(i);
340
+ }
341
+ return bytes.buffer;
342
+ }
343
+ };
344
+ TeamsBridge = __decorate([
345
+ RegisterClass(BaseRealtimeBridge, TEAMS_BRIDGE_DRIVER_CLASS)
346
+ ], TeamsBridge);
347
+ export { TeamsBridge };
348
+ /**
349
+ * Tree-shaking-prevention loader. Modern bundlers cannot see the `@RegisterClass` dynamic registration
350
+ * of {@link TeamsBridge} and may eliminate it. Import and call this no-op from a static code path
351
+ * (the package entry point does) so the `ClassFactory` can resolve `'TeamsBridge'`.
352
+ */
353
+ export function LoadTeamsBridge() {
354
+ // Intentionally empty — referencing the module is what prevents tree-shaking.
355
+ }
356
+ //# sourceMappingURL=teams-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teams-bridge.js","sourceRoot":"","sources":["../src/teams-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACH,kBAAkB,GASrB,MAAM,gCAAgC,CAAC;AASxC,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,aAAa,CAAC;AAEvD;;;GAGG;AACH,SAAS,kBAAkB,CAAC,IAA0B,EAAE,MAA2B;IAC/E,IAAI,MAAM,EAAE,CAAC;QACT,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,WAAW;YACZ,OAAO,MAAM,CAAC;QAClB,KAAK,WAAW;YACZ,OAAO,QAAQ,CAAC;QACpB;YACI,OAAO,a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,CAAC,UAAU,CAAC,CAAC;YAC3C,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACb,OAAO,GAAG,CAAC,MAAM,CAAC;QACtB,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,KAAK,CAAC,MAAM,CAAC;IACxB,CAAC;CACJ,CAAA;AAjTY,WAAW;IADvB,aAAa,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;GAChD,WAAW,CAiTvB;;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC3B,8EAA8E;AAClF,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Adapts the {@link ITeamsMeetingSdk} participant / hand-raise / speaking stream into an
3
+ * {@link IBridgeMeetingControlsEventSource} so the bridge engine can wire the **Meeting Controls**
4
+ * facilitator channel (roster · hand-raise queue · who's-speaking · mute) for a Teams session. This is
5
+ * the §4b "the bridge contributes a channel" pattern realized for Teams — no channel logic lives here,
6
+ * only the platform→channel signal mapping.
7
+ */
8
+ import { IBridgeMeetingControlsEventSource, BridgeMeetingParticipant, BridgeMeetingControlsCapability } from '@memberjunction/ai-bridge-base';
9
+ import { ITeamsMeetingSdk, TeamsParticipant } from './teams-sdk.js';
10
+ /** Maps one Teams participant onto the channel's {@link BridgeMeetingParticipant} shape. */
11
+ export declare function toMeetingParticipant(p: TeamsParticipant): BridgeMeetingParticipant;
12
+ /**
13
+ * Teams's adapter to the Meeting Controls channel's event source. It maintains a live roster and
14
+ * mirrors native hand-raise + diarized speaking signals, and actuates mute through the SDK.
15
+ *
16
+ * **The driver owns the SDK subscriptions** (the SDK seam is "latest handler wins", so it can have
17
+ * only one subscriber per event) and **feeds this source imperatively** via {@link IngestRoster} /
18
+ * {@link IngestHandRaise} / {@link IngestSpeaking}. This source only needs the SDK for the one *action*
19
+ * it actuates — {@link MuteParticipant}. The Meeting Controls channel subscribes the three `On*`
20
+ * streams in turn.
21
+ *
22
+ * The driver constructs ONE of these per session (only when the provider has `SpeakerDiarization`, i.e.
23
+ * there is a roster to facilitate) and returns it from `TeamsBridge.GetMeetingControlsEventSource`.
24
+ */
25
+ export declare class TeamsMeetingControlsEventSource implements IBridgeMeetingControlsEventSource {
26
+ private readonly sdk;
27
+ /** Live roster keyed by participant id (lowercased), kept current by the driver's {@link IngestRoster}. */
28
+ private readonly roster;
29
+ private rosterHandler?;
30
+ private speakingHandler?;
31
+ private handRaiseHandler?;
32
+ /** Teams supports organizer/presenter-driven mute, so the facilitator `MuteParticipant` tool is offered. */
33
+ readonly Capabilities: ReadonlyArray<BridgeMeetingControlsCapability>;
34
+ /**
35
+ * @param sdk The Teams SDK seam used only to actuate {@link MuteParticipant} — all *perception* is
36
+ * fed in by the driver via the `Ingest*` methods so the SDK keeps a single subscriber per event.
37
+ */
38
+ constructor(sdk: ITeamsMeetingSdk);
39
+ /**
40
+ * Replaces the roster with a fresh snapshot from the driver and emits it to the channel. Called by
41
+ * the driver after the initial join and on every participant join/leave.
42
+ *
43
+ * @param participants The full current Teams roster.
44
+ */
45
+ IngestRoster(participants: TeamsParticipant[]): void;
46
+ /**
47
+ * Forwards a native hand-raise/lower signal from the driver to the channel.
48
+ *
49
+ * ⚠️ Teams raised-hand is partial; this may never fire on tenants/builds that don't surface the
50
+ * event over the calling-bot API. The channel degrades gracefully (its software hand-raise still works).
51
+ *
52
+ * @param participantId The participant whose hand changed.
53
+ * @param raised Whether the hand is now raised.
54
+ */
55
+ IngestHandRaise(participantId: string, raised: boolean): void;
56
+ /**
57
+ * Forwards a diarized speaking-set change from the driver to the channel.
58
+ *
59
+ * @param participantIds The ids currently speaking.
60
+ */
61
+ IngestSpeaking(participantIds: string[]): void;
62
+ /**
63
+ * Convenience alias for {@link IngestSpeaking}, kept because "notify" reads naturally at the
64
+ * driver's inbound-audio call site.
65
+ *
66
+ * @param participantIds The ids currently speaking.
67
+ */
68
+ NotifySpeaking(participantIds: string[]): void;
69
+ /** @inheritdoc */
70
+ OnRosterChange(handler: (participants: BridgeMeetingParticipant[]) => void): void;
71
+ /** @inheritdoc */
72
+ OnSpeakingChange(handler: (participantIds: string[]) => void): void;
73
+ /** @inheritdoc */
74
+ OnHandRaiseChange(handler: (participantId: string, raised: boolean) => void): void;
75
+ /** @inheritdoc */
76
+ MuteParticipant(participantId: string): Promise<void>;
77
+ private emitRoster;
78
+ private key;
79
+ }
80
+ //# sourceMappingURL=teams-meeting-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teams-meeting-controls.d.ts","sourceRoot":"","sources":["../src/teams-meeting-controls.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACH,iCAAiC,EACjC,wBAAwB,EACxB,+BAA+B,EAElC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAwB,MAAM,aAAa,CAAC;AAqBvF,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,gBAAgB,GAAG,wBAAwB,CAOlF;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,+BAAgC,YAAW,iCAAiC;IAezE,OAAO,CAAC,QAAQ,CAAC,GAAG;IAdhC,2GAA2G;IAC3G,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IAEtE,OAAO,CAAC,aAAa,CAAC,CAAqD;IAC3E,OAAO,CAAC,eAAe,CAAC,CAAqC;IAC7D,OAAO,CAAC,gBAAgB,CAAC,CAAmD;IAE5E,4GAA4G;IAC5G,SAAgB,YAAY,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAY;IAExF;;;OAGG;gBAC0B,GAAG,EAAE,gBAAgB;IAIlD;;;;;OAKG;IACI,YAAY,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAQ3D;;;;;;;;OAQG;IACI,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAIpE;;;;OAIG;IACI,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrD;;;;;OAKG;IACI,cAAc,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI;IAMrD,kBAAkB;IACX,cAAc,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,wBAAwB,EAAE,KAAK,IAAI,GAAG,IAAI;IAMxF,kBAAkB;IACX,gBAAgB,CAAC,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,IAAI;IAI1E,kBAAkB;IACX,iBAAiB,CAAC,OAAO,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAIzF,kBAAkB;IACL,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlE,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,GAAG;CAGd"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Adapts the {@link ITeamsMeetingSdk} participant / hand-raise / speaking stream into an
3
+ * {@link IBridgeMeetingControlsEventSource} so the bridge engine can wire the **Meeting Controls**
4
+ * facilitator channel (roster · hand-raise queue · who's-speaking · mute) for a Teams session. This is
5
+ * the §4b "the bridge contributes a channel" pattern realized for Teams — no channel logic lives here,
6
+ * only the platform→channel signal mapping.
7
+ */
8
+ /**
9
+ * Maps a Teams participant role to the bridge's meeting-participant role. Teams has no distinct "Agent"
10
+ * role; the bot is flagged via `IsSelf` and surfaced as `'Agent'`. Teams organizers/presenters map to
11
+ * the bridge's host/co-host roles (the closest facilitator-authority equivalents).
12
+ */
13
+ function mapRole(role, isSelf) {
14
+ if (isSelf) {
15
+ return 'Agent';
16
+ }
17
+ switch (role) {
18
+ case 'Organizer':
19
+ return 'Host';
20
+ case 'Presenter':
21
+ return 'CoHost';
22
+ default:
23
+ return 'Participant';
24
+ }
25
+ }
26
+ /** Maps one Teams participant onto the channel's {@link BridgeMeetingParticipant} shape. */
27
+ export function toMeetingParticipant(p) {
28
+ return {
29
+ ParticipantId: p.ParticipantId,
30
+ DisplayName: p.DisplayName,
31
+ Role: mapRole(p.Role, p.IsSelf),
32
+ IsAgent: p.IsSelf === true,
33
+ };
34
+ }
35
+ /**
36
+ * Teams's adapter to the Meeting Controls channel's event source. It maintains a live roster and
37
+ * mirrors native hand-raise + diarized speaking signals, and actuates mute through the SDK.
38
+ *
39
+ * **The driver owns the SDK subscriptions** (the SDK seam is "latest handler wins", so it can have
40
+ * only one subscriber per event) and **feeds this source imperatively** via {@link IngestRoster} /
41
+ * {@link IngestHandRaise} / {@link IngestSpeaking}. This source only needs the SDK for the one *action*
42
+ * it actuates — {@link MuteParticipant}. The Meeting Controls channel subscribes the three `On*`
43
+ * streams in turn.
44
+ *
45
+ * The driver constructs ONE of these per session (only when the provider has `SpeakerDiarization`, i.e.
46
+ * there is a roster to facilitate) and returns it from `TeamsBridge.GetMeetingControlsEventSource`.
47
+ */
48
+ export class TeamsMeetingControlsEventSource {
49
+ /**
50
+ * @param sdk The Teams SDK seam used only to actuate {@link MuteParticipant} — all *perception* is
51
+ * fed in by the driver via the `Ingest*` methods so the SDK keeps a single subscriber per event.
52
+ */
53
+ constructor(sdk) {
54
+ this.sdk = sdk;
55
+ /** Live roster keyed by participant id (lowercased), kept current by the driver's {@link IngestRoster}. */
56
+ this.roster = new Map();
57
+ /** Teams supports organizer/presenter-driven mute, so the facilitator `MuteParticipant` tool is offered. */
58
+ this.Capabilities = ['Mute'];
59
+ }
60
+ // ── Driver-fed perception (the driver owns the SDK subscriptions) ─────────────────
61
+ /**
62
+ * Replaces the roster with a fresh snapshot from the driver and emits it to the channel. Called by
63
+ * the driver after the initial join and on every participant join/leave.
64
+ *
65
+ * @param participants The full current Teams roster.
66
+ */
67
+ IngestRoster(participants) {
68
+ this.roster.clear();
69
+ for (const p of participants) {
70
+ this.roster.set(this.key(p.ParticipantId), toMeetingParticipant(p));
71
+ }
72
+ this.emitRoster();
73
+ }
74
+ /**
75
+ * Forwards a native hand-raise/lower signal from the driver to the channel.
76
+ *
77
+ * ⚠️ Teams raised-hand is partial; this may never fire on tenants/builds that don't surface the
78
+ * event over the calling-bot API. The channel degrades gracefully (its software hand-raise still works).
79
+ *
80
+ * @param participantId The participant whose hand changed.
81
+ * @param raised Whether the hand is now raised.
82
+ */
83
+ IngestHandRaise(participantId, raised) {
84
+ this.handRaiseHandler?.(participantId, raised);
85
+ }
86
+ /**
87
+ * Forwards a diarized speaking-set change from the driver to the channel.
88
+ *
89
+ * @param participantIds The ids currently speaking.
90
+ */
91
+ IngestSpeaking(participantIds) {
92
+ this.speakingHandler?.(participantIds);
93
+ }
94
+ /**
95
+ * Convenience alias for {@link IngestSpeaking}, kept because "notify" reads naturally at the
96
+ * driver's inbound-audio call site.
97
+ *
98
+ * @param participantIds The ids currently speaking.
99
+ */
100
+ NotifySpeaking(participantIds) {
101
+ this.IngestSpeaking(participantIds);
102
+ }
103
+ // ── IBridgeMeetingControlsEventSource ────────────────────────────────────────────
104
+ /** @inheritdoc */
105
+ OnRosterChange(handler) {
106
+ this.rosterHandler = handler;
107
+ // Emit the current roster immediately so a late subscriber is not blank.
108
+ this.emitRoster();
109
+ }
110
+ /** @inheritdoc */
111
+ OnSpeakingChange(handler) {
112
+ this.speakingHandler = handler;
113
+ }
114
+ /** @inheritdoc */
115
+ OnHandRaiseChange(handler) {
116
+ this.handRaiseHandler = handler;
117
+ }
118
+ /** @inheritdoc */
119
+ async MuteParticipant(participantId) {
120
+ await this.sdk.muteParticipant(participantId);
121
+ }
122
+ // ── internals ────────────────────────────────────────────────────────────────────
123
+ emitRoster() {
124
+ this.rosterHandler?.(Array.from(this.roster.values()));
125
+ }
126
+ key(participantId) {
127
+ return participantId.trim().toLowerCase();
128
+ }
129
+ }
130
+ //# sourceMappingURL=teams-meeting-controls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teams-meeting-controls.js","sourceRoot":"","sources":["../src/teams-meeting-controls.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH;;;;GAIG;AACH,SAAS,OAAO,CAAC,IAA0B,EAAE,MAA2B;IACpE,IAAI,MAAM,EAAE,CAAC;QACT,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,WAAW;YACZ,OAAO,MAAM,CAAC;QAClB,KAAK,WAAW;YACZ,OAAO,QAAQ,CAAC;QACpB;YACI,OAAO,aAAa,CAAC;IAC7B,CAAC;AACL,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,oBAAoB,CAAC,CAAmB;IACpD,OAAO;QACH,aAAa,EAAE,CAAC,CAAC,aAAa;QAC9B,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,KAAK,IAAI;KAC7B,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,+BAA+B;IAWxC;;;OAGG;IACH,YAA6B,GAAqB;QAArB,QAAG,GAAH,GAAG,CAAkB;QAdlD,2GAA2G;QAC1F,WAAM,GAAG,IAAI,GAAG,EAAoC,CAAC;QAMtE,4GAA4G;QAC5F,iBAAY,GAAmD,CAAC,MAAM,CAAC,CAAC;IAMnC,CAAC;IAEtD,qFAAqF;IAErF;;;;;OAKG;IACI,YAAY,CAAC,YAAgC;QAChD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,MAAM,CA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