@voicethere/agent 0.28.0 → 0.29.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.
- package/README.md +40 -17
- package/dist/agent.js +85 -3
- package/dist/flow/core/abort.d.ts +10 -0
- package/dist/flow/core/abort.d.ts.map +1 -0
- package/dist/flow/core/abort.js +16 -0
- package/dist/flow/core/abort.js.map +1 -0
- package/dist/flow/core/interpreter.d.ts.map +1 -1
- package/dist/flow/core/interpreter.js +4 -3
- package/dist/flow/core/interpreter.js.map +1 -1
- package/dist/flow/record.d.ts +2 -0
- package/dist/flow/record.d.ts.map +1 -1
- package/dist/flow/record.js +23 -9
- package/dist/flow/record.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +95 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/runtime.d.ts +51 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +184 -1
- package/dist/runtime.js.map +1 -1
- package/dist/templates/echo/agent.js +84 -3
- package/dist/templates/echo-dc/agent.js +84 -3
- package/dist/templates/flow-agent/agent.js +93 -6
- package/dist/templates/game-sync/agent.js +84 -3
- package/dist/templates/language-switch/agent.js +84 -3
- package/dist/templates/llm-agent/agent.js +84 -3
- package/dist/templates/llm-docs-rag/agent.js +84 -3
- package/dist/templates/llm-mcp-service/agent.js +84 -3
- package/dist/templates/llm-support-sticky-user/agent.js +84 -3
- package/dist/templates/positional-tts/agent.js +84 -3
- package/dist/templates/recording-consent/agent.js +84 -3
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +11 -0
- package/dist/templates/registry.js.map +1 -1
- package/dist/templates/spatial-showcase/agent.js +84 -3
- package/dist/templates/speaker-gate/agent.js +1575 -0
- package/dist/templates/voice-showcase/agent.js +84 -3
- package/dist/templates/voice-starter/agent.js +84 -3
- package/dist/templates/webhooks/agent.js +84 -3
- package/dist/templates/webhooks-redis/agent.js +84 -3
- package/dist/templates/world-sync/agent.js +84 -3
- package/dist/templates/world-sync-binary/agent.js +84 -3
- package/eject/llm/loop.ts +1 -1
- package/package.json +1 -1
- package/templates/README.md +24 -23
- package/templates/speaker-gate/README.md +48 -0
- package/templates/speaker-gate/agent.ts +168 -0
|
@@ -10990,6 +10990,18 @@ function isVoiceLanguagePrepareResultMessage(value) {
|
|
|
10990
10990
|
const msg = value;
|
|
10991
10991
|
return msg.type === "voice_language_prepare_result" && typeof msg.requestId === "string";
|
|
10992
10992
|
}
|
|
10993
|
+
function isSetSpeakerGateResultMessage(value) {
|
|
10994
|
+
if (!value || typeof value !== "object")
|
|
10995
|
+
return false;
|
|
10996
|
+
const msg = value;
|
|
10997
|
+
return msg.type === "setSpeakerGateResult" && typeof msg.requestId === "string";
|
|
10998
|
+
}
|
|
10999
|
+
function isResetSpeakerEnrollmentResultMessage(value) {
|
|
11000
|
+
if (!value || typeof value !== "object")
|
|
11001
|
+
return false;
|
|
11002
|
+
const msg = value;
|
|
11003
|
+
return msg.type === "resetSpeakerEnrollmentResult" && typeof msg.requestId === "string";
|
|
11004
|
+
}
|
|
10993
11005
|
function isVoiceReplayLastResultMessage(value) {
|
|
10994
11006
|
if (!value || typeof value !== "object")
|
|
10995
11007
|
return false;
|
|
@@ -11038,7 +11050,7 @@ function isParentMessage(value) {
|
|
|
11038
11050
|
if (!value || typeof value !== "object")
|
|
11039
11051
|
return false;
|
|
11040
11052
|
const msg = value;
|
|
11041
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "session_time_limit" || msg.type === "session_time_limit_control_ack" || msg.type === "recording_control_ack" || msg.type === "conversation_history_control_ack" || msg.type === "user_identified" || msg.type === "user_history_response" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "voice_language_control_ack" || msg.type === "voice_language_prepare_result" || msg.type === "voice_replay_last_result" || msg.type === "speak_result" || msg.type === "barge_in_control_ack" || msg.type === "agent_interrupted" || msg.type === "webhook";
|
|
11053
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "session_time_limit" || msg.type === "session_time_limit_control_ack" || msg.type === "recording_control_ack" || msg.type === "conversation_history_control_ack" || msg.type === "user_identified" || msg.type === "user_history_response" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "voice_language_control_ack" || msg.type === "voice_language_prepare_result" || msg.type === "voice_replay_last_result" || msg.type === "setSpeakerGateResult" || msg.type === "resetSpeakerEnrollmentResult" || msg.type === "speak_result" || msg.type === "barge_in_control_ack" || msg.type === "agent_interrupted" || msg.type === "webhook";
|
|
11042
11054
|
}
|
|
11043
11055
|
function isSessionScopedParentMessage(value) {
|
|
11044
11056
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -11057,6 +11069,9 @@ var endUserBySessionId = /* @__PURE__ */ new Map();
|
|
|
11057
11069
|
var mixAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
11058
11070
|
var voiceLanguageSwitchAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
11059
11071
|
var lastVoiceLanguageBySessionId = /* @__PURE__ */ new Map();
|
|
11072
|
+
var speakerGateBySessionId = /* @__PURE__ */ new Map();
|
|
11073
|
+
var pendingSpeakerGateAcks = /* @__PURE__ */ new Map();
|
|
11074
|
+
var pendingSpeakerResets = /* @__PURE__ */ new Map();
|
|
11060
11075
|
var ttsPoseAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
11061
11076
|
var speakControlAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
11062
11077
|
var chatReplyRecordAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
@@ -11314,6 +11329,35 @@ function handleVoiceLanguagePrepareResult(message) {
|
|
|
11314
11329
|
...message.language ? { language: message.language } : {}
|
|
11315
11330
|
});
|
|
11316
11331
|
}
|
|
11332
|
+
function handleSetSpeakerGateResult(message) {
|
|
11333
|
+
const pending = pendingSpeakerGateAcks.get(message.requestId);
|
|
11334
|
+
if (!pending)
|
|
11335
|
+
return;
|
|
11336
|
+
clearTimeout(pending.timer);
|
|
11337
|
+
pendingSpeakerGateAcks.delete(message.requestId);
|
|
11338
|
+
if (message.ok) {
|
|
11339
|
+
speakerGateBySessionId.set(pending.sessionId, {
|
|
11340
|
+
available: true,
|
|
11341
|
+
mode: message.mode,
|
|
11342
|
+
bargeIn: message.bargeIn
|
|
11343
|
+
});
|
|
11344
|
+
pending.resolve({
|
|
11345
|
+
ok: true,
|
|
11346
|
+
mode: message.mode,
|
|
11347
|
+
bargeIn: message.bargeIn
|
|
11348
|
+
});
|
|
11349
|
+
return;
|
|
11350
|
+
}
|
|
11351
|
+
pending.resolve({ ok: false, reason: message.reason });
|
|
11352
|
+
}
|
|
11353
|
+
function handleResetSpeakerEnrollmentResult(message) {
|
|
11354
|
+
const pending = pendingSpeakerResets.get(message.requestId);
|
|
11355
|
+
if (!pending)
|
|
11356
|
+
return;
|
|
11357
|
+
clearTimeout(pending.timer);
|
|
11358
|
+
pendingSpeakerResets.delete(message.requestId);
|
|
11359
|
+
pending.resolve(message.ok ? { ok: true } : { ok: false, reason: message.reason });
|
|
11360
|
+
}
|
|
11317
11361
|
function handleVoiceReplayLastResult(message) {
|
|
11318
11362
|
const pending = pendingVoiceReplays.get(message.requestId);
|
|
11319
11363
|
if (!pending)
|
|
@@ -11415,7 +11459,7 @@ function allowOutboundForSession(sessionId) {
|
|
|
11415
11459
|
}
|
|
11416
11460
|
function sendParentMessage(message) {
|
|
11417
11461
|
const msgType = message && typeof message === "object" && "type" in message ? message.type : void 0;
|
|
11418
|
-
if (msgType === "mix_control" || msgType === "stt_control" || msgType === "voice_language_control" || msgType === "voice_language_prepare" || msgType === "voice_replay_last") {
|
|
11462
|
+
if (msgType === "mix_control" || msgType === "stt_control" || msgType === "voice_language_control" || msgType === "voice_language_prepare" || msgType === "voice_replay_last" || msgType === "setSpeakerGate" || msgType === "resetSpeakerEnrollment") {
|
|
11419
11463
|
process.send?.(message);
|
|
11420
11464
|
return;
|
|
11421
11465
|
}
|
|
@@ -11498,6 +11542,20 @@ async function handleWebhookMessage(message, handlers) {
|
|
|
11498
11542
|
});
|
|
11499
11543
|
}
|
|
11500
11544
|
}
|
|
11545
|
+
function speakerGateOf(sessionId) {
|
|
11546
|
+
const gate = speakerGateBySessionId.get(sessionId);
|
|
11547
|
+
return gate?.available ? { speakerGate: gate } : {};
|
|
11548
|
+
}
|
|
11549
|
+
var SPEAKER_VERDICTS = ["caller", "other", "unknown"];
|
|
11550
|
+
function speakerFieldsOf(event) {
|
|
11551
|
+
const e = event;
|
|
11552
|
+
return {
|
|
11553
|
+
...typeof e.speaker === "string" && SPEAKER_VERDICTS.includes(e.speaker) ? { speaker: e.speaker } : {},
|
|
11554
|
+
...typeof e.speakerUnknownReason === "string" ? { speakerUnknownReason: e.speakerUnknownReason } : {},
|
|
11555
|
+
...typeof e.speakerCheckWindows === "number" ? { speakerCheckWindows: e.speakerCheckWindows } : {},
|
|
11556
|
+
...typeof e.speakerRechecked === "boolean" ? { speakerRechecked: e.speakerRechecked } : {}
|
|
11557
|
+
};
|
|
11558
|
+
}
|
|
11501
11559
|
function resolveUserLanguageCode(event) {
|
|
11502
11560
|
const withLanguage = event;
|
|
11503
11561
|
const candidates = [withLanguage.language, event.text];
|
|
@@ -11526,6 +11584,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
11526
11584
|
speakControlAvailableBySessionId.set(message.sessionId, message.speakControlAvailable ?? false);
|
|
11527
11585
|
chatReplyRecordAvailableBySessionId.set(message.sessionId, message.chatReplyRecordAvailable ?? false);
|
|
11528
11586
|
sessionTimeLimitAvailableBySessionId.set(message.sessionId, message.sessionTimeLimitAvailable ?? false);
|
|
11587
|
+
speakerGateBySessionId.set(message.sessionId, message.speakerGate?.available === true ? message.speakerGate : { available: false });
|
|
11529
11588
|
if (message.voiceLanguageSwitch) {
|
|
11530
11589
|
voiceLanguageSwitchSettingsBySessionId.set(message.sessionId, message.voiceLanguageSwitch);
|
|
11531
11590
|
} else {
|
|
@@ -11543,6 +11602,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
11543
11602
|
conversationHistoryAvailable: message.conversationHistoryAvailable ?? false,
|
|
11544
11603
|
mixAvailable: message.mixAvailable ?? false,
|
|
11545
11604
|
voiceLanguageSwitchAvailable: message.voiceLanguageSwitchAvailable ?? false,
|
|
11605
|
+
...speakerGateOf(message.sessionId),
|
|
11546
11606
|
ttsPoseAvailable: message.ttsPoseAvailable ?? false,
|
|
11547
11607
|
speakControlAvailable: message.speakControlAvailable ?? false,
|
|
11548
11608
|
sessionTimeLimitAvailable: message.sessionTimeLimitAvailable ?? false
|
|
@@ -11566,6 +11626,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
11566
11626
|
conversationHistoryAvailable: conversationHistoryAvailableBySessionId.get(message.sessionId) ?? false,
|
|
11567
11627
|
mixAvailable: mixAvailableBySessionId.get(message.sessionId) ?? false,
|
|
11568
11628
|
voiceLanguageSwitchAvailable: voiceLanguageSwitchAvailableBySessionId.get(message.sessionId) ?? false,
|
|
11629
|
+
...speakerGateOf(message.sessionId),
|
|
11569
11630
|
ttsPoseAvailable: ttsPoseAvailableBySessionId.get(message.sessionId) ?? false,
|
|
11570
11631
|
speakControlAvailable: speakControlAvailableBySessionId.get(message.sessionId) ?? false,
|
|
11571
11632
|
sessionTimeLimitAvailable: sessionTimeLimitAvailableBySessionId.get(message.sessionId) ?? false,
|
|
@@ -11582,9 +11643,20 @@ async function handleParentMessage(message, handlers) {
|
|
|
11582
11643
|
sessionId: message.sessionId,
|
|
11583
11644
|
text: message.event.text.trim(),
|
|
11584
11645
|
...message.event.replay === true ? { replay: true } : {},
|
|
11585
|
-
...utteranceId ? { utteranceId } : {}
|
|
11646
|
+
...utteranceId ? { utteranceId } : {},
|
|
11647
|
+
...speakerFieldsOf(message.event)
|
|
11586
11648
|
});
|
|
11587
11649
|
}
|
|
11650
|
+
if (message.event.type === "user_speech_ignored") {
|
|
11651
|
+
const ignored = message.event;
|
|
11652
|
+
if (typeof ignored.utteranceId === "string" && ignored.reason === "speaker_mismatch") {
|
|
11653
|
+
await handlers.onUserSpeechIgnored?.({
|
|
11654
|
+
sessionId: message.sessionId,
|
|
11655
|
+
utteranceId: ignored.utteranceId,
|
|
11656
|
+
reason: ignored.reason
|
|
11657
|
+
});
|
|
11658
|
+
}
|
|
11659
|
+
}
|
|
11588
11660
|
if (message.event.type === "user_language") {
|
|
11589
11661
|
const language = resolveUserLanguageCode(message.event);
|
|
11590
11662
|
if (language) {
|
|
@@ -11638,6 +11710,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
11638
11710
|
endUserBySessionId.delete(message.sessionId);
|
|
11639
11711
|
mixAvailableBySessionId.delete(message.sessionId);
|
|
11640
11712
|
voiceLanguageSwitchAvailableBySessionId.delete(message.sessionId);
|
|
11713
|
+
speakerGateBySessionId.delete(message.sessionId);
|
|
11641
11714
|
voiceLanguageSwitchSettingsBySessionId.delete(message.sessionId);
|
|
11642
11715
|
lastVoiceLanguageBySessionId.delete(message.sessionId);
|
|
11643
11716
|
ttsPoseAvailableBySessionId.delete(message.sessionId);
|
|
@@ -11723,6 +11796,14 @@ function defineAgent(handlers) {
|
|
|
11723
11796
|
handleVoiceReplayLastResult(message);
|
|
11724
11797
|
return;
|
|
11725
11798
|
}
|
|
11799
|
+
if (isSetSpeakerGateResultMessage(message)) {
|
|
11800
|
+
handleSetSpeakerGateResult(message);
|
|
11801
|
+
return;
|
|
11802
|
+
}
|
|
11803
|
+
if (isResetSpeakerEnrollmentResultMessage(message)) {
|
|
11804
|
+
handleResetSpeakerEnrollmentResult(message);
|
|
11805
|
+
return;
|
|
11806
|
+
}
|
|
11726
11807
|
if (isWebhookMessage(message)) {
|
|
11727
11808
|
void agentStartReady.then(() => handleWebhookMessage(message, handlers));
|
|
11728
11809
|
return;
|
|
@@ -235,6 +235,18 @@ function isVoiceLanguagePrepareResultMessage(value) {
|
|
|
235
235
|
const msg = value;
|
|
236
236
|
return msg.type === "voice_language_prepare_result" && typeof msg.requestId === "string";
|
|
237
237
|
}
|
|
238
|
+
function isSetSpeakerGateResultMessage(value) {
|
|
239
|
+
if (!value || typeof value !== "object")
|
|
240
|
+
return false;
|
|
241
|
+
const msg = value;
|
|
242
|
+
return msg.type === "setSpeakerGateResult" && typeof msg.requestId === "string";
|
|
243
|
+
}
|
|
244
|
+
function isResetSpeakerEnrollmentResultMessage(value) {
|
|
245
|
+
if (!value || typeof value !== "object")
|
|
246
|
+
return false;
|
|
247
|
+
const msg = value;
|
|
248
|
+
return msg.type === "resetSpeakerEnrollmentResult" && typeof msg.requestId === "string";
|
|
249
|
+
}
|
|
238
250
|
function isVoiceReplayLastResultMessage(value) {
|
|
239
251
|
if (!value || typeof value !== "object")
|
|
240
252
|
return false;
|
|
@@ -283,7 +295,7 @@ function isParentMessage(value) {
|
|
|
283
295
|
if (!value || typeof value !== "object")
|
|
284
296
|
return false;
|
|
285
297
|
const msg = value;
|
|
286
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "session_time_limit" || msg.type === "session_time_limit_control_ack" || msg.type === "recording_control_ack" || msg.type === "conversation_history_control_ack" || msg.type === "user_identified" || msg.type === "user_history_response" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "voice_language_control_ack" || msg.type === "voice_language_prepare_result" || msg.type === "voice_replay_last_result" || msg.type === "speak_result" || msg.type === "barge_in_control_ack" || msg.type === "agent_interrupted" || msg.type === "webhook";
|
|
298
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "session_time_limit" || msg.type === "session_time_limit_control_ack" || msg.type === "recording_control_ack" || msg.type === "conversation_history_control_ack" || msg.type === "user_identified" || msg.type === "user_history_response" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "voice_language_control_ack" || msg.type === "voice_language_prepare_result" || msg.type === "voice_replay_last_result" || msg.type === "setSpeakerGateResult" || msg.type === "resetSpeakerEnrollmentResult" || msg.type === "speak_result" || msg.type === "barge_in_control_ack" || msg.type === "agent_interrupted" || msg.type === "webhook";
|
|
287
299
|
}
|
|
288
300
|
function isSessionScopedParentMessage(value) {
|
|
289
301
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -302,6 +314,9 @@ var endUserBySessionId = /* @__PURE__ */ new Map();
|
|
|
302
314
|
var mixAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
303
315
|
var voiceLanguageSwitchAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
304
316
|
var lastVoiceLanguageBySessionId = /* @__PURE__ */ new Map();
|
|
317
|
+
var speakerGateBySessionId = /* @__PURE__ */ new Map();
|
|
318
|
+
var pendingSpeakerGateAcks = /* @__PURE__ */ new Map();
|
|
319
|
+
var pendingSpeakerResets = /* @__PURE__ */ new Map();
|
|
305
320
|
var ttsPoseAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
306
321
|
var speakControlAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
307
322
|
var chatReplyRecordAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
@@ -559,6 +574,35 @@ function handleVoiceLanguagePrepareResult(message) {
|
|
|
559
574
|
...message.language ? { language: message.language } : {}
|
|
560
575
|
});
|
|
561
576
|
}
|
|
577
|
+
function handleSetSpeakerGateResult(message) {
|
|
578
|
+
const pending = pendingSpeakerGateAcks.get(message.requestId);
|
|
579
|
+
if (!pending)
|
|
580
|
+
return;
|
|
581
|
+
clearTimeout(pending.timer);
|
|
582
|
+
pendingSpeakerGateAcks.delete(message.requestId);
|
|
583
|
+
if (message.ok) {
|
|
584
|
+
speakerGateBySessionId.set(pending.sessionId, {
|
|
585
|
+
available: true,
|
|
586
|
+
mode: message.mode,
|
|
587
|
+
bargeIn: message.bargeIn
|
|
588
|
+
});
|
|
589
|
+
pending.resolve({
|
|
590
|
+
ok: true,
|
|
591
|
+
mode: message.mode,
|
|
592
|
+
bargeIn: message.bargeIn
|
|
593
|
+
});
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
pending.resolve({ ok: false, reason: message.reason });
|
|
597
|
+
}
|
|
598
|
+
function handleResetSpeakerEnrollmentResult(message) {
|
|
599
|
+
const pending = pendingSpeakerResets.get(message.requestId);
|
|
600
|
+
if (!pending)
|
|
601
|
+
return;
|
|
602
|
+
clearTimeout(pending.timer);
|
|
603
|
+
pendingSpeakerResets.delete(message.requestId);
|
|
604
|
+
pending.resolve(message.ok ? { ok: true } : { ok: false, reason: message.reason });
|
|
605
|
+
}
|
|
562
606
|
function handleVoiceReplayLastResult(message) {
|
|
563
607
|
const pending = pendingVoiceReplays.get(message.requestId);
|
|
564
608
|
if (!pending)
|
|
@@ -660,7 +704,7 @@ function allowOutboundForSession(sessionId) {
|
|
|
660
704
|
}
|
|
661
705
|
function sendParentMessage(message) {
|
|
662
706
|
const msgType = message && typeof message === "object" && "type" in message ? message.type : void 0;
|
|
663
|
-
if (msgType === "mix_control" || msgType === "stt_control" || msgType === "voice_language_control" || msgType === "voice_language_prepare" || msgType === "voice_replay_last") {
|
|
707
|
+
if (msgType === "mix_control" || msgType === "stt_control" || msgType === "voice_language_control" || msgType === "voice_language_prepare" || msgType === "voice_replay_last" || msgType === "setSpeakerGate" || msgType === "resetSpeakerEnrollment") {
|
|
664
708
|
process.send?.(message);
|
|
665
709
|
return;
|
|
666
710
|
}
|
|
@@ -743,6 +787,20 @@ async function handleWebhookMessage(message, handlers) {
|
|
|
743
787
|
});
|
|
744
788
|
}
|
|
745
789
|
}
|
|
790
|
+
function speakerGateOf(sessionId) {
|
|
791
|
+
const gate = speakerGateBySessionId.get(sessionId);
|
|
792
|
+
return gate?.available ? { speakerGate: gate } : {};
|
|
793
|
+
}
|
|
794
|
+
var SPEAKER_VERDICTS = ["caller", "other", "unknown"];
|
|
795
|
+
function speakerFieldsOf(event) {
|
|
796
|
+
const e = event;
|
|
797
|
+
return {
|
|
798
|
+
...typeof e.speaker === "string" && SPEAKER_VERDICTS.includes(e.speaker) ? { speaker: e.speaker } : {},
|
|
799
|
+
...typeof e.speakerUnknownReason === "string" ? { speakerUnknownReason: e.speakerUnknownReason } : {},
|
|
800
|
+
...typeof e.speakerCheckWindows === "number" ? { speakerCheckWindows: e.speakerCheckWindows } : {},
|
|
801
|
+
...typeof e.speakerRechecked === "boolean" ? { speakerRechecked: e.speakerRechecked } : {}
|
|
802
|
+
};
|
|
803
|
+
}
|
|
746
804
|
function resolveUserLanguageCode(event) {
|
|
747
805
|
const withLanguage = event;
|
|
748
806
|
const candidates = [withLanguage.language, event.text];
|
|
@@ -771,6 +829,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
771
829
|
speakControlAvailableBySessionId.set(message.sessionId, message.speakControlAvailable ?? false);
|
|
772
830
|
chatReplyRecordAvailableBySessionId.set(message.sessionId, message.chatReplyRecordAvailable ?? false);
|
|
773
831
|
sessionTimeLimitAvailableBySessionId.set(message.sessionId, message.sessionTimeLimitAvailable ?? false);
|
|
832
|
+
speakerGateBySessionId.set(message.sessionId, message.speakerGate?.available === true ? message.speakerGate : { available: false });
|
|
774
833
|
if (message.voiceLanguageSwitch) {
|
|
775
834
|
voiceLanguageSwitchSettingsBySessionId.set(message.sessionId, message.voiceLanguageSwitch);
|
|
776
835
|
} else {
|
|
@@ -788,6 +847,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
788
847
|
conversationHistoryAvailable: message.conversationHistoryAvailable ?? false,
|
|
789
848
|
mixAvailable: message.mixAvailable ?? false,
|
|
790
849
|
voiceLanguageSwitchAvailable: message.voiceLanguageSwitchAvailable ?? false,
|
|
850
|
+
...speakerGateOf(message.sessionId),
|
|
791
851
|
ttsPoseAvailable: message.ttsPoseAvailable ?? false,
|
|
792
852
|
speakControlAvailable: message.speakControlAvailable ?? false,
|
|
793
853
|
sessionTimeLimitAvailable: message.sessionTimeLimitAvailable ?? false
|
|
@@ -811,6 +871,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
811
871
|
conversationHistoryAvailable: conversationHistoryAvailableBySessionId.get(message.sessionId) ?? false,
|
|
812
872
|
mixAvailable: mixAvailableBySessionId.get(message.sessionId) ?? false,
|
|
813
873
|
voiceLanguageSwitchAvailable: voiceLanguageSwitchAvailableBySessionId.get(message.sessionId) ?? false,
|
|
874
|
+
...speakerGateOf(message.sessionId),
|
|
814
875
|
ttsPoseAvailable: ttsPoseAvailableBySessionId.get(message.sessionId) ?? false,
|
|
815
876
|
speakControlAvailable: speakControlAvailableBySessionId.get(message.sessionId) ?? false,
|
|
816
877
|
sessionTimeLimitAvailable: sessionTimeLimitAvailableBySessionId.get(message.sessionId) ?? false,
|
|
@@ -827,9 +888,20 @@ async function handleParentMessage(message, handlers) {
|
|
|
827
888
|
sessionId: message.sessionId,
|
|
828
889
|
text: message.event.text.trim(),
|
|
829
890
|
...message.event.replay === true ? { replay: true } : {},
|
|
830
|
-
...utteranceId ? { utteranceId } : {}
|
|
891
|
+
...utteranceId ? { utteranceId } : {},
|
|
892
|
+
...speakerFieldsOf(message.event)
|
|
831
893
|
});
|
|
832
894
|
}
|
|
895
|
+
if (message.event.type === "user_speech_ignored") {
|
|
896
|
+
const ignored = message.event;
|
|
897
|
+
if (typeof ignored.utteranceId === "string" && ignored.reason === "speaker_mismatch") {
|
|
898
|
+
await handlers.onUserSpeechIgnored?.({
|
|
899
|
+
sessionId: message.sessionId,
|
|
900
|
+
utteranceId: ignored.utteranceId,
|
|
901
|
+
reason: ignored.reason
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
}
|
|
833
905
|
if (message.event.type === "user_language") {
|
|
834
906
|
const language = resolveUserLanguageCode(message.event);
|
|
835
907
|
if (language) {
|
|
@@ -883,6 +955,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
883
955
|
endUserBySessionId.delete(message.sessionId);
|
|
884
956
|
mixAvailableBySessionId.delete(message.sessionId);
|
|
885
957
|
voiceLanguageSwitchAvailableBySessionId.delete(message.sessionId);
|
|
958
|
+
speakerGateBySessionId.delete(message.sessionId);
|
|
886
959
|
voiceLanguageSwitchSettingsBySessionId.delete(message.sessionId);
|
|
887
960
|
lastVoiceLanguageBySessionId.delete(message.sessionId);
|
|
888
961
|
ttsPoseAvailableBySessionId.delete(message.sessionId);
|
|
@@ -968,6 +1041,14 @@ function defineAgent(handlers) {
|
|
|
968
1041
|
handleVoiceReplayLastResult(message);
|
|
969
1042
|
return;
|
|
970
1043
|
}
|
|
1044
|
+
if (isSetSpeakerGateResultMessage(message)) {
|
|
1045
|
+
handleSetSpeakerGateResult(message);
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
if (isResetSpeakerEnrollmentResultMessage(message)) {
|
|
1049
|
+
handleResetSpeakerEnrollmentResult(message);
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
971
1052
|
if (isWebhookMessage(message)) {
|
|
972
1053
|
void agentStartReady.then(() => handleWebhookMessage(message, handlers));
|
|
973
1054
|
return;
|
|
@@ -235,6 +235,18 @@ function isVoiceLanguagePrepareResultMessage(value) {
|
|
|
235
235
|
const msg = value;
|
|
236
236
|
return msg.type === "voice_language_prepare_result" && typeof msg.requestId === "string";
|
|
237
237
|
}
|
|
238
|
+
function isSetSpeakerGateResultMessage(value) {
|
|
239
|
+
if (!value || typeof value !== "object")
|
|
240
|
+
return false;
|
|
241
|
+
const msg = value;
|
|
242
|
+
return msg.type === "setSpeakerGateResult" && typeof msg.requestId === "string";
|
|
243
|
+
}
|
|
244
|
+
function isResetSpeakerEnrollmentResultMessage(value) {
|
|
245
|
+
if (!value || typeof value !== "object")
|
|
246
|
+
return false;
|
|
247
|
+
const msg = value;
|
|
248
|
+
return msg.type === "resetSpeakerEnrollmentResult" && typeof msg.requestId === "string";
|
|
249
|
+
}
|
|
238
250
|
function isVoiceReplayLastResultMessage(value) {
|
|
239
251
|
if (!value || typeof value !== "object")
|
|
240
252
|
return false;
|
|
@@ -283,7 +295,7 @@ function isParentMessage(value) {
|
|
|
283
295
|
if (!value || typeof value !== "object")
|
|
284
296
|
return false;
|
|
285
297
|
const msg = value;
|
|
286
|
-
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "session_time_limit" || msg.type === "session_time_limit_control_ack" || msg.type === "recording_control_ack" || msg.type === "conversation_history_control_ack" || msg.type === "user_identified" || msg.type === "user_history_response" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "voice_language_control_ack" || msg.type === "voice_language_prepare_result" || msg.type === "voice_replay_last_result" || msg.type === "speak_result" || msg.type === "barge_in_control_ack" || msg.type === "agent_interrupted" || msg.type === "webhook";
|
|
298
|
+
return msg.type === "session_start" || msg.type === "speech_event" || msg.type === "session_end" || msg.type === "data_channel_message" || msg.type === "data_channel_binary" || msg.type === "idle_timeout" || msg.type === "session_time_limit" || msg.type === "session_time_limit_control_ack" || msg.type === "recording_control_ack" || msg.type === "conversation_history_control_ack" || msg.type === "user_identified" || msg.type === "user_history_response" || msg.type === "play_ack" || msg.type === "play_status_ack" || msg.type === "play_stop_ack" || msg.type === "play_pose_ack" || msg.type === "mix_control_ack" || msg.type === "stt_control_ack" || msg.type === "voice_language_control_ack" || msg.type === "voice_language_prepare_result" || msg.type === "voice_replay_last_result" || msg.type === "setSpeakerGateResult" || msg.type === "resetSpeakerEnrollmentResult" || msg.type === "speak_result" || msg.type === "barge_in_control_ack" || msg.type === "agent_interrupted" || msg.type === "webhook";
|
|
287
299
|
}
|
|
288
300
|
function isSessionScopedParentMessage(value) {
|
|
289
301
|
return isParentMessage(value) && !isWebhookMessage(value);
|
|
@@ -302,6 +314,9 @@ var endUserBySessionId = /* @__PURE__ */ new Map();
|
|
|
302
314
|
var mixAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
303
315
|
var voiceLanguageSwitchAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
304
316
|
var lastVoiceLanguageBySessionId = /* @__PURE__ */ new Map();
|
|
317
|
+
var speakerGateBySessionId = /* @__PURE__ */ new Map();
|
|
318
|
+
var pendingSpeakerGateAcks = /* @__PURE__ */ new Map();
|
|
319
|
+
var pendingSpeakerResets = /* @__PURE__ */ new Map();
|
|
305
320
|
var ttsPoseAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
306
321
|
var speakControlAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
307
322
|
var chatReplyRecordAvailableBySessionId = /* @__PURE__ */ new Map();
|
|
@@ -559,6 +574,35 @@ function handleVoiceLanguagePrepareResult(message) {
|
|
|
559
574
|
...message.language ? { language: message.language } : {}
|
|
560
575
|
});
|
|
561
576
|
}
|
|
577
|
+
function handleSetSpeakerGateResult(message) {
|
|
578
|
+
const pending = pendingSpeakerGateAcks.get(message.requestId);
|
|
579
|
+
if (!pending)
|
|
580
|
+
return;
|
|
581
|
+
clearTimeout(pending.timer);
|
|
582
|
+
pendingSpeakerGateAcks.delete(message.requestId);
|
|
583
|
+
if (message.ok) {
|
|
584
|
+
speakerGateBySessionId.set(pending.sessionId, {
|
|
585
|
+
available: true,
|
|
586
|
+
mode: message.mode,
|
|
587
|
+
bargeIn: message.bargeIn
|
|
588
|
+
});
|
|
589
|
+
pending.resolve({
|
|
590
|
+
ok: true,
|
|
591
|
+
mode: message.mode,
|
|
592
|
+
bargeIn: message.bargeIn
|
|
593
|
+
});
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
pending.resolve({ ok: false, reason: message.reason });
|
|
597
|
+
}
|
|
598
|
+
function handleResetSpeakerEnrollmentResult(message) {
|
|
599
|
+
const pending = pendingSpeakerResets.get(message.requestId);
|
|
600
|
+
if (!pending)
|
|
601
|
+
return;
|
|
602
|
+
clearTimeout(pending.timer);
|
|
603
|
+
pendingSpeakerResets.delete(message.requestId);
|
|
604
|
+
pending.resolve(message.ok ? { ok: true } : { ok: false, reason: message.reason });
|
|
605
|
+
}
|
|
562
606
|
function handleVoiceReplayLastResult(message) {
|
|
563
607
|
const pending = pendingVoiceReplays.get(message.requestId);
|
|
564
608
|
if (!pending)
|
|
@@ -660,7 +704,7 @@ function allowOutboundForSession(sessionId) {
|
|
|
660
704
|
}
|
|
661
705
|
function sendParentMessage(message) {
|
|
662
706
|
const msgType = message && typeof message === "object" && "type" in message ? message.type : void 0;
|
|
663
|
-
if (msgType === "mix_control" || msgType === "stt_control" || msgType === "voice_language_control" || msgType === "voice_language_prepare" || msgType === "voice_replay_last") {
|
|
707
|
+
if (msgType === "mix_control" || msgType === "stt_control" || msgType === "voice_language_control" || msgType === "voice_language_prepare" || msgType === "voice_replay_last" || msgType === "setSpeakerGate" || msgType === "resetSpeakerEnrollment") {
|
|
664
708
|
process.send?.(message);
|
|
665
709
|
return;
|
|
666
710
|
}
|
|
@@ -743,6 +787,20 @@ async function handleWebhookMessage(message, handlers) {
|
|
|
743
787
|
});
|
|
744
788
|
}
|
|
745
789
|
}
|
|
790
|
+
function speakerGateOf(sessionId) {
|
|
791
|
+
const gate = speakerGateBySessionId.get(sessionId);
|
|
792
|
+
return gate?.available ? { speakerGate: gate } : {};
|
|
793
|
+
}
|
|
794
|
+
var SPEAKER_VERDICTS = ["caller", "other", "unknown"];
|
|
795
|
+
function speakerFieldsOf(event) {
|
|
796
|
+
const e = event;
|
|
797
|
+
return {
|
|
798
|
+
...typeof e.speaker === "string" && SPEAKER_VERDICTS.includes(e.speaker) ? { speaker: e.speaker } : {},
|
|
799
|
+
...typeof e.speakerUnknownReason === "string" ? { speakerUnknownReason: e.speakerUnknownReason } : {},
|
|
800
|
+
...typeof e.speakerCheckWindows === "number" ? { speakerCheckWindows: e.speakerCheckWindows } : {},
|
|
801
|
+
...typeof e.speakerRechecked === "boolean" ? { speakerRechecked: e.speakerRechecked } : {}
|
|
802
|
+
};
|
|
803
|
+
}
|
|
746
804
|
function resolveUserLanguageCode(event) {
|
|
747
805
|
const withLanguage = event;
|
|
748
806
|
const candidates = [withLanguage.language, event.text];
|
|
@@ -771,6 +829,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
771
829
|
speakControlAvailableBySessionId.set(message.sessionId, message.speakControlAvailable ?? false);
|
|
772
830
|
chatReplyRecordAvailableBySessionId.set(message.sessionId, message.chatReplyRecordAvailable ?? false);
|
|
773
831
|
sessionTimeLimitAvailableBySessionId.set(message.sessionId, message.sessionTimeLimitAvailable ?? false);
|
|
832
|
+
speakerGateBySessionId.set(message.sessionId, message.speakerGate?.available === true ? message.speakerGate : { available: false });
|
|
774
833
|
if (message.voiceLanguageSwitch) {
|
|
775
834
|
voiceLanguageSwitchSettingsBySessionId.set(message.sessionId, message.voiceLanguageSwitch);
|
|
776
835
|
} else {
|
|
@@ -788,6 +847,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
788
847
|
conversationHistoryAvailable: message.conversationHistoryAvailable ?? false,
|
|
789
848
|
mixAvailable: message.mixAvailable ?? false,
|
|
790
849
|
voiceLanguageSwitchAvailable: message.voiceLanguageSwitchAvailable ?? false,
|
|
850
|
+
...speakerGateOf(message.sessionId),
|
|
791
851
|
ttsPoseAvailable: message.ttsPoseAvailable ?? false,
|
|
792
852
|
speakControlAvailable: message.speakControlAvailable ?? false,
|
|
793
853
|
sessionTimeLimitAvailable: message.sessionTimeLimitAvailable ?? false
|
|
@@ -811,6 +871,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
811
871
|
conversationHistoryAvailable: conversationHistoryAvailableBySessionId.get(message.sessionId) ?? false,
|
|
812
872
|
mixAvailable: mixAvailableBySessionId.get(message.sessionId) ?? false,
|
|
813
873
|
voiceLanguageSwitchAvailable: voiceLanguageSwitchAvailableBySessionId.get(message.sessionId) ?? false,
|
|
874
|
+
...speakerGateOf(message.sessionId),
|
|
814
875
|
ttsPoseAvailable: ttsPoseAvailableBySessionId.get(message.sessionId) ?? false,
|
|
815
876
|
speakControlAvailable: speakControlAvailableBySessionId.get(message.sessionId) ?? false,
|
|
816
877
|
sessionTimeLimitAvailable: sessionTimeLimitAvailableBySessionId.get(message.sessionId) ?? false,
|
|
@@ -827,9 +888,20 @@ async function handleParentMessage(message, handlers) {
|
|
|
827
888
|
sessionId: message.sessionId,
|
|
828
889
|
text: message.event.text.trim(),
|
|
829
890
|
...message.event.replay === true ? { replay: true } : {},
|
|
830
|
-
...utteranceId ? { utteranceId } : {}
|
|
891
|
+
...utteranceId ? { utteranceId } : {},
|
|
892
|
+
...speakerFieldsOf(message.event)
|
|
831
893
|
});
|
|
832
894
|
}
|
|
895
|
+
if (message.event.type === "user_speech_ignored") {
|
|
896
|
+
const ignored = message.event;
|
|
897
|
+
if (typeof ignored.utteranceId === "string" && ignored.reason === "speaker_mismatch") {
|
|
898
|
+
await handlers.onUserSpeechIgnored?.({
|
|
899
|
+
sessionId: message.sessionId,
|
|
900
|
+
utteranceId: ignored.utteranceId,
|
|
901
|
+
reason: ignored.reason
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
}
|
|
833
905
|
if (message.event.type === "user_language") {
|
|
834
906
|
const language = resolveUserLanguageCode(message.event);
|
|
835
907
|
if (language) {
|
|
@@ -883,6 +955,7 @@ async function handleParentMessage(message, handlers) {
|
|
|
883
955
|
endUserBySessionId.delete(message.sessionId);
|
|
884
956
|
mixAvailableBySessionId.delete(message.sessionId);
|
|
885
957
|
voiceLanguageSwitchAvailableBySessionId.delete(message.sessionId);
|
|
958
|
+
speakerGateBySessionId.delete(message.sessionId);
|
|
886
959
|
voiceLanguageSwitchSettingsBySessionId.delete(message.sessionId);
|
|
887
960
|
lastVoiceLanguageBySessionId.delete(message.sessionId);
|
|
888
961
|
ttsPoseAvailableBySessionId.delete(message.sessionId);
|
|
@@ -968,6 +1041,14 @@ function defineAgent(handlers) {
|
|
|
968
1041
|
handleVoiceReplayLastResult(message);
|
|
969
1042
|
return;
|
|
970
1043
|
}
|
|
1044
|
+
if (isSetSpeakerGateResultMessage(message)) {
|
|
1045
|
+
handleSetSpeakerGateResult(message);
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
if (isResetSpeakerEnrollmentResultMessage(message)) {
|
|
1049
|
+
handleResetSpeakerEnrollmentResult(message);
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
971
1052
|
if (isWebhookMessage(message)) {
|
|
972
1053
|
void agentStartReady.then(() => handleWebhookMessage(message, handlers));
|
|
973
1054
|
return;
|
package/eject/llm/loop.ts
CHANGED
package/package.json
CHANGED
package/templates/README.md
CHANGED
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
|
|
18
18
|
## Product vs e2e
|
|
19
19
|
|
|
20
|
-
| Kind | Dashboard create
|
|
21
|
-
| ----------- |
|
|
22
|
-
| **product** | Yes (`echo`, `echo-dc`, `voice-starter`, `language-switch`, `world-sync`, `world-sync-binary`, `game-sync`, `voice-showcase`, `recording-consent`, `positional-tts`, `spatial-showcase`, `webhooks`, `webhooks-redis`) | Yes — `dist/templates/<id>/agent.js` | Platform project create |
|
|
23
|
-
| **e2e** | No
|
|
20
|
+
| Kind | Dashboard create | Prebuilt seed bundle | Typical consumer |
|
|
21
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------- |
|
|
22
|
+
| **product** | Yes (`echo`, `echo-dc`, `voice-starter`, `language-switch`, `speaker-gate`, `world-sync`, `world-sync-binary`, `game-sync`, `voice-showcase`, `recording-consent`, `positional-tts`, `spatial-showcase`, `webhooks`, `webhooks-redis`) | Yes — `dist/templates/<id>/agent.js` | Platform project create |
|
|
23
|
+
| **e2e** | No | No — build from sources at test time | `voicethere/e2e` smokes |
|
|
24
24
|
|
|
25
25
|
Product templates always set `seedOnCreate: true`. CI fails if a product template is missing its prebuilt bundle after `npm run build`.
|
|
26
26
|
|
|
@@ -59,25 +59,26 @@ See each folder README for the wire format.
|
|
|
59
59
|
|
|
60
60
|
Each folder has its own README. Summary:
|
|
61
61
|
|
|
62
|
-
| Id
|
|
63
|
-
|
|
|
64
|
-
| `echo`
|
|
65
|
-
| `echo-dc`
|
|
66
|
-
| `voice-starter`
|
|
67
|
-
| `language-switch`
|
|
68
|
-
| `
|
|
69
|
-
| `world-sync
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `webhooks
|
|
77
|
-
| `
|
|
78
|
-
| `llm-
|
|
79
|
-
| `llm-
|
|
80
|
-
| `llm-
|
|
62
|
+
| Id | Folder | Summary |
|
|
63
|
+
| ------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| `echo` | `echo/` | Voice + chat echo |
|
|
65
|
+
| `echo-dc` | `echo-dc/` | Data-channel echo, no TTS |
|
|
66
|
+
| `voice-starter` | `voice-starter/` | Every speech event |
|
|
67
|
+
| `language-switch` | `language-switch/` | Manual `setVoiceLanguage`, or runner auto-switch with a localized echo of the recognized text |
|
|
68
|
+
| `speaker-gate` | `speaker-gate/` | Caller speaker gate: `auto` listens to the enrolled caller only, `manual` labels every speaker; switch with `setSpeakerGate` |
|
|
69
|
+
| `world-sync` | `world-sync/` | JSON pose broadcast |
|
|
70
|
+
| `world-sync-binary` | `world-sync-binary/` | Binary pose `ArrayBuffer` |
|
|
71
|
+
| `game-sync` | `game-sync/` | Authoritative sim, Redis + binary snapshots |
|
|
72
|
+
| `voice-showcase` | `voice-showcase/` | Conversational landing demo |
|
|
73
|
+
| `recording-consent` | `recording-consent/` | Recording consent flow |
|
|
74
|
+
| `positional-tts` | `positional-tts/` | Orbiting TTS |
|
|
75
|
+
| `spatial-showcase` | `spatial-showcase/` | Orbit / soundboard / proximity |
|
|
76
|
+
| `webhooks` | `webhooks/` | Inbound HMAC webhooks |
|
|
77
|
+
| `webhooks-redis` | `webhooks-redis/` | Webhooks plus Redis counter |
|
|
78
|
+
| `llm-agent` | `llm-agent/` | LLM voice and chat agent, tools, MCP, optional knowledge (RAG) |
|
|
79
|
+
| `llm-mcp-service` | `llm-mcp-service/` | `llm-agent` plus a project service that serves MCP tools |
|
|
80
|
+
| `llm-docs-rag` | `llm-docs-rag/` | `llm-agent` answering from your docs via the `docs-rag-mcp` image |
|
|
81
|
+
| `llm-support-sticky-user` | `llm-support-sticky-user/` | `llm-agent` for support: verified users get their tickets and earlier conversations |
|
|
81
82
|
|
|
82
83
|
## E2e templates
|
|
83
84
|
|