ttp-agent-sdk 2.48.11 → 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:53:22.119Z";
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.11";
21361
- var BUILD_TIME = "2026-08-20T23:53:22.119Z";
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
@@ -27091,7 +27091,31 @@ var AudioPlayer = /*#__PURE__*/function (_EventEmitter) {
27091
27091
  return flag === '1';
27092
27092
  }
27093
27093
  } catch (e) {/* non-browser env */}
27094
- return this.config.htmlAudioPlayback !== false;
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
+ }
27095
27119
  }
27096
27120
  }, {
27097
27121
  key: "_ttsSampleRate",
@@ -28414,7 +28438,8 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
28414
28438
  } catch (e) {
28415
28439
  console.log('🔧 VoiceSDK v2: ttp_hop check threw (storage blocked?):', e && e.message);
28416
28440
  }
28417
- return config.htmlAudioPlayback !== false;
28441
+ // Pass through undefined so AudioPlayer applies the platform default
28442
+ return config.htmlAudioPlayback;
28418
28443
  }(),
28419
28444
  // Protocol version
28420
28445
 
@@ -29290,7 +29315,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
29290
29315
  // iOS in-app webviews lack "Safari" in the UA (real Safari always has it).
29291
29316
  var webview = isAndroid && (/\bwv\b/.test(ua) || /Version\/[\d.]+.*Chrome/.test(ua)) || isIos && !/Safari/i.test(ua) || false;
29292
29317
  var env = {
29293
- sdkVersion: true ? "2.48.11" : 0,
29318
+ sdkVersion: true ? "2.48.12" : 0,
29294
29319
  ua: ua,
29295
29320
  platform: (uaData === null || uaData === void 0 ? void 0 : uaData.platform) || navigator.platform || '',
29296
29321
  mobile: (_uaData$mobile = uaData === null || uaData === void 0 ? void 0 : uaData.mobile) !== null && _uaData$mobile !== void 0 ? _uaData$mobile : isAndroid || isIos,
@@ -29305,7 +29330,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
29305
29330
  } catch (e) {
29306
29331
  console.warn('⚠️ VoiceSDK v2: Failed to build client env:', e);
29307
29332
  return {
29308
- sdkVersion: true ? "2.48.11" : 0
29333
+ sdkVersion: true ? "2.48.12" : 0
29309
29334
  };
29310
29335
  }
29311
29336
  }
@@ -29447,7 +29472,7 @@ var VoiceSDK_v2 = /*#__PURE__*/function (_EventEmitter) {
29447
29472
 
29448
29473
  // Include SDK build time for debugging
29449
29474
  if (true) {
29450
- helloMessage.lastBuildTime = "2026-08-20T23:53:22.119Z";
29475
+ helloMessage.lastBuildTime = "2026-08-21T00:00:00.470Z";
29451
29476
  }
29452
29477
 
29453
29478
  // Client environment (device/browser/webview) for backend logs + Langfuse metadata
@@ -33125,7 +33150,8 @@ var AgentSDK = /*#__PURE__*/function () {
33125
33150
  outputBitDepth: this.config.outputBitDepth || 16,
33126
33151
  // Default: 16-bit
33127
33152
  flavor: this.config.flavor || null,
33128
- htmlAudioPlayback: this.config.htmlAudioPlayback !== false,
33153
+ htmlAudioPlayback: this.config.htmlAudioPlayback,
33154
+ // undefined → AudioPlayer applies platform default
33129
33155
  // Shared client-tool handler map (set by TTPChatWidget so voice + text SDKs
33130
33156
  // both look up handlers in the same registration site).
33131
33157
  sharedToolHandlers: this.config.sharedToolHandlers || null,
@@ -35632,7 +35658,7 @@ var TTPChatWidget = /*#__PURE__*/function () {
35632
35658
  return;
35633
35659
  }
35634
35660
  this._ensureAboutStyles();
35635
- var version = true ? "2.48.11" : 0;
35661
+ var version = true ? "2.48.12" : 0;
35636
35662
  var convId = this._getLastConversationId();
35637
35663
  var t = function t(k, fb) {
35638
35664
  try {