@spatius/avatarkit 1.3.6 → 1.3.7

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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.3.7] - 2026-08-17
9
+
10
+ ### Fixed
11
+ - Internal telemetry only, no change to public API or runtime behaviour: diagnostic records now carry this SDK's own version alongside the reporting one. A companion SDK built on top of this one declares its own identity, which replaced the version outright, so records from those integrations gave no indication of which renderer produced them.
12
+ - Internal telemetry only, no change to public API or runtime behaviour: the client environment fields (page host, locale, screen and viewport size) are now available to companion SDKs, whose records previously carried none of them.
13
+
8
14
  ## [1.3.6] - 2026-08-15
9
15
 
10
16
  ### Fixed
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as __toESM, t as __commonJSMin } from "./rolldown-runtime-FDOR9p9I.js";
2
- import { $ as DEFAULT_REGION, A as clockSync, B as OTEL_LOGS_ENDPOINT, C as logMetric, D as monoMarkFrom, E as initializeOtel, F as recordHttpClientDuration, G as idManager, H as OTEL_STREAM_NAME, I as recordMetric, J as AvatarError, K as generateTraceId, L as getSdkPackage, M as hostOf, N as cleanupOtelMetrics, O as monoTimestamp, P as initializeOtelMetrics, Q as DEFAULT_OPUS_BITRATE, R as resolveSdkVersion, S as logEvent, T as cleanupOtel, U as OTEL_USERNAME, V as OTEL_PASSWORD, W as isDebugMode, X as ConnectionState, Y as AvatarState, Z as ConversationState, _ as logSink, a as startLoadTrace, at as LogLevel, b as getLogsFeatureFlag, c as AudioFormat, ct as TransitionType, d as MessageType, et as DEFAULT_REGION_REQUEST, f as TransportCompression, g as setLogLevel, h as logger, i as startInitTrace, it as LoadProgress, j as fetchBootstrap, k as resolveMarks, l as EgressType, lt as requireSDK, m as BinaryWriter, n as initializeOtelTrace, nt as ErrorCode, o as startPlaybackTrace, ot as RENDER_QUALITY_PARAMS, p as BinaryReader, q as AnimationType, r as startConnectTrace, rt as FrameStarvationMode, s as buildTraceparent, st as RenderQuality, t as cleanupOtelTrace, tt as DrivingServiceMode, u as Message, ut as setSDKRef, v as cleanupPostHog, w as updatePostHogPersonPropertiesForFlags, x as initializePostHog, y as clientContextFields } from "./otel-trace-B4E2lODB.js";
2
+ import { $ as DEFAULT_REGION, A as clockSync, B as OTEL_LOGS_ENDPOINT, C as logMetric, D as monoMarkFrom, E as initializeOtel, F as recordHttpClientDuration, G as idManager, H as OTEL_STREAM_NAME, I as recordMetric, J as AvatarError, K as generateTraceId, L as getSdkPackage, M as hostOf, N as cleanupOtelMetrics, O as monoTimestamp, P as initializeOtelMetrics, Q as DEFAULT_OPUS_BITRATE, R as resolveSdkVersion, S as logEvent, T as cleanupOtel, U as OTEL_USERNAME, V as OTEL_PASSWORD, W as isDebugMode, X as ConnectionState, Y as AvatarState, Z as ConversationState, _ as logSink, a as startLoadTrace, at as LogLevel, b as getLogsFeatureFlag, c as AudioFormat, ct as TransitionType, d as MessageType, et as DEFAULT_REGION_REQUEST, f as TransportCompression, g as setLogLevel, h as logger, i as startInitTrace, it as LoadProgress, j as fetchBootstrap, k as resolveMarks, l as EgressType, lt as requireSDK, m as BinaryWriter, n as initializeOtelTrace, nt as ErrorCode, o as startPlaybackTrace, ot as RENDER_QUALITY_PARAMS, p as BinaryReader, q as AnimationType, r as startConnectTrace, rt as FrameStarvationMode, s as buildTraceparent, st as RenderQuality, t as cleanupOtelTrace, tt as DrivingServiceMode, u as Message, ut as setSDKRef, v as cleanupPostHog, w as updatePostHogPersonPropertiesForFlags, x as initializePostHog, y as clientContextFields } from "./otel-trace-Y_BtH06z.js";
3
3
  //#region core/Avatar.ts
