@mux/ai 0.55.0 → 0.57.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,5 +1,5 @@
1
1
  import { LanguageModel, generateText as generateText$1 } from 'ai';
2
- import { l as WorkflowCredentialsInput, M as MuxAsset, A as AssetTextTrack, T as TokenUsage, f as ScopedMuxAIOptions, I as ImageSubmissionMode, d as MuxAIOptions, b as ChunkingStrategy, k as VideoEmbeddingsResult, H as Hotspot, y as Shot, q as VTTCue, j as ToneType, g as StorageAdapter } from './transcripts-DxSHvTk9.js';
2
+ import { l as WorkflowCredentialsInput, M as MuxAsset, A as AssetTextTrack, T as TokenUsage, f as ScopedMuxAIOptions, I as ImageSubmissionMode, d as MuxAIOptions, b as ChunkingStrategy, k as VideoEmbeddingsResult, H as Hotspot, y as Shot, q as VTTCue, j as ToneType, g as StorageAdapter } from './transcripts-Brw74qlV.js';
3
3
  import { z } from 'zod';
4
4
  import { S as SafetyReport, e as PromptOverrides, h as SceneContextItemV1, D as DEFAULT_DESCRIPTION_LENGTH, a as DEFAULT_SUMMARY_KEYWORD_LIMIT, b as DEFAULT_TITLE_LENGTH } from './summarization-BFmhXeAu.js';
5
5
  import { createAnthropic } from '@ai-sdk/anthropic';
@@ -78,6 +78,36 @@ declare const ISO639_1_TO_3: {
78
78
  readonly et: "est";
79
79
  readonly lv: "lav";
80
80
  readonly lt: "lit";
81
+ readonly as: "asm";
82
+ readonly az: "aze";
83
+ readonly be: "bel";
84
+ readonly bs: "bos";
85
+ readonly cy: "cym";
86
+ readonly ga: "gle";
87
+ readonly ha: "hau";
88
+ readonly hy: "hye";
89
+ readonly jv: "jav";
90
+ readonly ka: "kat";
91
+ readonly kk: "kaz";
92
+ readonly ky: "kir";
93
+ readonly lb: "ltz";
94
+ readonly ln: "lin";
95
+ readonly mi: "mri";
96
+ readonly mk: "mkd";
97
+ readonly mn: "mon";
98
+ readonly mt: "mlt";
99
+ readonly my: "mya";
100
+ readonly ne: "nep";
101
+ readonly ny: "nya";
102
+ readonly oc: "oci";
103
+ readonly or: "ori";
104
+ readonly ps: "pus";
105
+ readonly sd: "snd";
106
+ readonly so: "som";
107
+ readonly sr: "srp";
108
+ readonly tg: "tgk";
109
+ readonly uz: "uzb";
110
+ readonly yo: "yor";
81
111
  };
82
112
  /**
83
113
  * Supported ISO 639-1 two-letter language codes.
@@ -1811,13 +1841,14 @@ type StaticRenditionCleanupOutcome = "deleted" | "delete_failed" | "kept" | "not
1811
1841
  /** Output returned from `translateAudio`. */
