@spatius/avatarkit 1.3.1-beta.6 → 1.3.1

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{AvatarDownloader-Dfi7wtgQ.js → AvatarDownloader-DyhenPKd.js} +98 -43
  3. package/dist/{AvatarSDK-CnZqa_X4.js → AvatarSDK-DgPvHU4L.js} +162 -2560
  4. package/dist/{OpusCodec-D9DcUV65.js → OpusCodec-CXU7ysrU.js} +43 -9
  5. package/dist/{OpusDecoderProxy-Ar_dFXRB.js → OpusDecoderProxy-Cq8Z_MZY.js} +19 -6
  6. package/dist/{OpusEncoderProxy-9YIZ7nIt.js → OpusEncoderProxy-CzY-VckE.js} +42 -7
  7. package/dist/{StreamingAudioPlayer-D4q7c1U0.js → StreamingAudioPlayer-CIJmBp3z.js} +2 -2
  8. package/dist/assets/{AvatarDownloader-D5GePpJ2.js → AvatarDownloader-G5FO1bVl.js} +96 -41
  9. package/dist/assets/{AvatarSDK-DR8dNylh.js → AvatarSDK-C_Anluwp.js} +149 -12
  10. package/dist/assets/{OpusDecoderWorker.worker-B7R93nev.js → OpusDecoderWorker.worker-C2T0afkj.js} +21 -5
  11. package/dist/assets/{OpusEncoderWorker.worker-BYWIV5xu.js → OpusEncoderWorker.worker-DLYO9vPK.js} +53 -11
  12. package/dist/assets/{logger-D8rDVim7.js → logger-YPooEAbA.js} +451 -132
  13. package/dist/core/AvatarController.d.ts +10 -0
  14. package/dist/{error-utils-CqKOrHrY.js → error-utils-BogEllAd.js} +1 -1
  15. package/dist/index.js +279 -46
  16. package/dist/internal-telemetry.d.ts +45 -20
  17. package/dist/internal-telemetry.js +27 -2
  18. package/dist/{logger-fAU8oahT.js → logger-BOpQ7u0w.js} +468 -132
  19. package/dist/otel-trace-Ct4T48nC.js +2565 -0
  20. package/dist/{pwa-cache-manager-CwXaM3xR.js → pwa-cache-manager-C7NbU52Q.js} +1 -1
  21. package/dist/types/index.d.ts +30 -4
  22. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
- import { h as clockSync } from "./logger-fAU8oahT.js";
1
+ import { C as recordMetric$1, g as clockSync } from "./logger-BOpQ7u0w.js";
2
+ import { a as startPlaybackTrace$1 } from "./otel-trace-Ct4T48nC.js";
2
3
  //#region internal-telemetry.ts
3
4
  /**
4
5
  * Internal telemetry surface for the companion RTC SDK.
@@ -41,5 +42,29 @@ function resolveMonoTimestamp(mono) {
41
42
  function isClockCalibrated() {
42
43
  return clockSync.isReady();
43
44
  }
45
+ /**
46
+ * Open one round's trace: `driven.request` → `playback` → the caller's spans.
47
+ *
48
+ * Shared with the RTC SDK rather than reimplemented there, so both packages
49
+ * emit the same tree. The root's ids derive from the conversation id, which is
50
+ * what lets the backend's spans join a round without threading state through;
51
+ * reproducing that separately would mean two definitions of one wire contract.
52
+ */
53
+ function startPlaybackTrace(conversationId, startTimeMs, attrs = {}) {
54
+ return startPlaybackTrace$1(conversationId, startTimeMs, attrs);
55
+ }
56
+ /**
57
+ * Record one measurement onto avatarkit's metric pipeline.
58
+ *
59
+ * Must go through here rather than the RTC SDK reaching for the global meter
60
+ * itself: a metrics export is skipped entirely unless that round carried real
61
+ * business data, and the flag saying so lives in this module. A histogram
62
+ * written directly through the global provider lands in the same instrument but
63
+ * leaves the flag clear, so the whole batch — RTC's readings included — is
64
+ * dropped before it is sent.
65
+ */
66
+ function recordMetric(name, value, attributes = {}) {
67
+ recordMetric$1(name, value, attributes);
68
+ }
44
69
  //#endregion
45
- export { isClockCalibrated, resolveMonoTimestamp };
70
+ export { isClockCalibrated, recordMetric, resolveMonoTimestamp, startPlaybackTrace };