ttp-agent-sdk 2.46.2 → 2.46.3
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/agent-widget.dev.js
CHANGED
|
@@ -11993,7 +11993,7 @@ var TextChatSDK = /*#__PURE__*/function (_EventEmitter) {
|
|
|
11993
11993
|
|
|
11994
11994
|
// SDK build time for debugging
|
|
11995
11995
|
if (true) {
|
|
11996
|
-
helloMessage.lastBuildTime = "2026-07-13T09:
|
|
11996
|
+
helloMessage.lastBuildTime = "2026-07-13T09:55:44.731Z";
|
|
11997
11997
|
}
|
|
11998
11998
|
try {
|
|
11999
11999
|
this.ws.send(JSON.stringify(helloMessage));
|
|
@@ -21205,8 +21205,8 @@ var VoiceSDK = _v2_VoiceSDK_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
|
21205
21205
|
|
|
21206
21206
|
|
|
21207
21207
|
// Version - injected at build time from package.json via webpack DefinePlugin
|
|
21208
|
-
var VERSION = "2.46.
|
|
21209
|
-
var BUILD_TIME = "2026-07-13T09:
|
|
21208
|
+
var VERSION = "2.46.3";
|
|
21209
|
+
var BUILD_TIME = "2026-07-13T09:55:44.731Z";
|
|
21210
21210
|
console.log("%c TTP Agent SDK v".concat(VERSION, " (").concat(BUILD_TIME, ") "), 'background: #4f46e5; color: white; font-size: 12px; font-weight: bold; padding: 2px 6px; border-radius: 4px;');
|
|
21211
21211
|
|
|
21212
21212
|
// Named exports
|
|
@@ -27491,6 +27491,28 @@ var AudioPlayer = /*#__PURE__*/function (_EventEmitter) {
|
|
|
27491
27491
|
* Mark that a new sentence is starting.
|
|
27492
27492
|
* Call this when audio_start is received, before audio chunks arrive.
|
|
27493
27493
|
*/
|
|
27494
|
+
/**
|
|
27495
|
+
* Clear the stopped flag and reset scheduling state WITHOUT a new sentence marker.
|
|
27496
|
+
* Monitor (listen-only supervision) streams have no audio_start messages, so after a
|
|
27497
|
+
* relayed stop_playing flush nothing would ever clear _isStopped and all later audio
|
|
27498
|
+
* would be rejected. The SDK calls this when the next binary frame arrives — WS
|
|
27499
|
+
* ordering guarantees it is live post-barge-in audio.
|
|
27500
|
+
*/
|
|
27501
|
+
}, {
|
|
27502
|
+
key: "resumeAfterStop",
|
|
27503
|
+
value: function resumeAfterStop() {
|
|
27504
|
+
if (!this._isStopped) {
|
|
27505
|
+
return;
|
|
27506
|
+
}
|
|
27507
|
+
console.log('▶️ AudioPlayer: resumeAfterStop - clearing stopped flag (no sentence marker)');
|
|
27508
|
+
this._isStopped = false;
|
|
27509
|
+
// Same reset as markNewSentence's post-barge-in branch: schedule fresh, drop leftovers.
|
|
27510
|
+
this.nextStartTime = 0;
|
|
27511
|
+
this.scheduledBuffers = 0;
|
|
27512
|
+
this.preparedBuffer = [];
|
|
27513
|
+
this.pcmChunkQueue = [];
|
|
27514
|
+
this.isProcessingPcmQueue = false;
|
|
27515
|
+
}
|
|
27494
27516
|
}, {
|
|
27495
27517
|
key: "markNewSentence",
|
|
27496
27518
|
value: function markNewSentence(text, synced, segmentId) {
|
|
@@ -28887,7 +28909,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
|
|
|
28887
28909
|
|
|
28888
28910
|
// Include SDK build time for debugging
|
|
28889
28911
|
if (true) {
|
|
28890
|
-
helloMessage.lastBuildTime = "2026-07-13T09:
|
|
28912
|
+
helloMessage.lastBuildTime = "2026-07-13T09:55:44.731Z";
|
|
28891
28913
|
}
|
|
28892
28914
|
|
|
28893
28915
|
// Page context is intentionally NOT attached to the hello message.
|
|
@@ -30111,6 +30133,15 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
|
|
|
30111
30133
|
return _regenerator().w(function (_context7) {
|
|
30112
30134
|
while (1) switch (_context7.p = _context7.n) {
|
|
30113
30135
|
case 0:
|
|
30136
|
+
// Monitor (listen-only supervision): no audio_start messages exist to clear the
|
|
30137
|
+
// player's stopped flag after a relayed stop_playing (caller barge-in flush), so
|
|
30138
|
+
// resume on the next binary frame — the server emits in order, so anything after
|
|
30139
|
+
// the stop marker is live post-barge-in audio.
|
|
30140
|
+
if (this.isMonitor() && this.audioPlayer && this.audioPlayer._isStopped) {
|
|
30141
|
+
this.audioPlayer.resumeAfterStop();
|
|
30142
|
+
}
|
|
30143
|
+
|
|
30144
|
+
// Convert Blob to ArrayBuffer if needed
|
|
30114
30145
|
if (!(data instanceof Blob)) {
|
|
30115
30146
|
_context7.n = 2;
|
|
30116
30147
|
break;
|
|
@@ -34914,7 +34945,7 @@ var TTPChatWidget = /*#__PURE__*/function () {
|
|
|
34914
34945
|
return;
|
|
34915
34946
|
}
|
|
34916
34947
|
this._ensureAboutStyles();
|
|
34917
|
-
var version = true ? "2.46.
|
|
34948
|
+
var version = true ? "2.46.3" : 0;
|
|
34918
34949
|
var convId = this._getLastConversationId();
|
|
34919
34950
|
var t = function t(k, fb) {
|
|
34920
34951
|
try {
|