@mux/ai 0.60.0 → 0.61.0-canary.95

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.
@@ -123,14 +123,16 @@ type ErrorCatalogEntry<TType extends string = string, TDependency extends string
123
123
  declare const MUX_AI_ERROR_CODES: {
124
124
  /** The requested time range is invalid, or has nothing to work with. Facts: `reason` (`invalid_start_time`, `invalid_end_time`, `exceeds_duration`, `empty_range`, `no_video`, `no_transcript`) and the bounds involved. */
125
125
  readonly INVALID_SCOPE: "invalid_scope";
126
- /** Existing tracks block writing the output track under the chosen replacement policy. Facts: `reason` (`policy_fail`, `not_generated`, `name_collision`, `primary_audio`), `conflictingTracks` and the target track. */
126
+ /** Existing tracks block writing the output track under the chosen replacement policy. Facts: `reason` (`policy_fail`, `not_generated`, `name_collision`, `primary_audio`), `conflictingTracks` and the target track, plus `sourceRestored` and `restoredTrackId` when a source track was deleted first. */
127
127
  readonly TRACK_REPLACEMENT_BLOCKED: "track_replacement_blocked";
128
- /** An option's value can't be used. Facts: `parameter` (the caller's option name), `reason` (`too_many`, `empty`, `too_long`, `disallowed_characters`, `not_normalized`) and the values the reason names: `count` and `max`, `index` (0-based entry), `length` and `maxLength`, `characters`. */
128
+ /** An option's value can't be used. Facts: `parameter` (the caller's option name), `reason` (`too_many`, `empty`, `too_long`, `disallowed_characters`, `not_normalized`, `multiline`, `required_with`, `conflicts_with`, `not_allowed`, `one_of_required`) and the values the reason names: `count` and `max`, `index` (0-based entry), `length` and `maxLength`, `characters`, `with` and `withValue` (the other option), `allowed` and `value`, `parameters` (the options to choose from). */
129
129
  readonly INVALID_PARAMETER: "invalid_parameter";
130
130
  /** A numeric option is outside its allowed range. Facts: `parameter` (the caller's option name), `value`, `min`, `max`, and `integer` when it must be a whole number. */
131
131
  readonly PARAMETER_OUT_OF_RANGE: "parameter_out_of_range";
132
132
  /** No ready caption track matches the requested track or language. Facts: `trackId` or `languageCode`, and what is available. */
133
133
  readonly CAPTION_TRACK_NOT_FOUND: "caption_track_not_found";
134
+ /** The caption track has no language, so its source language can't be determined. Facts: `trackId`. */
135
+ readonly CAPTION_TRACK_LANGUAGE_MISSING: "caption_track_language_missing";
134
136
  /** The asset has no public or signed playback ID (DRM-only assets included). */
135
137
  readonly PLAYBACK_ID_NOT_FOUND: "playback_id_not_found";
136
138
  /** Mux has no asset with the requested ID in this environment. Facts: `assetId`. */
@@ -147,6 +149,16 @@ declare const MUX_AI_ERROR_CODES: {
147
149
  readonly SIGNING_CREDENTIALS_MISSING: "signing_credentials_missing";
148
150
  /** Storage is needed but the service running the SDK didn't configure it. */
149
151
  readonly STORAGE_NOT_CONFIGURED: "storage_not_configured";
152
+ /** A track write failed, but the opted-in result carried no classified error: a bug in the SDK's track-write path. Facts: `reason`, the raw failure's message. */
153
+ readonly TRACK_WRITE_UNCLASSIFIED: "track_write_unclassified";
154
+ /** Mux answered a track create without a track id. The track may exist, so it isn't step-retried. Facts: `call`, `assetId`. */
155
+ readonly TRACK_ID_MISSING: "track_id_missing";
156
+ /** The asset snapshot the service running the SDK passed in is for a different asset than the one requested. Facts: `assetId`, `snapshotAssetId`. */
157
+ readonly ASSET_SNAPSHOT_MISMATCH: "asset_snapshot_mismatch";
158
+ /** Mux answered an asset fetch with a different asset than the one requested. Facts: `assetId`, `returnedAssetId`. */
159
+ readonly ASSET_ID_MISMATCH: "asset_id_mismatch";
160
+ /** Translation needed to split a chunk of fewer than two cues: a bug in the SDK's chunking. Facts: `chunkId`, `cueCount`. */
161
+ readonly TRANSLATION_CHUNK_UNSPLITTABLE: "translation_chunk_unsplittable";
150
162
  /** The model provider refused the content. Facts: `reason` and `category`. */
151
163
  readonly CONTENT_POLICY_BLOCKED: "content_policy_blocked";
152
164
  /** The model returned no output, or a required field was empty. Facts: `call`, `provider`, `model`, and `assetId` when there is one. */
@@ -223,6 +235,32 @@ declare const MUX_AI_ERROR_CATALOG: {
223
235
  readonly type: "server_error";
224
236
  readonly source: "internal";
225
237
  };
238
+ readonly asset_snapshot_mismatch: {
239
+ readonly type: "server_error";
240
+ readonly source: "internal";
241
+ };
242
+ readonly track_write_unclassified: {
243
+ readonly type: "server_error";
244
+ readonly source: "internal";
245
+ };
246
+ readonly translation_chunk_unsplittable: {
247
+ readonly type: "server_error";
248
+ readonly source: "internal";
249
+ };
250
+ readonly caption_track_language_missing: {
251
+ readonly type: "validation_error";
252
+ readonly source: "asset";
253
+ };
254
+ readonly track_id_missing: {
255
+ readonly type: "processing_error";
256
+ readonly source: "upstream";
257
+ readonly dependency: "mux_video";
258
+ };
259
+ readonly asset_id_mismatch: {
260
+ readonly type: "processing_error";
261
+ readonly source: "upstream";
262
+ readonly dependency: "mux_video";
263
+ };
226
264
  readonly content_policy_blocked: {
227
265
  readonly type: "content_policy_error";
228
266
  readonly source: "asset";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MuxAiErrorDependency, a as MuxAiErrorFacts, b as MuxAiErrorSource, c as MuxAiErrorType, d as MuxAiError, e as MuxAiErrorFactValue, f as MuxAiErrorCode, C as ClassifiedError } from './index-DO8jM8_5.js';
2
- export { g as ClassifiedErrorInit, h as CodedClassification, E as ErrorCatalogEntry, i as ErrorCauseSummary, I as ISO639_1, j as ISO639_3, L as LanguageCodePair, k as MUX_AI_ERROR_CATALOG, l as MUX_AI_ERROR_CODES, m as MUX_AI_ERROR_CODE_VALUES, n as MUX_AI_ERROR_DEPENDENCIES, o as MUX_AI_ERROR_DEPENDENCY_VALUES, p as MUX_AI_ERROR_SOURCES, q as MUX_AI_ERROR_SOURCE_VALUES, r as MUX_AI_ERROR_TYPES, s as MUX_AI_ERROR_TYPE_VALUES, t as MUX_TRACK_PASSTHROUGH_MAX_CHARS, u as MuxAiErrorInit, R as ReplaceAndCreateTextTrackInput, v as ReplaceAndCreateTextTrackResult, w as ReplaceAndCreateTrackInput, x as ReplaceExistingTracksPolicy, y as ReplaceSourceTrackInput, z as ReplaceableTrackType, S as SerializedClassification, A as SourceAndDependency, B as SourceTrackReplacementPolicy, D as SupportedISO639_1, F as SupportedISO639_3, T as TextTrackReplacementPlan, G as TextTrackSummary, H as TextTrackTarget, J as TrackReplacementBlocked, K as TrackReplacementBlockedReason, N as TrackSummary, O as TrackTarget, P as assertNever, Q as buildMuxAiTrackPassthrough, U as classificationInit, V as errorDetailFact, W as findNameCollisionTextTracks, X as findSameLanguageTextTracks, Y as getLanguageCodePair, Z as getLanguageName, _ as internalError, $ as isDuplicateTrackNameError, a0 as isMuxGeneratedTextTrack, a1 as isTransientStatus, a2 as isUndeterminedLanguageCode, a3 as isValidISO639_1, a4 as isValidISO639_3, a5 as normalizeTrackLanguageCode, a6 as normalizeTrackName, a7 as planSourceTrackReplacement, a8 as planTextTrackReplacement, a9 as replaceAndCreateTextTrack, aa as replaceAndCreateTrack, ab as replaceSourceTrack, ac as restoreClassification, ad as serializeClassification, ae as summarizeTextTrack, af as toISO639_1, ag as toISO639_3, ah as trackReplacementBlockedError, ai as trackTargetFacts, aj as validateTrackPassthrough, ak as workflows, al as wrapError } from './index-DO8jM8_5.js';
1
+ import { M as MuxAiErrorDependency, a as MuxAiErrorFacts, b as MuxAiErrorSource, c as MuxAiErrorType, d as MuxAiError, e as MuxAiErrorFactValue, f as MuxAiErrorCode, C as ClassifiedError } from './index-CnI9D5S0.js';
2
+ export { g as ClassifiedErrorInit, h as CodedClassification, E as ErrorCatalogEntry, i as ErrorCauseSummary, I as ISO639_1, j as ISO639_3, L as LanguageCodePair, k as MUX_AI_ERROR_CATALOG, l as MUX_AI_ERROR_CODES, m as MUX_AI_ERROR_CODE_VALUES, n as MUX_AI_ERROR_DEPENDENCIES, o as MUX_AI_ERROR_DEPENDENCY_VALUES, p as MUX_AI_ERROR_SOURCES, q as MUX_AI_ERROR_SOURCE_VALUES, r as MUX_AI_ERROR_TYPES, s as MUX_AI_ERROR_TYPE_VALUES, t as MUX_TRACK_PASSTHROUGH_MAX_CHARS, u as MuxAiErrorInit, R as ReplaceAndCreateTextTrackInput, v as ReplaceAndCreateTextTrackResult, w as ReplaceAndCreateTrackInput, x as ReplaceExistingTracksPolicy, y as ReplaceSourceTrackInput, z as ReplaceableTrackType, S as SerializedClassification, A as SourceAndDependency, B as SourceTrackReplacementPolicy, D as SupportedISO639_1, F as SupportedISO639_3, T as TextTrackReplacementPlan, G as TextTrackSummary, H as TextTrackTarget, J as TrackReplacementBlocked, K as TrackReplacementBlockedReason, N as TrackSummary, O as TrackTarget, P as assertNever, Q as buildMuxAiTrackPassthrough, U as classificationInit, V as errorDetailFact, W as findNameCollisionTextTracks, X as findSameLanguageTextTracks, Y as getLanguageCodePair, Z as getLanguageName, _ as internalError, $ as isDuplicateTrackNameError, a0 as isMuxGeneratedTextTrack, a1 as isTransientStatus, a2 as isUndeterminedLanguageCode, a3 as isValidISO639_1, a4 as isValidISO639_3, a5 as normalizeTrackLanguageCode, a6 as normalizeTrackName, a7 as planSourceTrackReplacement, a8 as planTextTrackReplacement, a9 as replaceAndCreateTextTrack, aa as replaceAndCreateTrack, ab as replaceSourceTrack, ac as restoreClassification, ad as serializeClassification, ae as summarizeTextTrack, af as toISO639_1, ag as toISO639_3, ah as trackReplacementBlockedError, ai as trackTargetFacts, aj as validateTrackPassthrough, ak as workflows, al as wrapError } from './index-CnI9D5S0.js';
3
3
  import { M as MuxAsset, W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './transcripts-DuNI058z.js';
4
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, T as TextChunk, h as TokenChunkingConfig, i as TokenUsage, 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-DuNI058z.js';
5
5
  import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
@@ -12,7 +12,7 @@ import '@ai-sdk/google';
12
12
  import '@ai-sdk/openai';
13
13
  import '@mux/ts';
14
14
 
15
- var version = "0.60.0";
15
+ var version = "0.61.0-canary.95";
16
16
 
17
17
  interface DependencyErrorInit {
18
18
  dependency: MuxAiErrorDependency;
@@ -179,13 +179,17 @@ declare const MUX_AI_ERROR_PUBLIC_MAPPINGS: {
179
179
  readonly message: typeof scopeMessage;
180
180
  };
181
181
  readonly track_replacement_blocked: {
182
- readonly facts: readonly ["reason", "trackType", "languageCode", "trackName", "conflictingTracks"];
182
+ readonly facts: readonly ["reason", "trackType", "languageCode", "trackName", "conflictingTracks", "sourceRestored", "restoredTrackId"];
183
183
  readonly message: typeof blockedTrackMessage;
184
184
  };
185
185
  readonly caption_track_not_found: {
186
186
  readonly facts: readonly ["trackId", "availableTrackIds", "languageCode", "availableLanguages"];
187
187
  readonly message: (facts: Readonly<Record<string, MuxAiErrorFactValue>>) => string;
188
188
  };
189
+ readonly caption_track_language_missing: {
190
+ readonly facts: readonly ["trackId"];
191
+ readonly message: (facts: Readonly<Record<string, MuxAiErrorFactValue>>) => string;
192
+ };
189
193
  readonly asset_not_found: {
190
194
  readonly facts: readonly ["assetId"];
191
195
  readonly message: (facts: Readonly<Record<string, MuxAiErrorFactValue>>) => string;
@@ -197,7 +201,7 @@ declare const MUX_AI_ERROR_PUBLIC_MAPPINGS: {
197
201
  readonly message: "The transcript has no usable content.";
198
202
  };
199
203
  readonly invalid_parameter: {
200
- readonly facts: readonly ["parameter", "reason", "count", "max", "index", "length", "maxLength", "characters"];
204
+ readonly facts: readonly ["parameter", "reason", "count", "max", "index", "length", "maxLength", "characters", "with", "withValue", "allowed", "value", "parameters"];
201
205
  readonly message: typeof invalidParameterMessage;
202
206
  };
203
207
  readonly parameter_out_of_range: {