ttp-agent-sdk 2.48.10 → 2.48.12

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.
@@ -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:29:16.481Z";
12050
+ helloMessage.lastBuildTime = "2026-08-21T00:00:00.470Z";
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.10";
21361
- var BUILD_TIME = "2026-08-20T23:29:16.481Z";
21360
+ var VERSION = "2.48.12";
21361
+ var BUILD_TIME = "2026-08-21T00:00:00.470Z";
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,7 +27082,40 @@ var AudioPlayer = /*#__PURE__*/function (_EventEmitter) {
27082
27082
  }, {
27083
27083
  key: "wantsHtmlAudioPlayback",
27084
27084
  value: function wantsHtmlAudioPlayback() {
27085
- return this.config.htmlAudioPlayback !== false;
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 */}
27094
+ if (typeof this.config.htmlAudioPlayback === 'boolean') {
27095
+ return this.config.htmlAudioPlayback;
27096
+ }
27097
+ // Default: the hop (AudioContext → MediaStreamDestination → HTMLAudioElement)
27098
+ // gives Chrome's AEC a far-end reference, but Chrome plays that live stream
27099
+ // with adaptive jitter-buffer speed control, which audibly wobbles on
27100
+ // desktop Linux (PipeWire/PulseAudio). Off there, on elsewhere.
27101
+ var hopOn = !this._isDesktopLinux();
27102
+ if (!this._hopDefaultLogged) {
27103
+ this._hopDefaultLogged = true;
27104
+ console.log("\uD83D\uDD0A AudioPlayer: htmlAudioPlayback default \u2192 ".concat(hopOn ? 'on (AEC far-end route)' : 'off (desktop Linux: hop causes playback speed wobble)'));
27105
+ }
27106
+ return hopOn;
27107
+ }
27108
+ }, {
27109
+ key: "_isDesktopLinux",
27110
+ value: function _isDesktopLinux() {
27111
+ try {
27112
+ var ua = navigator.userAgent || '';
27113
+ if (/Android|iPhone|iPad|iPod/i.test(ua)) return false;
27114
+ var platform = navigator.userAgentData && navigator.userAgentData.platform || navigator.platform || '';
27115
+ return /linux/i.test(platform) || /Linux|X11/i.test(ua);
27116
+ } catch (e) {
27117
+ return false;
27118
+ }
27086
27119
  }
27087
27120
  }, {
27088
27121
  key: "_ttsSampleRate",
@@ -28399,8 +28432,14 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
28399
28432
  console.log("\uD83D\uDD27 VoiceSDK v2: ttp_hop override=".concat(flag, " \u2192 htmlAudioPlayback=").concat(flag === '1'));
28400
28433
  return flag === '1';
28401
28434
  }
28402
- } catch (e) {/* non-browser env */}
28403
- return config.htmlAudioPlayback !== false;
28435
+ if (flag !== null && flag !== undefined) {
28436
+ console.log("\uD83D\uDD27 VoiceSDK v2: ttp_hop ignored (value '".concat(flag, "', expected '0' or '1')"));
28437
+ }
28438
+ } catch (e) {
28439
+ console.log('🔧 VoiceSDK v2: ttp_hop check threw (storage blocked?):', e && e.message);
28440
+ }
28441
+ // Pass through undefined so AudioPlayer applies the platform default
28442
+ return config.htmlAudioPlayback;
28404
28443
  }(),
28405
28444
  // Protocol version
28406
28445
 
@@ -29276,7 +29315,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
29276
29315
  // iOS in-app webviews lack "Safari" in the UA (real Safari always has it).
29277
29316
  var webview = isAndroid && (/\bwv\b/.test(ua) || /Version\/[\d.]+.*Chrome/.test(ua)) || isIos && !/Safari/i.test(ua) || false;
29278
29317
  var env = {
29279
- sdkVersion: true ? "2.48.10" : 0,
29318
+ sdkVersion: true ? "2.48.12" : 0,
29280
29319
  ua: ua,
29281
29320
  platform: (uaData === null || uaData === void 0 ? void 0 : uaData.platform) || navigator.platform || '',
29282
29321
  mobile: (_uaData$mobile = uaData === null || uaData === void 0 ? void 0 : uaData.mobile) !== null && _uaData$mobile !== void 0 ? _uaData$mobile : isAndroid || isIos,
@@ -29291,7 +29330,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
29291
29330
  } catch (e) {
29292
29331
  console.warn('⚠️ VoiceSDK v2: Failed to build client env:', e);
29293
29332
  return {
29294
- sdkVersion: true ? "2.48.10" : 0
29333
+ sdkVersion: true ? "2.48.12" : 0
29295
29334
  };
29296
29335
  }
29297
29336
  }
@@ -29433,7 +29472,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
29433
29472
 
29434
29473
  // Include SDK build time for debugging
29435
29474
  if (true) {
29436
- helloMessage.lastBuildTime = "2026-08-20T23:29:16.481Z";
29475
+ helloMessage.lastBuildTime = "2026-08-21T00:00:00.470Z";
29437
29476
  }
29438
29477
 
29439
29478
  // Client environment (device/browser/webview) for backend logs + Langfuse metadata
@@ -33111,7 +33150,8 @@ var AgentSDK = /*#__PURE__*/function () {
33111
33150
  outputBitDepth: this.config.outputBitDepth || 16,
33112
33151
  // Default: 16-bit
33113
33152
  flavor: this.config.flavor || null,
33114
- htmlAudioPlayback: this.config.htmlAudioPlayback !== false,
33153
+ htmlAudioPlayback: this.config.htmlAudioPlayback,
33154
+ // undefined → AudioPlayer applies platform default
33115
33155
  // Shared client-tool handler map (set by TTPChatWidget so voice + text SDKs
33116
33156
  // both look up handlers in the same registration site).
33117
33157
  sharedToolHandlers: this.config.sharedToolHandlers || null,
@@ -35618,7 +35658,7 @@ var TTPChatWidget = /*#__PURE__*/function () {
35618
35658
  return;
35619
35659
  }
35620
35660
  this._ensureAboutStyles();
35621
- var version = true ? "2.48.10" : 0;
35661
+ var version = true ? "2.48.12" : 0;
35622
35662
  var convId = this._getLastConversationId();
35623
35663
  var t = function t(k, fb) {
35624
35664
  try {