@absolutejs/voice 0.0.22-beta.284 → 0.0.22-beta.285

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 (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27857,6 +27857,7 @@ var voiceOperationsRecordHref = (base, sessionId) => {
27857
27857
  };
27858
27858
  var buildOperationsRecordLinks = (input) => {
27859
27859
  const failedSessionSet = new Set(input.failedSessionIds);
27860
+ const minLiveLatencyAt = typeof input.liveLatencyMaxAgeMs === "number" && Number.isFinite(input.liveLatencyMaxAgeMs) && input.liveLatencyMaxAgeMs > 0 ? Date.now() - input.liveLatencyMaxAgeMs : undefined;
27860
27861
  const providerErrors = input.events.filter((event) => event.type === "session.error" && (event.payload.providerStatus === "error" || typeof event.payload.error === "string")).map((event) => ({
27861
27862
  detail: getString18(event.payload.error),
27862
27863
  href: voiceOperationsRecordHref(input.base, event.sessionId),
@@ -27864,7 +27865,7 @@ var buildOperationsRecordLinks = (input) => {
27864
27865
  sessionId: event.sessionId,
27865
27866
  status: "fail"
27866
27867
  }));
27867
- const failingLatency = input.events.filter((event) => event.type === "client.live_latency").map((event) => ({
27868
+ const failingLatency = input.events.filter((event) => event.type === "client.live_latency" && (minLiveLatencyAt === undefined || event.at >= minLiveLatencyAt)).map((event) => ({
27868
27869
  event,
27869
27870
  latencyMs: getNumber10(event.payload.latencyMs) ?? getNumber10(event.payload.elapsedMs)
27870
27871
  })).filter((entry) => entry.latencyMs !== undefined && entry.latencyMs > input.liveLatencyWarnAfterMs).map(({ event, latencyMs }) => ({
@@ -27973,6 +27974,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
27973
27974
  events,
27974
27975
  failedSessionIds: failedSessionItems.map((session) => session.sessionId),
27975
27976
  liveLatencyFailAfterMs: options.liveLatencyFailAfterMs ?? 3200,
27977
+ liveLatencyMaxAgeMs: options.liveLatencyMaxAgeMs,
27976
27978
  liveLatencyWarnAfterMs: options.liveLatencyWarnAfterMs ?? 1800
27977
27979
  });
27978
27980
  const checks = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.284",
3
+ "version": "0.0.22-beta.285",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",