4
4
  var Avatar = class {
5
5
  id;
@@ -45730,7 +45730,7 @@ var AvatarSDK = class {
45730
45730
  static _initializationState = "uninitialized";
45731
45731
  static _initializingPromise = null;
45732
45732
  static _configuration = null;
45733
- static _version = "1.3.6";
45733
+ static _version = "1.3.7";
45734
45734
  static _avatarCore = null;
45735
45735
  static _cachedDeviceScore = null;
45736
45736
  static _rendererBackend = null;
@@ -79,6 +79,24 @@ export declare function peekTraceparent(rawMessage: Uint8Array): string | undefi
79
79
  * dropped before it is sent.
80
80
  */
81
81
  export declare function recordMetric(name: string, value: number, attributes?: Attributes): void;
82
+ /**
83
+ * The client environment fields this SDK stamps on every OTel log record —
84
+ * `host`, `domain`, `url`, `pathname`, `referrer`, `user_agent`, `locale`,
85
+ * screen/viewport size and `timezone`.
86
+ *
87
+ * Shared with the RTC SDK rather than re-derived there. These are record-level
88
+ * fields, not Resource attributes: they are read from `window.location` at emit
89
+ * time because `url`/`pathname` change as a single-page app routes. Sharing the
90
+ * OTel providers therefore does not carry them across — the RTC SDK emits
91
+ * through its own logger and would report no `host` at all, which is what
92
+ * prompted this export. Re-implementing the collection on that side would let
93
+ * the two drift apart in field names and in how each value is read, and the
94
+ * backend aggregates on exactly these names.
95
+ *
96
+ * Call at emit time, once per record; spread the result before the caller's own
97
+ * properties so an explicit value at the call site still wins.
98
+ */
99
+ export declare function clientContextFields(): Record<string, string | number>;
82
100
  /**
83
101
  * Declare which SDK these records come from, as the `sdk.package` and
84
102
  * `sdk.version` resource attributes.
@@ -1,4 +1,4 @@
1
- import { A as clockSync, I as recordMetric$1, o as startPlaybackTrace$1, u as Message, z as setSdkIdentity$1 } from "./otel-trace-B4E2lODB.js";
1
+ import { A as clockSync, I as recordMetric$1, o as startPlaybackTrace$1, u as Message, y as clientContextFields$1, z as setSdkIdentity$1 } from "./otel-trace-Y_BtH06z.js";
2
2
  //#region internal-telemetry.ts
3
3
  /**
4
4
  * Internal telemetry surface for the companion RTC SDK.
@@ -91,6 +91,26 @@ function recordMetric(name, value, attributes = {}) {
91
91
  recordMetric$1(name, value, attributes);
92
92
  }
93
93
  /**
94
+ * The client environment fields this SDK stamps on every OTel log record —
95
+ * `host`, `domain`, `url`, `pathname`, `referrer`, `user_agent`, `locale`,
96
+ * screen/viewport size and `timezone`.
97
+ *
98
+ * Shared with the RTC SDK rather than re-derived there. These are record-level
99
+ * fields, not Resource attributes: they are read from `window.location` at emit
100
+ * time because `url`/`pathname` change as a single-page app routes. Sharing the
101
+ * OTel providers therefore does not carry them across — the RTC SDK emits
102
+ * through its own logger and would report no `host` at all, which is what
103
+ * prompted this export. Re-implementing the collection on that side would let
104
+ * the two drift apart in field names and in how each value is read, and the
105
+ * backend aggregates on exactly these names.
106
+ *
107
+ * Call at emit time, once per record; spread the result before the caller's own
108
+ * properties so an explicit value at the call site still wins.
109
+ */
110
+ function clientContextFields() {
111
+ return clientContextFields$1();
112
+ }
113
+ /**
94
114
  * Declare which SDK these records come from, as the `sdk.package` and
95
115
  * `sdk.version` resource attributes.
96
116
  *
@@ -117,4 +137,4 @@ function setSdkIdentity(identity) {
117
137
  setSdkIdentity$1(identity);
118
138
  }
119
139
  //#endregion
120
- export { isClockCalibrated, peekTraceparent, recordMetric, resolveMonoTimestamp, setSdkIdentity, startPlaybackTrace };
140
+ export { clientContextFields, isClockCalibrated, peekTraceparent, recordMetric, resolveMonoTimestamp, setSdkIdentity, startPlaybackTrace };
@@ -14960,6 +14960,7 @@ function initializeOtelMetrics(version, resourceAttrs) {
14960
14960
  "sdk.version": resolveSdkVersion(sdkVersion$3),
14961
14961
  "sdk.platform": "web",
14962
14962
  "sdk.package": getSdkPackage(),
14963
+ "render_sdk_version": sdkVersion$3,
14963
14964
  "app_id": resourceAttrs.appId || "",
14964
14965
  "region": resourceAttrs.region,
14965
14966
  "dsm": resourceAttrs.dsm
@@ -15718,6 +15719,7 @@ function initializeOtel(version, resourceAttrs) {
15718
15719
  "sdk.version": resolveSdkVersion(sdkVersion$2),
15719
15720
  "sdk.platform": "web",
15720
15721
  "sdk.package": getSdkPackage(),
15722
+ "render_sdk_version": sdkVersion$2,
15721
15723
  "app_id": resourceAttrs.appId || "",
15722
15724
  "region": resourceAttrs.region,
15723
15725
  "dsm": resourceAttrs.dsm
@@ -20389,6 +20391,7 @@ function initializeOtelTrace(version, resourceAttrs) {
20389
20391
  "sdk.version": resolveSdkVersion(sdkVersion),
20390
20392
  "sdk.platform": "web",
20391
20393
  "sdk.package": getSdkPackage(),
20394
+ "render_sdk_version": sdkVersion,
20392
20395
  "app_id": resourceAttrs.appId || "",
20393
20396
  "region": resourceAttrs.region,
20394
20397
  "dsm": resourceAttrs.dsm,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spatius/avatarkit",
3
3
  "type": "module",
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "packageManager": "pnpm@10.18.2",
6
6
  "description": "AvatarKit — real-time, audio-driven avatar rendering SDK for Web.",
7
7
  "homepage": "https://spatius.ai/",