ttp-agent-sdk 2.48.9 → 2.48.11
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 +34 -8
- package/dist/agent-widget.esm.js +1 -1
- package/dist/agent-widget.js +1 -1
- package/package.json +1 -1
package/dist/agent-widget.dev.js
CHANGED
|
@@ -12047,7 +12047,7 @@ var TextChatSDK = /*#__PURE__*/function (_EventEmitter) {
|
|
|
12047
12047
|
|
|
12048
12048
|
// SDK build time for debugging
|
|
12049
12049
|
if (true) {
|
|
12050
|
-
helloMessage.lastBuildTime = "2026-08-20T23:
|
|
12050
|
+
helloMessage.lastBuildTime = "2026-08-20T23:53:22.119Z";
|
|
12051
12051
|
}
|
|
12052
12052
|
try {
|
|
12053
12053
|
this.ws.send(JSON.stringify(helloMessage));
|
|
@@ -21357,8 +21357,8 @@ var VoiceSDK = _v2_VoiceSDK_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
|
21357
21357
|
|
|
21358
21358
|
|
|
21359
21359
|
// Version - injected at build time from package.json via webpack DefinePlugin
|
|
21360
|
-
var VERSION = "2.48.
|
|
21361
|
-
var BUILD_TIME = "2026-08-20T23:
|
|
21360
|
+
var VERSION = "2.48.11";
|
|
21361
|
+
var BUILD_TIME = "2026-08-20T23:53:22.119Z";
|
|
21362
21362
|
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;');
|
|
21363
21363
|
|
|
21364
21364
|
// Named exports
|
|
@@ -27082,6 +27082,15 @@ var AudioPlayer = /*#__PURE__*/function (_EventEmitter) {
|
|
|
27082
27082
|
}, {
|
|
27083
27083
|
key: "wantsHtmlAudioPlayback",
|
|
27084
27084
|
value: function wantsHtmlAudioPlayback() {
|
|
27085
|
+
// Debug/QA override: ?ttp_hop=0|1 or localStorage 'ttp_hop' forces the route
|
|
27086
|
+
// at the decision point, regardless of which config object reached us.
|
|
27087
|
+
try {
|
|
27088
|
+
var _URLSearchParams$get;
|
|
27089
|
+
var flag = (_URLSearchParams$get = new URLSearchParams(window.location.search).get('ttp_hop')) !== null && _URLSearchParams$get !== void 0 ? _URLSearchParams$get : window.localStorage.getItem('ttp_hop');
|
|
27090
|
+
if (flag === '0' || flag === '1') {
|
|
27091
|
+
return flag === '1';
|
|
27092
|
+
}
|
|
27093
|
+
} catch (e) {/* non-browser env */}
|
|
27085
27094
|
return this.config.htmlAudioPlayback !== false;
|
|
27086
27095
|
}
|
|
27087
27096
|
}, {
|
|
@@ -28389,7 +28398,24 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
|
|
|
28389
28398
|
audioConstraints: config.audioConstraints || null,
|
|
28390
28399
|
// Last-hop TTS playback via hidden <audio> (AEC far-end). Default on.
|
|
28391
28400
|
// Set false to fall back to AudioContext.destination (old path).
|
|
28392
|
-
|
|
28401
|
+
// QA/debug override wins over config: ?ttp_hop=0 / localStorage ttp_hop=0
|
|
28402
|
+
// forces AudioContext.destination; =1 forces the HTML hop.
|
|
28403
|
+
htmlAudioPlayback: function () {
|
|
28404
|
+
try {
|
|
28405
|
+
var _URLSearchParams$get;
|
|
28406
|
+
var flag = (_URLSearchParams$get = new URLSearchParams(window.location.search).get('ttp_hop')) !== null && _URLSearchParams$get !== void 0 ? _URLSearchParams$get : window.localStorage.getItem('ttp_hop');
|
|
28407
|
+
if (flag === '0' || flag === '1') {
|
|
28408
|
+
console.log("\uD83D\uDD27 VoiceSDK v2: ttp_hop override=".concat(flag, " \u2192 htmlAudioPlayback=").concat(flag === '1'));
|
|
28409
|
+
return flag === '1';
|
|
28410
|
+
}
|
|
28411
|
+
if (flag !== null && flag !== undefined) {
|
|
28412
|
+
console.log("\uD83D\uDD27 VoiceSDK v2: ttp_hop ignored (value '".concat(flag, "', expected '0' or '1')"));
|
|
28413
|
+
}
|
|
28414
|
+
} catch (e) {
|
|
28415
|
+
console.log('🔧 VoiceSDK v2: ttp_hop check threw (storage blocked?):', e && e.message);
|
|
28416
|
+
}
|
|
28417
|
+
return config.htmlAudioPlayback !== false;
|
|
28418
|
+
}(),
|
|
28393
28419
|
// Protocol version
|
|
28394
28420
|
|
|
28395
28421
|
protocolVersion: config.protocolVersion || 2,
|
|
@@ -29264,7 +29290,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
|
|
|
29264
29290
|
// iOS in-app webviews lack "Safari" in the UA (real Safari always has it).
|
|
29265
29291
|
var webview = isAndroid && (/\bwv\b/.test(ua) || /Version\/[\d.]+.*Chrome/.test(ua)) || isIos && !/Safari/i.test(ua) || false;
|
|
29266
29292
|
var env = {
|
|
29267
|
-
sdkVersion: true ? "2.48.
|
|
29293
|
+
sdkVersion: true ? "2.48.11" : 0,
|
|
29268
29294
|
ua: ua,
|
|
29269
29295
|
platform: (uaData === null || uaData === void 0 ? void 0 : uaData.platform) || navigator.platform || '',
|
|
29270
29296
|
mobile: (_uaData$mobile = uaData === null || uaData === void 0 ? void 0 : uaData.mobile) !== null && _uaData$mobile !== void 0 ? _uaData$mobile : isAndroid || isIos,
|
|
@@ -29279,7 +29305,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
|
|
|
29279
29305
|
} catch (e) {
|
|
29280
29306
|
console.warn('⚠️ VoiceSDK v2: Failed to build client env:', e);
|
|
29281
29307
|
return {
|
|
29282
|
-
sdkVersion: true ? "2.48.
|
|
29308
|
+
sdkVersion: true ? "2.48.11" : 0
|
|
29283
29309
|
};
|
|
29284
29310
|
}
|
|
29285
29311
|
}
|
|
@@ -29421,7 +29447,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
|
|
|
29421
29447
|
|
|
29422
29448
|
// Include SDK build time for debugging
|
|
29423
29449
|
if (true) {
|
|
29424
|
-
helloMessage.lastBuildTime = "2026-08-20T23:
|
|
29450
|
+
helloMessage.lastBuildTime = "2026-08-20T23:53:22.119Z";
|
|
29425
29451
|
}
|
|
29426
29452
|
|
|
29427
29453
|
// Client environment (device/browser/webview) for backend logs + Langfuse metadata
|
|
@@ -35606,7 +35632,7 @@ var TTPChatWidget = /*#__PURE__*/function () {
|
|
|
35606
35632
|
return;
|
|
35607
35633
|
}
|
|
35608
35634
|
this._ensureAboutStyles();
|
|
35609
|
-
var version = true ? "2.48.
|
|
35635
|
+
var version = true ? "2.48.11" : 0;
|
|
35610
35636
|
var convId = this._getLastConversationId();
|
|
35611
35637
|
var t = function t(k, fb) {
|
|
35612
35638
|
try {
|