@mux/ai 0.67.0 → 0.68.0-canary.113

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.
@@ -282,21 +282,6 @@ interface TokenUsage {
282
282
  metadata?: UsageMetadata;
283
283
  }
284
284
 
285
- /**
286
- * What a legacy error carries across a Workflow step boundary: the pre-classification
287
- * shape, so it revives with its end-user message.
288
- */
289
- interface LegacySerializedMuxAiError {
290
- message: string;
291
- publicType: MuxAiErrorType;
292
- retryable: boolean;
293
- stack?: string;
294
- usage?: TokenUsage;
295
- finishReason?: string;
296
- rawFinishReason?: string;
297
- diagnostics?: ModelCallDiagnostics;
298
- }
299
-
300
285
  /**
301
286
  * Public error categories for job outcomes. One list for the SDK and its consumers,
302
287
  * which may extend it with their own types (e.g. request-time HTTP errors). Treat
@@ -409,9 +394,9 @@ declare const MUX_AI_ERROR_CODES: {
409
394
  readonly INVALID_SCOPE: "invalid_scope";
410
395
  /** 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. */
411
396
  readonly TRACK_REPLACEMENT_BLOCKED: "track_replacement_blocked";
412
- /** 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`, `audio_only`, `not_positive`) 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). */
397
+ /** 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`, `audio_only`, `not_positive`, `invalid_format`, `duplicate`) 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), `format` (what the value must look like). `duplicate` is a list of keyed entries that repeats a key (`value`). */
413
398
  readonly INVALID_PARAMETER: "invalid_parameter";
414
- /** 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. */
399
+ /** A numeric option is outside its allowed range. Facts: `parameter` (the caller's option name), `value`, `min`, `max`, `integer` when it must be a whole number, and `unit` when the bounds have one. The public wording names the bound that was crossed. */
415
400
  readonly PARAMETER_OUT_OF_RANGE: "parameter_out_of_range";
416
401
  /** No ready caption track matches the requested track or language. Facts: `trackId` or `languageCode`, and what is available. */
417
402
  readonly CAPTION_TRACK_NOT_FOUND: "caption_track_not_found";
