@mux/ai 0.53.0 → 0.55.0

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.
@@ -1,3 +1,3 @@
1
- export { D as DEFAULT_STORYBOARD_WIDTH, H as HeatmapOptions, a as HeatmapResponse, T as ThumbnailOptions, V as VTTCueBudgetChunkingOptions, b as VTTDurationChunk, c as VTTDurationChunkingOptions, d as chunkByTokens, e as chunkText, f as chunkVTTCues, g as chunkVTTCuesByBudget, h as chunkVTTCuesByDuration, j as estimateTokenCount, k as getHeatmapForAsset, l as getHeatmapForPlaybackId, m as getHeatmapForVideo, n as getStoryboardUrl, o as getThumbnailUrls } from '../index-cbaPe-aE.js';
2
- export { r as CompletedShotsResult, D as DeletedShotsResult, s as ErroredShotsResult, H as Hotspot, t as HotspotOptions, u as HotspotResponse, L as LOW_CONFIDENCE_THRESHOLD, v as MAX_CUE_TEXT_CHARS, w as ParseVTTCuesOptions, x as PendingShotsResult, y as Shot, z as ShotRequestOptions, B as ShotsResult, F as SkippedShotsResult, G as TranscriptEmptyReason, J as TranscriptFetchOptions, K as TranscriptFetchStepResult, N as TranscriptResult, q as VTTCue, O as WaitForShotsOptions, Q as buildTranscriptUrl, R as buildVttFromCueBlocks, X as buildVttFromTranslatedCueBlocks, Y as concatenateVttSegments, Z as extractTextFromVTT, _ as extractTimestampedTranscript, $ as fetchTranscriptDataForUrl, a0 as fetchTranscriptForAsset, a1 as filterVttByScope, a2 as findCaptionTrack, a3 as getHotspotsForAsset, a4 as getHotspotsForPlaybackId, a5 as getHotspotsForVideo, a6 as getReadyTextTracks, a7 as getReliableLanguageCode, a8 as getShotsForAsset, a9 as parseVTTCues, aa as replaceCueText, ab as requestShotsForAsset, ac as sanitizeUntrustedText, ad as secondsToTimestamp, ae as splitVttPreambleAndCueBlocks, af as stripVttMetadataBlocks, ag as vttTimestampToSeconds, ah as waitForShotsForAsset } from '../transcripts-BCtzC8hZ.js';
1
+ export { D as DEFAULT_STORYBOARD_WIDTH, H as HeatmapOptions, a as HeatmapResponse, T as ThumbnailOptions, V as VTTCueBudgetChunkingOptions, b as VTTDurationChunk, c as VTTDurationChunkingOptions, d as chunkByTokens, e as chunkText, f as chunkVTTCues, g as chunkVTTCuesByBudget, h as chunkVTTCuesByDuration, j as estimateTokenCount, k as getHeatmapForAsset, l as getHeatmapForPlaybackId, m as getHeatmapForVideo, n as getStoryboardUrl, o as getThumbnailUrls } from '../index-B-rLy1do.js';
2
+ export { r as CompletedShotsResult, D as DeletedShotsResult, s as ErroredShotsResult, H as Hotspot, t as HotspotOptions, u as HotspotResponse, L as LOW_CONFIDENCE_THRESHOLD, v as MAX_CUE_TEXT_CHARS, w as ParseVTTCuesOptions, x as PendingShotsResult, y as Shot, z as ShotRequestOptions, B as ShotsResult, F as SkippedShotsResult, G as TranscriptEmptyReason, J as TranscriptFetchOptions, K as TranscriptFetchStepResult, N as TranscriptResult, q as VTTCue, O as WaitForShotsOptions, Q as buildTranscriptUrl, R as buildVttFromCueBlocks, X as buildVttFromTranslatedCueBlocks, Y as concatenateVttSegments, Z as extractTextFromVTT, _ as extractTimestampedTranscript, $ as fetchTranscriptDataForUrl, a0 as fetchTranscriptForAsset, a1 as filterVttByScope, a2 as findCaptionTrack, a3 as getHotspotsForAsset, a4 as getHotspotsForPlaybackId, a5 as getHotspotsForVideo, a6 as getReadyTextTracks, a7 as getReliableLanguageCode, a8 as getShotsForAsset, a9 as parseVTTCues, aa as replaceCueText, ab as requestShotsForAsset, ac as sanitizeUntrustedText, ad as secondsToTimestamp, ae as splitVttPreambleAndCueBlocks, af as stripVttMetadataBlocks, ag as vttTimestampToSeconds, ah as waitForShotsForAsset } from '../transcripts-DxSHvTk9.js';
3
3
  import '@mux/ts';
@@ -685,6 +685,10 @@ async function fetchHotspots(identifierType, id, options) {
685
685
  };
686
686
  }
687
687
 
688
+ // node_modules/@workflow/serde/dist/index.js
689
+ var WORKFLOW_SERIALIZE = /* @__PURE__ */ Symbol.for("workflow-serialize");
690
+ var WORKFLOW_DESERIALIZE = /* @__PURE__ */ Symbol.for("workflow-deserialize");
691
+
688
692
  // src/lib/prompt-fragments.ts
689
693
  import dedent from "dedent";
690
694
  var promptDedent = dedent.withOptions({ alignValues: true });
@@ -916,7 +920,7 @@ function getErrorTokenUsage(error) {
916
920
  }
917
921
 
918
922
  // src/lib/mux-ai-error.ts
919
- var MuxAiError = class extends Error {
923
+ var MuxAiError = class _MuxAiError extends Error {
920
924
  constructor(message, opts) {
921
925
  super(message);
922
926
  /** Structural brand for duck-type identification. */
@@ -932,6 +936,32 @@ var MuxAiError = class extends Error {
932
936
  static is(value) {
933
937
  return typeof value === "object" && value !== null && "__robots_error" in value && value.__robots_error === true;
934
938
  }
939
+ static [WORKFLOW_SERIALIZE](instance) {
940
+ const incomplete = instance;
941
+ return {
942
+ message: instance.publicMessage,
943
+ publicType: instance.publicType,
944
+ retryable: instance.retryable,
945
+ stack: instance.stack,
946
+ usage: getErrorTokenUsage(instance),
947
+ finishReason: incomplete.finishReason,
948
+ rawFinishReason: incomplete.rawFinishReason,
949
+ diagnostics: instance.diagnostics
950
+ };
951
+ }
952
+ static [WORKFLOW_DESERIALIZE](value) {
953
+ const error = new _MuxAiError(value.message, { type: value.publicType, retryable: value.retryable });
954
+ Object.assign(error, {
955
+ usage: value.usage,
956
+ diagnostics: value.diagnostics,
957
+ ...value.finishReason !== void 0 && { finishReason: value.finishReason },
958
+ ...value.rawFinishReason !== void 0 && { rawFinishReason: value.rawFinishReason }
959
+ });
960
+ if (value.stack !== void 0) {
961
+ error.stack = value.stack;
962
+ }
963
+ return error;
964
+ }
935
965
  };
936
966
  function extractErrorDetail(error) {
937
967
  if (error instanceof Error && error.message) {