@memberjunction/livekit-room-server 6.2.0-edge.3 → 6.2.0-edge.5
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/livekit-agent-room-coordinator.d.ts +120 -10
- package/dist/livekit-agent-room-coordinator.d.ts.map +1 -1
- package/dist/livekit-agent-room-coordinator.js +312 -68
- package/dist/livekit-agent-room-coordinator.js.map +1 -1
- package/dist/livekit-native-module.d.ts.map +1 -1
- package/dist/livekit-native-module.js +7 -0
- package/dist/livekit-native-module.js.map +1 -1
- package/dist/livekit-participant-service.d.ts +47 -0
- package/dist/livekit-participant-service.d.ts.map +1 -0
- package/dist/livekit-participant-service.js +64 -0
- package/dist/livekit-participant-service.js.map +1 -0
- package/dist/livekit-token-service.d.ts +20 -5
- package/dist/livekit-token-service.d.ts.map +1 -1
- package/dist/livekit-token-service.js +14 -7
- package/dist/livekit-token-service.js.map +1 -1
- package/dist/meeting-dial-in-service.d.ts +32 -1
- package/dist/meeting-dial-in-service.d.ts.map +1 -1
- package/dist/meeting-dial-in-service.js +83 -11
- package/dist/meeting-dial-in-service.js.map +1 -1
- package/dist/room-handoff/handoff-offer-registry.d.ts +10 -0
- package/dist/room-handoff/handoff-offer-registry.d.ts.map +1 -1
- package/dist/room-handoff/handoff-offer-registry.js +40 -13
- package/dist/room-handoff/handoff-offer-registry.js.map +1 -1
- package/dist/room-handoff/handoff-types.d.ts +11 -9
- package/dist/room-handoff/handoff-types.d.ts.map +1 -1
- package/dist/room-handoff/room-handoff-engine.d.ts +9 -1
- package/dist/room-handoff/room-handoff-engine.d.ts.map +1 -1
- package/dist/room-handoff/room-handoff-engine.js +40 -7
- package/dist/room-handoff/room-handoff-engine.js.map +1 -1
- package/package.json +13 -12
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview {@link LiveKitAgentRoomCoordinator} — the server-side **session-start harness** for the
|
|
3
3
|
* MJ-native LiveKit room (§1 of the realtime-bridge buildout plan). Given an agent + a room, it:
|
|
4
|
-
* 1.
|
|
5
|
-
* 2.
|
|
4
|
+
* 1. opens the realtime model session via an injectable {@link RealtimeSessionFactory} seam,
|
|
5
|
+
* 2. mints the agent bot's scoped LiveKit token ({@link LiveKitTokenService}), whose attributes depend on the session, and
|
|
6
6
|
* 3. bridges that session into the room through {@link AIBridgeEngine.StartBridgeSession} (which wires
|
|
7
7
|
* the transport seam + turn-taking automatically).
|
|
8
|
+
* A start that fails after step 1 closes the model session before the error propagates, recording the failure on the
|
|
9
|
+
* agent's co-agent run first ({@link FailedStartRecorder}).
|
|
8
10
|
*
|
|
9
11
|
* The realtime-session factory is a seam (mirroring `LiveKitBridge.SetSdkFactory`): production binds it to
|
|
10
12
|
* the real model-resolution path (`@memberjunction/ai-agents`), and tests/de-risk inject a stub session.
|
|
@@ -12,14 +14,38 @@
|
|
|
12
14
|
*
|
|
13
15
|
* @module @memberjunction/livekit-room-server
|
|
14
16
|
*/
|
|
15
|
-
import { BaseSingleton } from '@memberjunction/global';
|
|
17
|
+
import { BaseSingleton, NormalizeUUID, UUIDsEqual } from '@memberjunction/global';
|
|
16
18
|
import { LogError, LogStatus } from '@memberjunction/core';
|
|
19
|
+
import { AgentAvatarAttributes, AgentParticipantIdentity, AgentWatchesAttributes, InboundVideoStreamsOf, ResolveIsModelFullDuplex, } from '@memberjunction/ai';
|
|
20
|
+
import { DefaultNativeLoader } from '@memberjunction/ai-bridge-livekit';
|
|
21
|
+
import { AIEngine } from '@memberjunction/aiengine';
|
|
17
22
|
import { AlwaysAddressedMatcher, RegexAddressedMatcher, TURN_TAKING_TOOL_DEFINITIONS, } from '@memberjunction/ai-bridge-base';
|
|
18
23
|
import { AIBridgeEngine, } from '@memberjunction/ai-bridge-server';
|
|
19
24
|
import { LiveKitTokenService } from './livekit-token-service.js';
|
|
20
25
|
import { ResolveLiveKitNativeModuleSpecifier } from './livekit-native-module.js';
|
|
26
|
+
/**
|
|
27
|
+
* Static capability map for known realtime drivers when resolving full-duplex capability before session connect.
|
|
28
|
+
* Avoids class-name substring heuristics.
|
|
29
|
+
*/
|
|
30
|
+
const DRIVER_STATIC_CAPABILITIES = {
|
|
31
|
+
OpenAILiveRealtime: { FullDuplex: true },
|
|
32
|
+
};
|
|
33
|
+
function GetDriverStaticCapabilities(driverClass) {
|
|
34
|
+
if (!driverClass) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const key = driverClass.trim().toLowerCase();
|
|
38
|
+
for (const [cls, caps] of Object.entries(DRIVER_STATIC_CAPABILITIES)) {
|
|
39
|
+
if (cls.toLowerCase() === key) {
|
|
40
|
+
return caps;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
21
45
|
/** The `DriverClass` the LiveKit bridge registers under (must match the `MJ: AI Bridge Providers` row). */
|
|
22
46
|
export const LIVEKIT_BRIDGE_DRIVER_CLASS = 'LiveKitBridge';
|
|
47
|
+
/** The answer for a phone call: the module is not asked. */
|
|
48
|
+
const PHONE_CALL_AVATAR_VIDEO = { Supported: false, Reason: 'phone' };
|
|
23
49
|
/**
|
|
24
50
|
* Coordinates starting (and stopping) an agent's presence in a LiveKit room. A process-wide singleton
|
|
25
51
|
* (per MJ convention) so deployment code can bind the realtime-session factory once at startup and the
|
|
@@ -69,6 +95,24 @@ export class LiveKitAgentRoomCoordinator extends BaseSingleton {
|
|
|
69
95
|
SetTurnToolBinder(binder) {
|
|
70
96
|
this.turnToolBinder = binder;
|
|
71
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Binds the seam that says whether the agent behind a model session watches meetings. Without it no agent watches:
|
|
100
|
+
* the bot reads nobody's camera or screen and the room never offers people the choice.
|
|
101
|
+
*
|
|
102
|
+
* @param resolver The resolver, or `undefined` to clear it.
|
|
103
|
+
*/
|
|
104
|
+
SetAgentVisionResolver(resolver) {
|
|
105
|
+
this.agentVisionResolver = resolver;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Binds the seam that records a failed start on the agent's co-agent run. Without it, the run of an agent whose start
|
|
109
|
+
* failed reads as completed: closing its model session finalizes the run that way.
|
|
110
|
+
*
|
|
111
|
+
* @param recorder The recorder, or `undefined` to clear it.
|
|
112
|
+
*/
|
|
113
|
+
SetFailedStartRecorder(recorder) {
|
|
114
|
+
this.failedStartRecorder = recorder;
|
|
115
|
+
}
|
|
72
116
|
/**
|
|
73
117
|
* Overrides where a room's turn-taking snapshot comes from (an injectable seam for unit testing; production
|
|
74
118
|
* reads the process-wide {@link AIBridgeEngine}).
|
|
@@ -106,12 +150,18 @@ export class LiveKitAgentRoomCoordinator extends BaseSingleton {
|
|
|
106
150
|
this.bridgeOps = ops;
|
|
107
151
|
}
|
|
108
152
|
/**
|
|
109
|
-
* Starts the agent's presence in a LiveKit room:
|
|
110
|
-
* bridges
|
|
153
|
+
* Starts the agent's presence in a LiveKit room: opens the realtime session, mints the bot token, and
|
|
154
|
+
* bridges the session into the room.
|
|
155
|
+
*
|
|
156
|
+
* A start that fails once the model session is open (the bot token can't be minted, the bridge doesn't start) closes
|
|
157
|
+
* that session before the error propagates, after recording the failure, with the start's error, on the session's
|
|
158
|
+
* co-agent run ({@link SetFailedStartRecorder}), which would otherwise read as completed. The agent session it runs under
|
|
159
|
+
* (`AgentSessionID`) is the caller's: a caller that created one for this start closes it.
|
|
111
160
|
*
|
|
112
161
|
* @param params The session parameters.
|
|
113
162
|
* @returns The active session handles.
|
|
114
|
-
* @throws {Error} when the LiveKit provider is not configured/registered
|
|
163
|
+
* @throws {Error} when the LiveKit provider is not configured/registered, the session factory is unbound or fails,
|
|
164
|
+
* the bot token can't be minted, or the bridge doesn't start.
|
|
115
165
|
*/
|
|
116
166
|
async StartAgentRoomSession(params) {
|
|
117
167
|
await this.bridgeOps.Config(false, params.ContextUser, params.MetadataProvider);
|
|
@@ -121,8 +171,11 @@ export class LiveKitAgentRoomCoordinator extends BaseSingleton {
|
|
|
121
171
|
'Seed/activate the LiveKit provider row before starting a room session.');
|
|
122
172
|
}
|
|
123
173
|
const botName = params.AgentName ?? 'Agent';
|
|
124
|
-
|
|
125
|
-
const
|
|
174
|
+
// `agent-<agent session id>`: the identity the bridge, the engine and other agents' bots read as an agent's.
|
|
175
|
+
const botIdentity = AgentParticipantIdentity(params.AgentSessionID);
|
|
176
|
+
// Fail before opening a model session when LiveKit isn't configured. The bot's token itself is minted once the
|
|
177
|
+
// session is open, because whether the bot watches depends on the session (see agentWatches).
|
|
178
|
+
this.tokenService.AssertConfigured();
|
|
126
179
|
// Multi-agent MEETING detection: if the room already holds an agent, THIS agent joins as a meeting
|
|
127
180
|
// participant — auto-response OFF, speaks only when addressed by name. When a room becomes multi-agent
|
|
128
181
|
// the agents ALREADY in it are retroactively re-gated too (capability-permitting — see below). The names
|
|
@@ -137,17 +190,30 @@ export class LiveKitAgentRoomCoordinator extends BaseSingleton {
|
|
|
137
190
|
// (gated meeting mode + LLM router) for controlled scenarios (webinars, large rooms, weaker models).
|
|
138
191
|
const moderatorMode = process.env.MJ_REALTIME_MODERATOR_MODE === 'on';
|
|
139
192
|
const isMeeting = moderatorMode && existingAgents.length > 0;
|
|
140
|
-
// A full-duplex model judges for itself whether it was addressed and uses the turn-taking tools; a gated
|
|
141
|
-
// meeting (moderator mode) decides addressing by name in the engine, so the tools would only confuse it.
|
|
142
193
|
const addressing = isMeeting ? 'Regex' : params.TurnAddressing ?? 'Auto';
|
|
194
|
+
let resolvedFullDuplex = params.FullDuplex;
|
|
195
|
+
if (resolvedFullDuplex === undefined && params.RealtimeModelID) {
|
|
196
|
+
resolvedFullDuplex = this.resolveIsModelFullDuplexFromId(params.RealtimeModelID);
|
|
197
|
+
}
|
|
143
198
|
const host = params.Host;
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
199
|
+
const buildToolsForFullDuplex = (isFd) => {
|
|
200
|
+
const turnTakingTools = isFd || addressing === 'Regex' ? [] : [...TURN_TAKING_TOOL_DEFINITIONS];
|
|
201
|
+
return (host?.HostTools?.length ?? 0) > 0 || turnTakingTools.length > 0
|
|
202
|
+
? [...(host?.HostTools ?? []), ...turnTakingTools]
|
|
203
|
+
: undefined;
|
|
204
|
+
};
|
|
205
|
+
// Whether this host's bot can publish the agent's avatar is asked BEFORE the model session opens, so a host that
|
|
206
|
+
// can't never asks the model for it (and is never billed for video nobody sees). Cleared if the avatar is taken down.
|
|
207
|
+
// A phone call is never asked about: the caller sees no video, so the session asks for no avatar at all.
|
|
208
|
+
const phoneCall = host?.Channel === 'phone';
|
|
209
|
+
const avatarVideo = phoneCall ? PHONE_CALL_AVATAR_VIDEO : await this.DescribeAvatarVideo();
|
|
210
|
+
let avatarDelivery = avatarVideo.Supported === true ? 'room' : undefined;
|
|
148
211
|
let activeTurnHandler = undefined;
|
|
149
212
|
const openModelSession = async (priorTranscript) => {
|
|
213
|
+
const initialTools = buildToolsForFullDuplex(resolvedFullDuplex ?? false);
|
|
150
214
|
const opened = await this.sessionFactory({
|
|
215
|
+
AvatarDelivery: avatarDelivery,
|
|
216
|
+
PhoneCall: phoneCall || undefined,
|
|
151
217
|
AgentID: params.AgentID,
|
|
152
218
|
AgentName: params.AgentName,
|
|
153
219
|
TargetAgentID: params.TargetAgentID,
|
|
@@ -160,72 +226,149 @@ export class LiveKitAgentRoomCoordinator extends BaseSingleton {
|
|
|
160
226
|
AgentSessionID: params.AgentSessionID,
|
|
161
227
|
MeetingMode: isMeeting || undefined,
|
|
162
228
|
SelfNames: isMeeting ? selfNames : undefined,
|
|
163
|
-
HostTools:
|
|
229
|
+
HostTools: initialTools,
|
|
164
230
|
HostFraming: host?.HostFraming,
|
|
165
231
|
ConversationID: host?.ConversationID,
|
|
166
232
|
PriorTranscript: priorTranscript,
|
|
233
|
+
ResolveHostTools: (resolved) => {
|
|
234
|
+
if (resolvedFullDuplex === undefined) {
|
|
235
|
+
if (resolved.ModelID) {
|
|
236
|
+
const effective = AIEngine.Instance.GetEffectiveModelConfiguration(resolved.ModelID, resolved.ModelVendorID);
|
|
237
|
+
const model = (AIEngine.Instance.Models ?? []).find(m => UUIDsEqual(m.ID, resolved.ModelID));
|
|
238
|
+
const staticCaps = GetDriverStaticCapabilities(resolved.DriverClass);
|
|
239
|
+
resolvedFullDuplex = ResolveIsModelFullDuplex(effective ?? model?.ModelConfigurationObject, staticCaps);
|
|
240
|
+
}
|
|
241
|
+
else if (resolved.DriverClass) {
|
|
242
|
+
const staticCaps = GetDriverStaticCapabilities(resolved.DriverClass);
|
|
243
|
+
resolvedFullDuplex = staticCaps?.FullDuplex === true;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return buildToolsForFullDuplex(resolvedFullDuplex ?? false);
|
|
247
|
+
},
|
|
167
248
|
});
|
|
249
|
+
const declaredTurnToolsInitially = !resolvedFullDuplex && addressing !== 'Regex';
|
|
250
|
+
if (resolvedFullDuplex === undefined) {
|
|
251
|
+
resolvedFullDuplex = opened.Capabilities?.FullDuplex === true;
|
|
252
|
+
}
|
|
253
|
+
else if (opened.Capabilities?.FullDuplex !== undefined && opened.Capabilities.FullDuplex !== resolvedFullDuplex) {
|
|
254
|
+
LogStatus(`[LiveKitAgentRoomCoordinator] WARNING: Session factory opened with Capabilities.FullDuplex=${opened.Capabilities.FullDuplex}, ` +
|
|
255
|
+
`which disagrees with pre-open resolved FullDuplex=${resolvedFullDuplex}. Initial tools may mismatch.`);
|
|
256
|
+
}
|
|
257
|
+
// If full duplex is active, but turn-taking tools were declared to the session initially
|
|
258
|
+
// (e.g. because full-duplex was only discovered after open, or custom factory ignored ResolveHostTools):
|
|
259
|
+
if (resolvedFullDuplex && declaredTurnToolsInitially) {
|
|
260
|
+
const desiredTools = buildToolsForFullDuplex(true);
|
|
261
|
+
try {
|
|
262
|
+
await opened.RegisterTools(desiredTools ?? []);
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
LogError(`[LiveKitAgentRoomCoordinator] Failed to reconfigure tools after discovering FullDuplex: ${err instanceof Error ? err.message : String(err)}`);
|
|
266
|
+
}
|
|
267
|
+
// Explicitly bind a no-op handler so any in-flight or model-cached turn-taking tool calls return a clear "not available" result
|
|
268
|
+
if (this.turnToolBinder) {
|
|
269
|
+
const noopTurnHandler = {
|
|
270
|
+
Handles(toolName) {
|
|
271
|
+
return TURN_TAKING_TOOL_DEFINITIONS.some(t => t.Name === toolName);
|
|
272
|
+
},
|
|
273
|
+
async Execute(call) {
|
|
274
|
+
return JSON.stringify({
|
|
275
|
+
success: false,
|
|
276
|
+
error: `Tool '${call.ToolName}' is not available: session is running in full-duplex mode.`,
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
this.turnToolBinder(opened, noopTurnHandler);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
168
283
|
host?.OnModelSession?.(opened);
|
|
169
284
|
if (activeTurnHandler) {
|
|
170
|
-
this.bindTurnTools(opened, activeTurnHandler, botName);
|
|
285
|
+
this.bindTurnTools(opened, activeTurnHandler, botName, resolvedFullDuplex);
|
|
171
286
|
}
|
|
172
287
|
return opened;
|
|
173
288
|
};
|
|
174
289
|
const session = await openModelSession();
|
|
290
|
+
const finalFullDuplex = resolvedFullDuplex ?? false;
|
|
175
291
|
// The bridge id is known only after the engine starts the session, but the end-of-session hook is registered at start,
|
|
176
292
|
// so it reaches the id through this holder.
|
|
177
293
|
const started = {};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
294
|
+
// Until the bridge engine holds the model session (StartBridgeSession resolves), the session is this start's to close:
|
|
295
|
+
// when the bot's token can't be minted or the bridge doesn't start, it is closed before the error propagates, so a
|
|
296
|
+
// failed start leaves no model connection open (#5308), and its co-agent run reads as failed, with the start's error.
|
|
297
|
+
// From then on the engine closes it when the bridge ends.
|
|
298
|
+
let botToken;
|
|
299
|
+
let active;
|
|
300
|
+
try {
|
|
301
|
+
const watches = this.agentWatches(session);
|
|
302
|
+
const avatar = this.avatarStatusFor(session, avatarVideo, botName);
|
|
303
|
+
const botAttributes = { ...(watches ? AgentWatchesAttributes(true) : {}), ...AgentAvatarAttributes(avatar) };
|
|
304
|
+
botToken = await this.mintBotToken(params.RoomName, botIdentity, botName, botAttributes);
|
|
305
|
+
active = await this.bridgeOps.StartBridgeSession({
|
|
306
|
+
AgentSessionID: params.AgentSessionID,
|
|
307
|
+
AgentID: params.AgentID,
|
|
308
|
+
Provider: provider,
|
|
309
|
+
RealtimeSession: session,
|
|
310
|
+
FullDuplex: finalFullDuplex,
|
|
311
|
+
Address: botToken.ServerUrl,
|
|
312
|
+
JoinMethod: host?.JoinMethod ?? 'OnDemand',
|
|
313
|
+
Direction: host?.Direction,
|
|
314
|
+
TurnMode: params.TurnMode ?? 'Passive',
|
|
315
|
+
TurnAddressing: addressing,
|
|
316
|
+
// Meeting: gate speech to ADDRESSED turns (RegexAddressedMatcher on the agent's names) AND tell the
|
|
317
|
+
// engine the model's auto-response is off so the bridge becomes the sole trigger. Solo 1:1: respond to
|
|
318
|
+
// ALL the user's speech (AlwaysAddressedMatcher) with the model's own auto-response — Passive's
|
|
319
|
+
// name-match would otherwise leave a single agent silent unless you said its name each turn.
|
|
320
|
+
TurnMatcher: isMeeting ? new RegexAddressedMatcher(selfNames) : new AlwaysAddressedMatcher(),
|
|
321
|
+
DisableAutoResponse: isMeeting || undefined,
|
|
322
|
+
// Roster info for the room turn moderator (the LLM router, when one is wired via SetTurnModerator):
|
|
323
|
+
// the names it answers to + its participation style. `'proactive'` (default) lets the moderator bring
|
|
324
|
+
// it in unaddressed when relevant; per-agent `'addressed-only'` resolution from config is a follow-up.
|
|
325
|
+
AgentNames: selfNames,
|
|
326
|
+
ParticipationMode: 'proactive',
|
|
327
|
+
// The voiced TARGET agent (e.g. Sage) — the moderator resolves its role + per-agent turnTaking.mode.
|
|
328
|
+
TargetAgentID: params.TargetAgentID,
|
|
329
|
+
// NativeModuleSpecifier tells LiveKitNativeMeetingSdk which native room-client wrapper to load — the
|
|
330
|
+
// @livekit/rtc-node-backed @memberjunction/ai-bridge-livekit-native by default, overridable via env
|
|
331
|
+
// (e.g. a one-line module setting Gemini's 16 kHz inbound rate). AccessToken is the pre-signed bot
|
|
332
|
+
// join token; the room ws URL arrives as `Address`.
|
|
333
|
+
Configuration: {
|
|
334
|
+
AccessToken: botToken.Token,
|
|
335
|
+
BotDisplayName: botName,
|
|
336
|
+
RoomName: params.RoomName,
|
|
337
|
+
NativeModuleSpecifier: this.resolveNativeModuleSpecifier(),
|
|
338
|
+
// The bot reads the cameras and screens of people who allow it, only when this agent watches.
|
|
339
|
+
AgentVision: watches,
|
|
340
|
+
},
|
|
341
|
+
ContextUser: params.ContextUser,
|
|
342
|
+
MetadataProvider: params.MetadataProvider,
|
|
343
|
+
// Host-owned call: its own transcript, barge-in policy, model recovery and end-of-session bookkeeping.
|
|
344
|
+
TranscriptSink: host?.TranscriptSink,
|
|
345
|
+
OnBargeIn: host?.OnBargeIn,
|
|
346
|
+
RecoverRealtimeSession: host?.RecoverModelSession ? (request) => openModelSession(request.PriorTranscript) : undefined,
|
|
347
|
+
// The bot took the avatar down mid-meeting: the model session is replaced by one that renders none (and re-opened
|
|
348
|
+
// without it from then on), so the model stops generating video nobody sees.
|
|
349
|
+
RecoverRealtimeSessionWithoutAvatar: avatar?.Granted
|
|
350
|
+
? (request) => {
|
|
351
|
+
avatarDelivery = undefined;
|
|
352
|
+
return openModelSession(request.PriorTranscript);
|
|
353
|
+
}
|
|
354
|
+
: undefined,
|
|
355
|
+
OnSessionEnded: async (reason) => {
|
|
356
|
+
// An agent that leaves on its own (every human gone, the model lost, a handoff) must drop off the room's roster too.
|
|
357
|
+
if (started.SessionBridgeID) {
|
|
358
|
+
this.removeFromRoster(started.SessionBridgeID);
|
|
359
|
+
}
|
|
360
|
+
await host?.OnSessionEnded?.(reason);
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
catch (err) {
|
|
365
|
+
await this.closeModelSessionOfFailedStart(session, err);
|
|
366
|
+
throw err;
|
|
367
|
+
}
|
|
225
368
|
started.SessionBridgeID = active.SessionBridgeID;
|
|
226
369
|
this.addToRoster(roomKey, { AgentSessionID: params.AgentSessionID, SessionBridgeID: active.SessionBridgeID, Names: selfNames });
|
|
227
370
|
activeTurnHandler = active.TurnTakingToolHandler;
|
|
228
|
-
this.bindTurnTools(session, active.TurnTakingToolHandler, botName);
|
|
371
|
+
this.bindTurnTools(session, active.TurnTakingToolHandler, botName, finalFullDuplex);
|
|
229
372
|
// The room just became (or stayed) multi-agent → retroactively re-gate the agents already in it into
|
|
230
373
|
// meeting mode so the whole room takes turns, not just the newcomers. Capability-gated in the engine:
|
|
231
374
|
// a provider that can't reconfigure a live session (e.g. Gemini) is left conversational, no dead call.
|
|
@@ -239,18 +382,119 @@ export class LiveKitAgentRoomCoordinator extends BaseSingleton {
|
|
|
239
382
|
`(bridge ${active.SessionBridgeID}, ${isMeeting ? 'MEETING — addressed-only' : 'solo 1:1'})`);
|
|
240
383
|
return { SessionBridgeID: active.SessionBridgeID, RoomName: params.RoomName, ServerUrl: botToken.ServerUrl };
|
|
241
384
|
}
|
|
242
|
-
/**
|
|
243
|
-
|
|
385
|
+
/**
|
|
386
|
+
* Whether the agent behind this model session watches the meeting: its setting is on (through the bound
|
|
387
|
+
* {@link AgentVisionResolver}) AND its session takes inbound video. Watching on an audio-only model would offer people
|
|
388
|
+
* a choice no frame could honour, so it is logged and treated as off.
|
|
389
|
+
*/
|
|
390
|
+
agentWatches(session) {
|
|
391
|
+
const settingOn = this.agentVisionResolver?.(session) === true;
|
|
392
|
+
if (settingOn && InboundVideoStreamsOf(session.Capabilities) === 0) {
|
|
393
|
+
LogStatus('[LiveKitAgentRoomCoordinator] The agent is set to watch meetings, but its realtime model takes no video; it will not watch.');
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
return settingOn;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Whether this host's bots can publish an agent's avatar, from the native room module the bots join with (`ffmpeg`
|
|
400
|
+
* with the H.264 and AAC decoders, and a room SDK that publishes video). Asked before every agent's model session
|
|
401
|
+
* opens; the module probes once and remembers. A module that cannot be loaded, or that predates avatars, means no.
|
|
402
|
+
*/
|
|
403
|
+
async DescribeAvatarVideo() {
|
|
404
|
+
try {
|
|
405
|
+
const nativeModule = await DefaultNativeLoader(this.resolveNativeModuleSpecifier());
|
|
406
|
+
if (!nativeModule.describeAvatarVideo) {
|
|
407
|
+
return { Supported: false, Reason: 'bridged', Detail: 'the native room module publishes no avatars' };
|
|
408
|
+
}
|
|
409
|
+
return await nativeModule.describeAvatarVideo();
|
|
410
|
+
}
|
|
411
|
+
catch (err) {
|
|
412
|
+
return { Supported: false, Reason: 'bridged', Detail: `the native room module could not be asked: ${err instanceof Error ? err.message : String(err)}` };
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* What became of the agent's avatar request: the session's own status, except that a session which asked for an
|
|
417
|
+
* avatar and stayed audio only because this host could not publish it carries the host's reason (`decoder-missing`
|
|
418
|
+
* when there is no usable ffmpeg, `phone` on a phone call whose session factory still asked). Logged once per join when
|
|
419
|
+
* an avatar was asked for.
|
|
420
|
+
*/
|
|
421
|
+
avatarStatusFor(session, avatarVideo, botName) {
|
|
422
|
+
const status = session.AvatarStatus;
|
|
423
|
+
if (!status?.Requested) {
|
|
424
|
+
return status;
|
|
425
|
+
}
|
|
426
|
+
const resolved = !status.Granted && status.Reason === 'bridged' && avatarVideo.Supported === false ? { ...status, Reason: avatarVideo.Reason } : status;
|
|
427
|
+
const detail = avatarVideo.Supported === false && avatarVideo.Detail ? ` (${avatarVideo.Detail})` : '';
|
|
428
|
+
LogStatus(`[LiveKitAgentRoomCoordinator] ${botName}'s avatar: ${resolved.Granted ? 'on' : `audio only, ${resolved.Reason ?? 'bridged'}${detail}`}`);
|
|
429
|
+
return resolved;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Mints the bot's join token with its attributes: `mj.agentWatches` when the agent watches, so the room offers people
|
|
433
|
+
* the choice from the moment the bot joins, and `mj.agentAvatar` when the agent asked for an avatar. Minted once the
|
|
434
|
+
* model session is open; when it fails, the start closes that session (see {@link StartAgentRoomSession}).
|
|
435
|
+
*/
|
|
436
|
+
async mintBotToken(roomName, botIdentity, botName, attributes) {
|
|
437
|
+
return this.tokenService.MintBotToken(roomName, botIdentity, botName, Object.keys(attributes).length > 0 ? attributes : undefined);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Closes the model session of a start that failed before the bridge engine took it: the bot's token could not be minted,
|
|
441
|
+
* or the bridge did not start (its row could not be saved, the driver could not connect). The failure is recorded on the
|
|
442
|
+
* session's co-agent run first ({@link FailedStartRecorder}), since the close alone would finalize that run as completed.
|
|
443
|
+
* Neither step throws: a failure is logged, so the caller sees why the start failed and the session is still closed.
|
|
444
|
+
*/
|
|
445
|
+
async closeModelSessionOfFailedStart(session, startError) {
|
|
446
|
+
try {
|
|
447
|
+
await this.failedStartRecorder?.(session, startError instanceof Error ? startError.message : String(startError));
|
|
448
|
+
}
|
|
449
|
+
catch (err) {
|
|
450
|
+
LogError(`[LiveKitAgentRoomCoordinator] recording a failed start on the agent's run failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
451
|
+
}
|
|
452
|
+
try {
|
|
453
|
+
await session.Close();
|
|
454
|
+
}
|
|
455
|
+
catch (err) {
|
|
456
|
+
LogError(`[LiveKitAgentRoomCoordinator] closing the model session of a failed start failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
/** Installs the engine's turn-taking tool handler on the model session, when the session has one (a turn-based model in a room). */
|
|
460
|
+
bindTurnTools(session, handler, botName, isFullDuplex) {
|
|
244
461
|
if (!handler) {
|
|
245
462
|
return;
|
|
246
463
|
}
|
|
464
|
+
// Full-duplex models never get turn-taking tools; do not bind turn-taking handlers to them
|
|
465
|
+
if (isFullDuplex) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
247
468
|
if (!this.turnToolBinder) {
|
|
248
|
-
LogError(`[LiveKitAgentRoomCoordinator] ${botName}
|
|
249
|
-
'its i_am_addressed / yield_turn calls will not execute.
|
|
469
|
+
LogError(`[LiveKitAgentRoomCoordinator] ${botName} has turn-taking tools but no turn-tool binder is set (SetTurnToolBinder); ` +
|
|
470
|
+
'its i_am_addressed / yield_turn calls will not execute.');
|
|
250
471
|
return;
|
|
251
472
|
}
|
|
252
473
|
this.turnToolBinder(session, handler);
|
|
253
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* Resolves whether the model with the given ID is full duplex from model metadata and static driver capabilities.
|
|
477
|
+
*/
|
|
478
|
+
resolveIsModelFullDuplexFromId(modelId) {
|
|
479
|
+
try {
|
|
480
|
+
const model = (AIEngine.Instance.Models ?? []).find(m => UUIDsEqual(m.ID, modelId));
|
|
481
|
+
if (!model) {
|
|
482
|
+
return undefined;
|
|
483
|
+
}
|
|
484
|
+
const vendors = (AIEngine.Instance.ModelVendorsByModelID?.get(NormalizeUUID(model.ID)) ??
|
|
485
|
+
(AIEngine.Instance.ModelVendors ?? []).filter(mv => UUIDsEqual(mv.ModelID, model.ID)))
|
|
486
|
+
.filter(v => v.DriverClass != null && (v.Status === undefined || v.Status === 'Active'))
|
|
487
|
+
.sort((a, b) => (b.Priority ?? 0) - (a.Priority ?? 0));
|
|
488
|
+
const primaryVendor = vendors[0];
|
|
489
|
+
const effective = AIEngine.Instance.GetEffectiveModelConfiguration(model.ID, primaryVendor?.ID);
|
|
490
|
+
const staticCaps = GetDriverStaticCapabilities(primaryVendor?.DriverClass);
|
|
491
|
+
return ResolveIsModelFullDuplex(effective ?? model.ModelConfigurationObject, staticCaps);
|
|
492
|
+
}
|
|
493
|
+
catch (err) {
|
|
494
|
+
LogError(`[LiveKitAgentRoomCoordinator] resolveIsModelFullDuplexFromId failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
495
|
+
return undefined;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
254
498
|
/** Appends an agent to a room's roster (creating the room's list on first join). */
|
|
255
499
|
addToRoster(roomKey, entry) {
|
|
256
500
|
const roster = this.roomRosters.get(roomKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livekit-agent-room-coordinator.js","sourceRoot":"","sources":["../src/livekit-agent-room-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAyC,MAAM,sBAAsB,CAAC;AAElG,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,GAI7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,GAIf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAK9E,2GAA2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WAAW,EAAE,CAAC;YACjD,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,KAAK,eAAe,CAAC,EAAE,CAAC;gBAC9D,OAAO,OAAO,CAAC;YACjB,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,eAAe,CAAC,QAAgB;QACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livekit-native-module.d.ts","sourceRoot":"","sources":["../src/livekit-native-module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"livekit-native-module.d.ts","sourceRoot":"","sources":["../src/livekit-native-module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,uGAAuG;AACvG,eAAO,MAAM,6BAA6B,6CAA6C,CAAC;AAExF;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7E"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module @memberjunction/livekit-room-server
|
|
7
7
|
*/
|
|
8
|
+
import { RegisterNativeRoomModule } from '@memberjunction/ai-bridge-livekit';
|
|
9
|
+
import NativeRoomModuleDefault from '@memberjunction/ai-bridge-livekit-native';
|
|
8
10
|
/** The default native room-client wrapper — the `@livekit/rtc-node`-backed package this repo ships. */
|
|
9
11
|
export const DEFAULT_LIVEKIT_NATIVE_MODULE = '@memberjunction/ai-bridge-livekit-native';
|
|
10
12
|
/**
|
|
@@ -17,4 +19,9 @@ export const DEFAULT_LIVEKIT_NATIVE_MODULE = '@memberjunction/ai-bridge-livekit-
|
|
|
17
19
|
export function ResolveLiveKitNativeModuleSpecifier(override) {
|
|
18
20
|
return override ?? process.env.LIVEKIT_NATIVE_MODULE ?? DEFAULT_LIVEKIT_NATIVE_MODULE;
|
|
19
21
|
}
|
|
22
|
+
// The bridge package's loader cannot `import()` the default wrapper itself: it does not (and, to avoid a dependency
|
|
23
|
+
// cycle, must not) declare it, so the bare specifier does not resolve from there under pnpm's strict layout. This
|
|
24
|
+
// package declares the wrapper, so it imports it statically and registers it for the loader to find. An override
|
|
25
|
+
// specifier (`LIVEKIT_NATIVE_MODULE`) that is not registered still goes through the loader's `import()`.
|
|
26
|
+
RegisterNativeRoomModule(DEFAULT_LIVEKIT_NATIVE_MODULE, NativeRoomModuleDefault);
|
|
20
27
|
//# sourceMappingURL=livekit-native-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livekit-native-module.js","sourceRoot":"","sources":["../src/livekit-native-module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uGAAuG;AACvG,MAAM,CAAC,MAAM,6BAA6B,GAAG,0CAA0C,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,UAAU,mCAAmC,CAAC,QAAiB;IACnE,OAAO,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,6BAA6B,CAAC;AACxF,CAAC"}
|
|
1
|
+
{"version":3,"file":"livekit-native-module.js","sourceRoot":"","sources":["../src/livekit-native-module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,uBAAuB,MAAM,0CAA0C,CAAC;AAE/E,uGAAuG;AACvG,MAAM,CAAC,MAAM,6BAA6B,GAAG,0CAA0C,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,UAAU,mCAAmC,CAAC,QAAiB;IACnE,OAAO,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,6BAA6B,CAAC;AACxF,CAAC;AAED,oHAAoH;AACpH,kHAAkH;AAClH,iHAAiH;AACjH,yGAAyG;AACzG,wBAAwB,CAAC,6BAA6B,EAAE,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview {@link LiveKitParticipantService} — changes a participant in a live room through LiveKit's
|
|
3
|
+
* `RoomServiceClient` (`livekit-server-sdk`). Today it records whether a person lets agents see their camera and shared
|
|
4
|
+
* screen. A participant's token can't change its own attributes: MJ's tokens carry no `canUpdateOwnMetadata`, because
|
|
5
|
+
* the same right would let anyone rename themselves and rewrite the metadata that carries their role. So the server
|
|
6
|
+
* sets the attribute for them, once MJAPI has worked out who is asking.
|
|
7
|
+
*
|
|
8
|
+
* @module @memberjunction/livekit-room-server
|
|
9
|
+
*/
|
|
10
|
+
import { RoomServiceClient } from 'livekit-server-sdk';
|
|
11
|
+
import { type LiveKitServerConfig } from './livekit-token-service.js';
|
|
12
|
+
/** The subset of {@link RoomServiceClient} the service drives — an injectable seam for unit testing. */
|
|
13
|
+
export type ParticipantUpdateClientLike = Pick<RoomServiceClient, 'updateParticipant'>;
|
|
14
|
+
/** The outcome of changing a participant. */
|
|
15
|
+
export interface ParticipantUpdateResult {
|
|
16
|
+
/** Whether LiveKit applied the change. */
|
|
17
|
+
Success: boolean;
|
|
18
|
+
/** `true` when LiveKit refused because that participant (or the room) does not exist. */
|
|
19
|
+
NotInRoom?: boolean;
|
|
20
|
+
/** What went wrong, when it failed. */
|
|
21
|
+
ErrorMessage?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Changes participants in live LiveKit rooms, on the server's authority. */
|
|
24
|
+
export declare class LiveKitParticipantService {
|
|
25
|
+
private readonly configured;
|
|
26
|
+
private readonly client;
|
|
27
|
+
/**
|
|
28
|
+
* @param config Explicit credentials; omitted fields fall back to environment variables (via
|
|
29
|
+
* {@link LiveKitTokenService}). The room service client uses the HTTP(S) form of the server URL.
|
|
30
|
+
* @param client An injectable room service client (primarily for unit testing); defaults to a real
|
|
31
|
+
* `RoomServiceClient` built from the resolved credentials.
|
|
32
|
+
*/
|
|
33
|
+
constructor(config?: Partial<LiveKitServerConfig>, client?: ParticipantUpdateClientLike);
|
|
34
|
+
/**
|
|
35
|
+
* Records whether a person lets agents see their camera and shared screen: sets their `mj.agentCanSee` attribute to
|
|
36
|
+
* `'true'`, or removes it. The caller must already have established that `identity` is the person asking.
|
|
37
|
+
*
|
|
38
|
+
* @param roomName The room the person is in.
|
|
39
|
+
* @param identity The person's participant identity.
|
|
40
|
+
* @param allow `true` to let agents see, `false` to stop.
|
|
41
|
+
* @returns Whether LiveKit applied it; never throws.
|
|
42
|
+
*/
|
|
43
|
+
SetAgentVision(roomName: string, identity: string, allow: boolean): Promise<ParticipantUpdateResult>;
|
|
44
|
+
/** Sets (or, with `''`, removes) a participant's attributes; reports LiveKit's refusal instead of throwing. */
|
|
45
|
+
private updateAttributes;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=livekit-participant-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livekit-participant-service.d.ts","sourceRoot":"","sources":["../src/livekit-participant-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAc,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGxF,wGAAwG;AACxG,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;AAEvF,6CAA6C;AAC7C,MAAM,WAAW,uBAAuB;IACtC,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,yFAAyF;IACzF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,6EAA6E;AAC7E,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD;;;;;OAKG;gBACS,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC,EAAE,2BAA2B;IAOvF;;;;;;;;OAQG;IACU,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIjH,+GAA+G;YACjG,gBAAgB;CAc/B"}
|