@@ -478,14 +463,15 @@ declare const MUX_AI_ERROR_CODES: {
478
463
  /**
479
464
  * The provider says the account the service running the SDK uses is out of credits or
480
465
  * quota, or hit a spend or usage limit. Retrying won't help until someone changes the
481
- * account. The site names the dependency. Facts: `call`, `status`, `providerCode`.
466
+ * account. The site names the dependency. Facts: `call`, `status`, and `providerCode`
467
+ * when the provider gave one.
482
468
  */
483
469
  readonly PROVIDER_QUOTA_EXHAUSTED: "provider_quota_exhausted";
484
- /** The provider rejected the key the service running the SDK uses, or the key lacks permission for this model or feature. The site names the dependency. Facts: `call`, `status`, `providerCode`. */
470
+ /** The provider rejected the key the service running the SDK uses, or the key lacks permission for this model or feature. The site names the dependency. Facts: `call`, `status`, and `providerCode` when the provider gave one. */
485
471
  readonly PROVIDER_CREDENTIALS_REJECTED: "provider_credentials_rejected";
486
- /** The provider says requests are over its rate or concurrency limit. The site names the dependency. Facts: `call`, `status`, `providerCode`. */
472
+ /** The provider says requests are over its rate or concurrency limit. The site names the dependency. Facts: `call`, `status`, and `providerCode` when the provider gave one. */
487
473
  readonly PROVIDER_RATE_LIMITED: "provider_rate_limited";
488
- /** The provider says it's overloaded or down for maintenance. The site names the dependency. Facts: `call`, `status`, `providerCode`. */
474
+ /** The provider says it's overloaded or down for maintenance. The site names the dependency. Facts: `call`, `status`, and `providerCode` when the provider gave one. */
489
475
  readonly PROVIDER_UNAVAILABLE: "provider_unavailable";
490
476
  /** The provider can't process the asset's audio. The site names the dependency. Facts: `call`, `status`, `providerCode`, `reason` (`corrupt`, `unsupported_format`, `too_long`, `too_short`). */
491
477
  readonly AUDIO_UNPROCESSABLE: "audio_unprocessable";
@@ -1030,6 +1016,21 @@ declare function internalError(message: string, facts?: MuxAiErrorFacts, cause?:
1030
1016
  /** Exhaustiveness guard for switch statements over closed unions. */
1031
1017
  declare function assertNever(value: never, what?: string): never;
1032
1018
 
1019
+ /**
1020
+ * What a legacy error carries across a Workflow step boundary: the pre-classification
1021
+ * shape, so it revives with its end-user message.
1022
+ */
1023
+ interface LegacySerializedMuxAiError {
1024
+ message: string;
1025
+ publicType: MuxAiErrorType;
1026
+ retryable: boolean;
1027
+ stack?: string;
1028
+ usage?: TokenUsage;
1029
+ finishReason?: string;
1030
+ rawFinishReason?: string;
1031
+ diagnostics?: ModelCallDiagnostics;
1032
+ }
1033
+
1033
1034
  interface Hotspot {
1034
1035
  /** Inclusive start time in milliseconds */
1035
1036
  startMs: number;
@@ -1,7 +1,7 @@
1
- export { P as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, Q as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, U as ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL, V as ASK_QUESTIONS_MAX_QUESTION_LENGTH, W as AskQuestionsOptions, X as AskQuestionsResult, Y as AskQuestionsType, Z as AudioTranslationOptions, _ as AudioTranslationResult, $ as AutoCensorProfanityOptions, a0 as BurnedInCaptionsAnalysis, a1 as BurnedInCaptionsOptions, a2 as BurnedInCaptionsPromptOverrides, a3 as BurnedInCaptionsPromptSections, a4 as BurnedInCaptionsResult, a5 as CaptionReplacement, a6 as CensorMode, a7 as Chapter, a8 as ChapterSystemPromptSections, a9 as ChaptersOptions, aa as ChaptersPromptOverrides, ab as ChaptersPromptSections, ac as ChaptersResult, ad as ChaptersType, ae as DEFAULT_TRANSCRIPT_WINDOWING, af as DubbedCaptionsOutcome, ag as EditCaptionsOptions, ah as EditCaptionsResult, ai as EmbeddingsOptions, aj as EmbeddingsResult, ak as EngagementInsightsOptions, al as EngagementInsightsResult, am as GENERATE_TEXT_CALLS_TO_ACTION, an as GENERATE_TEXT_CHANNELS, ao as GENERATE_TEXT_CHANNEL_CEILINGS, ap as GENERATE_TEXT_FORMATS, aq as GENERATE_TEXT_LENGTH_BOUNDS, ar as GENERATE_TEXT_MAX_ARTIFACTS, as as GENERATE_TEXT_MAX_AUDIENCE_CHARS, at as GENERATE_TEXT_MAX_BRAND_TERMS, au as GENERATE_TEXT_MAX_BRAND_TERMS_TOTAL_CHARS, av as GENERATE_TEXT_MAX_BRAND_TERM_CHARS, aw as GENERATE_TEXT_MAX_CONCURRENT_GENERATIONS, ax as GENERATE_TEXT_MAX_INSTRUCTIONS_CHARS, ay as GENERATE_TEXT_MAX_SHOT_FRAMES, az as GENERATE_TEXT_MAX_VARIANTS, aA as GENERATE_TEXT_VOICES, aB as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, aC as GenerateTextArtifact, aD as GenerateTextCallToAction, aE as GenerateTextChannel, aF as GenerateTextFormat, aG as GenerateTextKeyedItem, aH as GenerateTextLengthLimit, aI as GenerateTextOptions, aJ as GenerateTextResult, aK as GenerateTextVariant, aL as GenerateTextVoice, aM as GeneratedTextArtifact, aN as GeneratedTextVariant, aO as HIVE_SEXUAL_CATEGORIES, aP as HIVE_VIOLENCE_CATEGORIES, aQ as HiveModerationOutput, aR as HiveModerationSource, aS as ModerationOptions, aT as ModerationProvider, aU as ModerationResult, aV as ModerationSurfaceStatus, aW as MomentInsight, aX as OverallInsight, aY as ProfanityDetectionPayload, aZ as Question, a_ as QuestionAnswer, a$ as QuestionAnswerType, b0 as RepairAttempt, b1 as RepairCall, b2 as RepairOptions, b3 as RepairPlan, b4 as RepairResult, b5 as RepairSpan, b6 as ReplacementRecord, b7 as SpeakerReplacement, b8 as StaticRenditionCleanupOutcome, b9 as SummarizationOptions, ba as SummarizationPromptOverrides, bb as SummarizationPromptSections, bc as SummaryAndTagsResult, bd as SummaryType, be as TextLengthLimit, bf as TextRepairModelOptions, bg as ThumbnailModerationScore, bh as ThumbnailModerationSkipReason, bi as ThumbnailModerationStatus, bj as TranscriptModerationScore, bk as TranscriptModerationSkipReason, bl as TranscriptModerationStatus, bm as TranslationChunkingOptions, bn as TranslationOptions, bo as TranslationPayload, bp as TranslationResult, bq as aggregateTokenUsage, br as applyOverrideLists, bs as applyReplacements, bt as applySpeakerReplacements, bu as applyTextRepair, bv as askQuestions, bw as buildReplacementRegex, bx as buildTranscriptWindows, by as burnedInCaptionsSchema, bz as censorVttContent, bA as chapterSchema, bB as chaptersSchema, bC as createReplacer, bD as createTextRepairGenerator, bE as editCaptions, bF as extractTranscriptSegmentsForHotspots, bG as findGenerateTextLengthViolation, bH as generateChapters, bI as generateEmbeddings, bJ as generateEngagementInsights, bK as generateText, bL as generateVideoEmbeddings, bM as getModerationScores, bN as getSummaryAndTags, bO as hasBurnedInCaptions, bP as mapShotsToHotspots, bQ as measureGenerateTextLength, bR as normalizeTranslatedVtt, bS as planTextRepair, bT as profanityDetectionSchema, bU as questionAnswerSchema, bV as repairJsonSchema, bW as repairText, bX as resolveGenerateTextLengthLimit, bY as resolveGenerateTextLengthLimits, bZ as resolveGenerateTextOptions, b_ as runTextRepairLoop, b$ as selectGenerateTextShotFrames, c0 as shouldSplitChunkTranslationError, c1 as summarySchema, c2 as transformCueText, c3 as translateAudio, c4 as translateCaptions, c5 as translationSchema, c6 as validateNeverTranslateTerms, c7 as verifyNeverTranslateTerms } from '../index-D1v-3Mgj.js';
1
+ export { U as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, V as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, W as ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL, X as ASK_QUESTIONS_MAX_QUESTION_LENGTH, Y as AskQuestionsOptions, Z as AskQuestionsResult, _ as AskQuestionsType, $ as AudioTranslationOptions, a0 as AudioTranslationResult, a1 as AutoCensorProfanityOptions, a2 as BurnedInCaptionsAnalysis, a3 as BurnedInCaptionsOptions, a4 as BurnedInCaptionsPromptOverrides, a5 as BurnedInCaptionsPromptSections, a6 as BurnedInCaptionsResult, a7 as CaptionReplacement, a8 as CensorMode, a9 as Chapter, aa as ChapterSystemPromptSections, ab as ChaptersOptions, ac as ChaptersPromptOverrides, ad as ChaptersPromptSections, ae as ChaptersResult, af as ChaptersType, ag as DEFAULT_TRANSCRIPT_WINDOWING, ah as DubbedCaptionsOutcome, ai as EditCaptionsOptions, aj as EditCaptionsResult, ak as EmbeddingsOptions, al as EmbeddingsResult, am as EngagementInsightsOptions, an as EngagementInsightsResult, ao as GENERATE_TEXT_CALLS_TO_ACTION, ap as GENERATE_TEXT_CHANNELS, aq as GENERATE_TEXT_CHANNEL_CEILINGS, ar as GENERATE_TEXT_FORMATS, as as GENERATE_TEXT_LENGTH_BOUNDS, at as GENERATE_TEXT_MAX_ARTIFACTS, au as GENERATE_TEXT_MAX_AUDIENCE_CHARS, av as GENERATE_TEXT_MAX_BRAND_TERMS, aw as GENERATE_TEXT_MAX_BRAND_TERMS_TOTAL_CHARS, ax as GENERATE_TEXT_MAX_BRAND_TERM_CHARS, ay as GENERATE_TEXT_MAX_CONCURRENT_GENERATIONS, az as GENERATE_TEXT_MAX_INSTRUCTIONS_CHARS, aA as GENERATE_TEXT_MAX_SHOT_FRAMES, aB as GENERATE_TEXT_MAX_VARIANTS, aC as GENERATE_TEXT_VOICES, aD as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, aE as GenerateTextArtifact, aF as GenerateTextCallToAction, aG as GenerateTextChannel, aH as GenerateTextFormat, aI as GenerateTextKeyedItem, aJ as GenerateTextLengthLimit, aK as GenerateTextOptions, aL as GenerateTextResult, aM as GenerateTextVariant, aN as GenerateTextVoice, aO as GeneratedTextArtifact, aP as GeneratedTextVariant, aQ as HIVE_SEXUAL_CATEGORIES, aR as HIVE_VIOLENCE_CATEGORIES, aS as HiveModerationOutput, aT as HiveModerationSource, aU as ModerationOptions, aV as ModerationProvider, aW as ModerationResult, aX as ModerationSurfaceStatus, aY as MomentInsight, aZ as OverallInsight, a_ as ProfanityDetectionPayload, a$ as Question, b0 as QuestionAnswer, b1 as QuestionAnswerType, b2 as RepairAttempt, b3 as RepairCall, b4 as RepairFailureOutcome, b5 as RepairOptions, b6 as RepairPlan, b7 as RepairRejectionCode, b8 as RepairResult, b9 as RepairSpan, ba as ReplacementRecord, bb as SpeakerReplacement, bc as StaticRenditionCleanupOutcome, bd as SummarizationOptions, be as SummarizationPromptOverrides, bf as SummarizationPromptSections, bg as SummaryAndTagsResult, bh as SummaryType, bi as TextLengthLimit, bj as TextRepairModelOptions, bk as ThumbnailModerationScore, bl as ThumbnailModerationSkipReason, bm as ThumbnailModerationStatus, bn as TranscriptModerationScore, bo as TranscriptModerationSkipReason, bp as TranscriptModerationStatus, bq as TranslationChunkingOptions, br as TranslationOptions, bs as TranslationPayload, bt as TranslationResult, bu as aggregateTokenUsage, bv as applyOverrideLists, bw as applyReplacements, bx as applySpeakerReplacements, by as applyTextRepair, bz as askQuestions, bA as buildReplacementRegex, bB as buildTranscriptWindows, bC as burnedInCaptionsSchema, bD as censorVttContent, bE as chapterSchema, bF as chaptersSchema, bG as createReplacer, bH as createTextRepairGenerator, bI as editCaptions, bJ as extractTranscriptSegmentsForHotspots, bK as findGenerateTextLengthViolation, bL as generateChapters, bM as generateEmbeddings, bN as generateEngagementInsights, bO as generateText, bP as generateVideoEmbeddings, bQ as getModerationScores, bR as getSummaryAndTags, bS as hasBurnedInCaptions, bT as mapShotsToHotspots, bU as measureGenerateTextLength, bV as normalizeTranslatedVtt, bW as planTextRepair, bX as profanityDetectionSchema, bY as questionAnswerSchema, bZ as repairJsonSchema, b_ as repairText, b$ as resolveGenerateTextLengthLimit, c0 as resolveGenerateTextLengthLimits, c1 as resolveGenerateTextOptions, c2 as runTextRepairLoop, c3 as selectGenerateTextShotFrames, c4 as shouldSplitChunkTranslationError, c5 as summarySchema, c6 as transformCueText, c7 as translateAudio, c8 as translateCaptions, c9 as translationSchema, ca as validateNeverTranslateTerms, cb as verifyNeverTranslateTerms } from '../index-CxDX1bX1.js';
2
2
  export { D as DEFAULT_DESCRIPTION_LENGTH, a as DEFAULT_SUMMARY_KEYWORD_LIMIT, b as DEFAULT_TITLE_LENGTH } from '../summarization-BFmhXeAu.js';
3
3
  import 'ai';
4
- import '../transcripts-BkjWyvVz.js';
4
+ import '../transcripts-Cs-n8X_l.js';
5
5
  import '@workflow/serde';
6
6
  import '@mux/ts';
7
7
  import 'zod';