@vivix-ai/ivi-frontend-sdk 0.3.11 → 0.3.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.
package/dist/index.js CHANGED
@@ -2555,7 +2555,7 @@ var IviRuntimeCoordinator = class {
2555
2555
  async start() {
2556
2556
  const telemetrySpan = startIviTelemetrySpan("sdk.runtime.start", this.config.telemetry, {
2557
2557
  "ivi.runtime.status": this.state.status,
2558
- "ivi.session.id": this.state.session?.id
2558
+ "session.id": this.state.session?.id
2559
2559
  });
2560
2560
  try {
2561
2561
  this.setState({
@@ -2566,13 +2566,13 @@ var IviRuntimeCoordinator = class {
2566
2566
  await this.client.connect();
2567
2567
  endIviTelemetrySpan(telemetrySpan.span, {
2568
2568
  "ivi.runtime.status": this.state.status,
2569
- "ivi.session.id": this.state.session?.id
2569
+ "session.id": this.state.session?.id
2570
2570
  });
2571
2571
  } catch (error) {
2572
2572
  this.stop();
2573
2573
  failIviTelemetrySpan(telemetrySpan.span, error, {
2574
2574
  "ivi.runtime.status": this.state.status,
2575
- "ivi.session.id": this.state.session?.id
2575
+ "session.id": this.state.session?.id
2576
2576
  });
2577
2577
  throw error;
2578
2578
  }
@@ -2583,7 +2583,7 @@ var IviRuntimeCoordinator = class {
2583
2583
  stop() {
2584
2584
  const telemetrySpan = startIviTelemetrySpan("sdk.runtime.stop", this.config.telemetry, {
2585
2585
  "ivi.runtime.status": this.state.status,
2586
- "ivi.session.id": this.state.session?.id
2586
+ "session.id": this.state.session?.id
2587
2587
  });
2588
2588
  try {
2589
2589
  this.dispatcher.stop();
@@ -2595,7 +2595,7 @@ var IviRuntimeCoordinator = class {
2595
2595
  } catch (error) {
2596
2596
  failIviTelemetrySpan(telemetrySpan.span, error, {
2597
2597
  "ivi.runtime.status": this.state.status,
2598
- "ivi.session.id": this.state.session?.id
2598
+ "session.id": this.state.session?.id
2599
2599
  });
2600
2600
  throw error;
2601
2601
  }
@@ -3207,7 +3207,7 @@ async function createIVISession(request, options) {
3207
3207
  const result = normalizeCreateIVISessionResponse(responseBody, request, requestBody);
3208
3208
  endIviTelemetrySpan(telemetrySpan.span, {
3209
3209
  "http.response.status_code": response.status,
3210
- "ivi.session.id": result.iviSessionId,
3210
+ "session.id": result.iviSessionId,
3211
3211
  "ivi.prebuild.playback.kind": result.prebuiltPlayback?.kind
3212
3212
  });
3213
3213
  return result;
@@ -3219,14 +3219,18 @@ async function createIVISession(request, options) {
3219
3219
  }
3220
3220
  }
3221
3221
  function createRuntimeFromSession(session, options = {}) {
3222
+ const fastStartEnabled = options.fastStart !== false;
3223
+ const fastStartApplied = fastStartEnabled && Boolean(session.prebuiltPlayback);
3222
3224
  const telemetrySpan = startIviTelemetrySpan("sdk.runtime.create", options.telemetry, {
3223
- "ivi.session.id": session.iviSessionId,
3224
- "ivi.prebuild.playback.kind": session.prebuiltPlayback?.kind
3225
+ "session.id": session.iviSessionId,
3226
+ "ivi.prebuild.playback.kind": session.prebuiltPlayback?.kind,
3227
+ "ivi.fast_start.enabled": fastStartEnabled,
3228
+ "ivi.fast_start.applied": fastStartApplied
3225
3229
  });
3226
3230
  try {
3227
3231
  const websocketUrl = buildWebSocketUrl(session.endpoint, options.websocket);
3228
3232
  const childTelemetry = withIviTelemetryContext(options.telemetry, telemetrySpan.context, {
3229
- "ivi.session.id": session.iviSessionId
3233
+ "session.id": session.iviSessionId
3230
3234
  });
3231
3235
  const clientTelemetry = mergeIviTelemetryOptions(
3232
3236
  options.clientConfig?.telemetry,
@@ -3250,7 +3254,7 @@ function createRuntimeFromSession(session, options = {}) {
3250
3254
  ...options.runtimeConfig ?? {},
3251
3255
  telemetry: runtimeTelemetry
3252
3256
  });
3253
- if (options.fastStart !== false && session.prebuiltPlayback) {
3257
+ if (fastStartEnabled && session.prebuiltPlayback) {
3254
3258
  runtime.setBootstrapSource(toBootstrapSource(session.prebuiltPlayback, options));
3255
3259
  }
3256
3260
  endIviTelemetrySpan(telemetrySpan.span);