1812
1842
  interface AudioTranslationResult {
1813
1843
  assetId: string;
1814
- /** Target language code (ISO 639-1 two-letter format). */
1815
- targetLanguageCode: SupportedISO639_1;
1844
+ /** Normalized target language tag, including region or script subtags when supplied. */
1845
+ targetLanguageCode: string;
1816
1846
  /**
1817
- * Target language codes in both ISO 639-1 (2-letter) and ISO 639-3 (3-letter) formats.
1818
- * Use `iso639_1` for browser players (BCP-47 compliant) and `iso639_3` for ElevenLabs API.
1847
+ * Legacy language-code pair. `iso639_1` retains the normalized requested tag,
1848
+ * including qualifiers or three-letter languages without an ISO 639-1 code.
1819
1849
  */
1820
1850
  targetLanguage: LanguageCodePair;
1851
+ /** ElevenLabs project ID; legacy callers retain the `dubbingId` field. */
1821
1852
  dubbingId: string;
1822
1853
  uploadedTrackId?: string;
1823
1854
  presignedUrl?: string;
@@ -1842,12 +1873,13 @@ interface AudioTranslationOptions extends MuxAIOptions {
1842
1873
  /** Audio dubbing provider (currently ElevenLabs only). */
1843
1874
  provider?: "elevenlabs";
1844
1875
  /**
1845
- * Optional source language code for ElevenLabs `source_lang`.
1846
- * Accepts ISO 639-1 (e.g. "en") or ISO 639-3 (e.g. "eng").
1876
+ * Optional source language code for ElevenLabs `source_language`.
1877
+ * Accepts language tags (e.g. "en-US") or known ISO 639-3 aliases (e.g. "eng").
1878
+ * Region and script subtags are dropped for ElevenLabs.
1847
1879
  * Defaults to auto-detect when omitted.
1848
1880
  */
1849
1881
  fromLanguageCode?: string;
1850
- /** Number of speakers supplied to ElevenLabs (0 = auto-detect, default). */
1882
+ /** Only 0 (auto-detect) is supported by the project API. Nonzero overrides are rejected before billing. */
1851
1883
  numSpeakers?: number;
1852
1884
  /** Optional override for the S3-compatible endpoint used for uploads. */
1853
1885
  s3Endpoint?: string;
@@ -1,4 +1,4 @@
1
- import { l as WorkflowCredentialsInput, n as WorkflowScope, h as TextChunk, b as ChunkingStrategy, q as VTTCue, 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, 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';
1
+ import { l as WorkflowCredentialsInput, n as WorkflowScope, h as TextChunk, b as ChunkingStrategy, q as VTTCue, 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, 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-Brw74qlV.js';
2
2
 
3
3
  interface HeatmapOptions {
4
4
  /** Time window for results, e.g., '7:days' (default: '7:days') */
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, M as MUX_TRACK_PASSTHROUGH_MAX_CHARS, R as ReplaceAndCreateTextTrackInput, b as ReplaceAndCreateTextTrackResult, c as ReplaceAndCreateTrackInput, d as ReplaceExistingTracksPolicy, e as ReplaceSourceTrackInput, f as ReplaceableTrackType, S as SourceTrackReplacementPolicy, g as SupportedISO639_1, h as SupportedISO639_3, T as TextTrackReplacementPlan, i as TextTrackSummary, j as TextTrackTarget, k as TrackSummary, l as TrackTarget, m as buildMuxAiTrackPassthrough, n as findNameCollisionTextTracks, o as findSameLanguageTextTracks, p as getLanguageCodePair, q as getLanguageName, r as isDuplicateTrackNameError, s as isMuxGeneratedTextTrack, t as isUndeterminedLanguageCode, u as isValidISO639_1, v as isValidISO639_3, w as normalizeTrackLanguageCode, x as normalizeTrackName, y as planSourceTrackReplacement, z as planTextTrackReplacement, A as replaceAndCreateTextTrack, B as replaceAndCreateTrack, C as replaceSourceTrack, D as summarizeTextTrack, E as toISO639_1, F as toISO639_3, G as validateTrackPassthrough, H as workflows } from './index-BBk0AcY1.js';
1
+ export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, M as MUX_TRACK_PASSTHROUGH_MAX_CHARS, R as ReplaceAndCreateTextTrackInput, b as ReplaceAndCreateTextTrackResult, c as ReplaceAndCreateTrackInput, d as ReplaceExistingTracksPolicy, e as ReplaceSourceTrackInput, f as ReplaceableTrackType, S as SourceTrackReplacementPolicy, g as SupportedISO639_1, h as SupportedISO639_3, T as TextTrackReplacementPlan, i as TextTrackSummary, j as TextTrackTarget, k as TrackSummary, l as TrackTarget, m as buildMuxAiTrackPassthrough, n as findNameCollisionTextTracks, o as findSameLanguageTextTracks, p as getLanguageCodePair, q as getLanguageName, r as isDuplicateTrackNameError, s as isMuxGeneratedTextTrack, t as isUndeterminedLanguageCode, u as isValidISO639_1, v as isValidISO639_3, w as normalizeTrackLanguageCode, x as normalizeTrackName, y as planSourceTrackReplacement, z as planTextTrackReplacement, A as replaceAndCreateTextTrack, B as replaceAndCreateTrack, C as replaceSourceTrack, D as summarizeTextTrack, E as toISO639_1, F as toISO639_3, G as validateTrackPassthrough, H as workflows } from './index-CuL8ReZ7.js';
2
2
  import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
3
- import { T as TokenUsage, M as MuxAsset, W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './transcripts-DxSHvTk9.js';
4
- export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, d as MuxAIOptions, P as PlaybackAsset, e as PlaybackPolicy, f as ScopedMuxAIOptions, g as StorageAdapter, h as TextChunk, i as TokenChunkingConfig, j as ToneType, U as UsageMetadata, V as VTTChunkingConfig, k as VideoEmbeddingsResult, l as WorkflowCredentialsInput, m as WorkflowMuxClient, n as WorkflowScope, o as decryptFromWorkflow, p as encryptForWorkflow } from './transcripts-DxSHvTk9.js';
5
- export { i as primitives } from './index-B-rLy1do.js';
3
+ import { T as TokenUsage, M as MuxAsset, W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './transcripts-Brw74qlV.js';
4
+ export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, d as MuxAIOptions, P as PlaybackAsset, e as PlaybackPolicy, f as ScopedMuxAIOptions, g as StorageAdapter, h as TextChunk, i as TokenChunkingConfig, j as ToneType, U as UsageMetadata, V as VTTChunkingConfig, k as VideoEmbeddingsResult, l as WorkflowCredentialsInput, m as WorkflowMuxClient, n as WorkflowScope, o as decryptFromWorkflow, p as encryptForWorkflow } from './transcripts-Brw74qlV.js';
5
+ export { i as primitives } from './index-DiuqBw6I.js';
6
6
  import 'ai';
7
7
  import 'zod';
8
8
  import './summarization-BFmhXeAu.js';
@@ -11,7 +11,7 @@ import '@ai-sdk/google';
11
11
  import '@ai-sdk/openai';
12
12
  import '@mux/ts';
13
13
 
14
- var version = "0.55.0";
14
+ var version = "0.57.0";
15
15
 
16
16
  type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error" | "content_policy_error";
17
17
  interface ModelCallDiagnostics {