osborn 0.9.30 → 0.9.31
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.js +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1111,6 +1111,7 @@ async function main() {
|
|
|
1111
1111
|
// Empty string = anonymous / unauthenticated; uploads fall back to a
|
|
1112
1112
|
// session-only path (no user prefix).
|
|
1113
1113
|
let currentUserId = '';
|
|
1114
|
+
let activeMeetingBotId = null; // Recall.ai bot ID if in a meeting
|
|
1114
1115
|
// Track the active resume session ID across scopes (ParticipantConnected + DataReceived)
|
|
1115
1116
|
// Updated by resume_session, session_selected, continue_session, switch_session handlers
|
|
1116
1117
|
let currentResumeSessionId;
|
|
@@ -3099,6 +3100,15 @@ async function main() {
|
|
|
3099
3100
|
currentLLM = null;
|
|
3100
3101
|
clearFastBrainSession();
|
|
3101
3102
|
clearPipelineFastBrainSession();
|
|
3103
|
+
// Auto-leave any active meeting bot when user disconnects from the room
|
|
3104
|
+
if (activeMeetingBotId) {
|
|
3105
|
+
const recallDisconnect = getRecallClient();
|
|
3106
|
+
if (recallDisconnect) {
|
|
3107
|
+
console.log(`🤝 Auto-leaving meeting (bot ${activeMeetingBotId}) — user disconnected from room`);
|
|
3108
|
+
recallDisconnect.leaveMeeting(activeMeetingBotId).catch(() => { });
|
|
3109
|
+
activeMeetingBotId = null;
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3102
3112
|
console.log('⏳ Waiting for new user...\n');
|
|
3103
3113
|
});
|
|
3104
3114
|
room.on(RoomEvent.DataReceived, async (payload, participant, kind, topic) => {
|
|
@@ -3678,6 +3688,7 @@ async function main() {
|
|
|
3678
3688
|
const botId = await recallJoin.joinMeeting(meetingUrl, webhookBase);
|
|
3679
3689
|
const sessionId = currentLLM?.sessionId || currentResumeSessionId || 'default';
|
|
3680
3690
|
recallJoin.registerBot(botId, sessionId);
|
|
3691
|
+
activeMeetingBotId = botId;
|
|
3681
3692
|
await sendToFrontend({ type: 'meeting_joined', botId, message: 'Osborn has joined the meeting' });
|
|
3682
3693
|
}
|
|
3683
3694
|
catch (err) {
|
|
@@ -3693,6 +3704,7 @@ async function main() {
|
|
|
3693
3704
|
if (recallLeave && botId) {
|
|
3694
3705
|
try {
|
|
3695
3706
|
await recallLeave.leaveMeeting(botId);
|
|
3707
|
+
activeMeetingBotId = null;
|
|
3696
3708
|
await sendToFrontend({ type: 'meeting_left', botId });
|
|
3697
3709
|
}
|
|
3698
3710
|
catch (err) {
|