@mux/ai 0.9.0 → 0.11.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Easy to use, purpose-driven, cost effective, configurable **_workflow functions_** in a TypeScript SDK for building AI-powered video and audio workflows on the server, powered by [Mux](https://www.mux.com), with support for popular AI/LLM providers (OpenAI, Anthropic, Google).
7
7
 
8
- - **Examples:** [`getSummaryAndTags`](#video-summarization), [`getModerationScores`](#content-moderation), [`hasBurnedInCaptions`](#burned-in-caption-detection), [`generateChapters`](#chapter-generation), [`generateEmbeddings`](#search-with-embeddings), [`translateCaptions`](#caption-translation), [`translateAudio`](#audio-dubbing)
8
+ - **Examples:** [`getSummaryAndTags`](#video-summarization), [`getModerationScores`](#content-moderation), [`hasBurnedInCaptions`](#burned-in-caption-detection), [`generateChapters`](#chapter-generation), [`generateEmbeddings`](#search-with-embeddings), [`translateCaptions`](#caption-translation), [`editCaptions`](#caption-editing), [`translateAudio`](#audio-dubbing)
9
9
  - Workflows automatically ship with `"use workflow"` [compatability with Workflow DevKit](#compatability-with-workflow-devkit)
10
10
 
11
11
  Turn your Mux video and audio assets into structured, actionable data — summaries, chapters, moderation scores, translations, embeddings, and more — with a single function call. `@mux/ai` handles fetching media data from Mux, formatting it for AI providers, and returning typed results so you can focus on building your product instead of wrangling prompts and media pipelines.
@@ -75,6 +75,7 @@ Workflows are high-level functions that handle complete media AI tasks end-to-en
75
75
  | [`generateChapters`](./docs/WORKFLOWS.md#chapter-generation) | Create chapter markers from transcripts | OpenAI, Anthropic, Google | Yes |
76
76
  | [`generateEmbeddings`](./docs/WORKFLOWS.md#embeddings) | Generate vector embeddings for semantic search | OpenAI, Google | Yes |
77
77
  | [`translateCaptions`](./docs/WORKFLOWS.md#caption-translation) | Translate captions into other languages | OpenAI, Anthropic, Google | Yes |
78
+ | [`editCaptions`](./docs/WORKFLOWS.md#caption-editing) | Edit captions: censor profanity and/or apply static replacements | OpenAI, Anthropic, Google | Yes |
78
79
  | [`translateAudio`](./docs/WORKFLOWS.md#audio-dubbing) | Create AI-dubbed audio tracks | ElevenLabs | Yes |
79
80
 
80
81
  See the [Workflows guide](./docs/WORKFLOWS.md) for detailed documentation, options, and examples for each workflow. See the [API Reference](./docs/API.md) for complete parameter and return type details.
@@ -108,6 +109,27 @@ const result = await generateChapters("your-asset-id", "en", {
108
109
  // [{ startTime: 0, title: "Introduction" }, { startTime: 45, title: "Main Content" }, ...]
109
110
  ```
110
111
 
112
+ **Caption editing:**
113
+
114
+ ```ts
115
+ import { editCaptions } from "@mux/ai/workflows";
116
+
117
+ const result = await editCaptions("your-asset-id", "track-id", {
118
+ provider: "anthropic",
119
+ autoCensorProfanity: {
120
+ mode: "blank", // "blank" ([____]), "remove", or "mask" (????)
121
+ alwaysCensor: ["brandname"],
122
+ neverCensor: ["damn"],
123
+ },
124
+ replacements: [
125
+ { find: "Mucks", replace: "Mux" },
126
+ ],
127
+ });
128
+
129
+ console.log(result.totalReplacementCount); // 8
130
+ console.log(result.autoCensorProfanity?.replacements); // [{cueStartTime: 5, before: "shit", after: "[____]"}, ...]
131
+ ```
132
+
111
133
  **Semantic search embeddings:**
112
134
 
113
135
  ```ts
@@ -256,11 +256,11 @@ declare const chapterSchema: z.ZodObject<{
256
256
  startTime: z.ZodNumber;
257
257
  title: z.ZodString;
258
258
  }, "strip", z.ZodTypeAny, {
259
- title: string;
260
259
  startTime: number;
261
- }, {
262
260
  title: string;
261
+ }, {
263
262
  startTime: number;
263
+ title: string;
264
264
  }>;
265
265
  type Chapter = z.infer<typeof chapterSchema>;
266
266
  declare const chaptersSchema: z.ZodObject<{
@@ -268,21 +268,21 @@ declare const chaptersSchema: z.ZodObject<{
268
268
  startTime: z.ZodNumber;
269
269
  title: z.ZodString;
270
270
  }, "strip", z.ZodTypeAny, {
271
- title: string;
272
271
  startTime: number;
273
- }, {
274
272
  title: string;
273
+ }, {
275
274
  startTime: number;
275
+ title: string;
276
276
  }>, "many">;
277
277
  }, "strip", z.ZodTypeAny, {
278
278
  chapters: {
279
- title: string;
280
279
  startTime: number;
280
+ title: string;
281
281
  }[];
282
282
  }, {
283
283
  chapters: {
284
- title: string;
285
284
  startTime: number;
285
+ title: string;
286
286
  }[];
287
287
  }>;
288
288
  type ChaptersType = z.infer<typeof chaptersSchema>;
@@ -348,6 +348,119 @@ interface ChaptersOptions extends MuxAIOptions {
348
348
  type ChapterSystemPromptSections = "role" | "context" | "constraints" | "qualityGuidelines";
349
349
  declare function generateChapters(assetId: string, languageCode: string, options?: ChaptersOptions): Promise<ChaptersResult>;
350
350
 
351
+ /** Replacement strategy for censored words. */
352
+ type CensorMode = "blank" | "remove" | "mask";
353
+ interface AutoCensorProfanityOptions {
354
+ mode?: CensorMode;
355
+ alwaysCensor?: string[];
356
+ neverCensor?: string[];
357
+ }
358
+ interface CaptionReplacement {
359
+ find: string;
360
+ replace: string;
361
+ }
362
+ interface ReplacementRecord {
363
+ cueStartTime: number;
364
+ before: string;
365
+ after: string;
366
+ }
367
+ /** Configuration accepted by `editCaptions`. */
368
+ interface EditCaptionsOptions<P extends SupportedProvider = SupportedProvider> extends MuxAIOptions {
369
+ /** Provider responsible for profanity detection. Required when autoCensorProfanity is set. */
370
+ provider?: P;
371
+ /** Provider-specific chat model identifier. */
372
+ model?: ModelIdByProvider[P];
373
+ /** LLM-powered profanity censorship. */
374
+ autoCensorProfanity?: AutoCensorProfanityOptions;
375
+ /** Static find/replace pairs (no LLM needed). */
376
+ replacements?: CaptionReplacement[];
377
+ /** Delete the original track after creating the edited one. Defaults to true. */
378
+ deleteOriginalTrack?: boolean;
379
+ /**
380
+ * When true (default) the edited VTT is uploaded to the configured
381
+ * bucket and attached to the Mux asset.
382
+ */
383
+ uploadToMux?: boolean;
384
+ /** Optional override for the S3-compatible endpoint used for uploads. */
385
+ s3Endpoint?: string;
386
+ /** S3 region (defaults to env.S3_REGION or 'auto'). */
387
+ s3Region?: string;
388
+ /** Bucket that will store edited VTT files. */
389
+ s3Bucket?: string;
390
+ /** Suffix appended to the original track name, e.g. "edited" produces "Subtitles (edited)". Defaults to "edited". */
391
+ trackNameSuffix?: string;
392
+ /** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
393
+ s3SignedUrlExpirySeconds?: number;
394
+ }
395
+ /** Output returned from `editCaptions`. */
396
+ interface EditCaptionsResult {
397
+ assetId: string;
398
+ trackId: string;
399
+ originalVtt: string;
400
+ editedVtt: string;
401
+ totalReplacementCount: number;
402
+ autoCensorProfanity?: {
403
+ replacements: ReplacementRecord[];
404
+ };
405
+ replacements?: {
406
+ replacements: ReplacementRecord[];
407
+ };
408
+ uploadedTrackId?: string;
409
+ presignedUrl?: string;
410
+ usage?: TokenUsage;
411
+ }
412
+ /** Schema used when requesting profanity detection from a language model. */
413
+ declare const profanityDetectionSchema: z.ZodObject<{
414
+ profanity: z.ZodArray<z.ZodString, "many">;
415
+ }, "strip", z.ZodTypeAny, {
416
+ profanity: string[];
417
+ }, {
418
+ profanity: string[];
419
+ }>;
420
+ /** Inferred shape returned by `profanityDetectionSchema`. */
421
+ type ProfanityDetectionPayload = z.infer<typeof profanityDetectionSchema>;
422
+ /**
423
+ * Applies a transform function only to VTT cue text lines, leaving headers,
424
+ * timestamps, and cue identifiers untouched. A cue text line is any line that
425
+ * follows a timestamp line (contains "-->") up until the next blank line.
426
+ * The transform receives the line text and the cue's start time in seconds.
427
+ */
428
+ declare function transformCueText(rawVtt: string, transform: (line: string, cueStartTime: number) => string): string;
429
+ /**
430
+ * Builds a case-insensitive word-boundary regex from an array of profane words.
431
+ * Words are sorted longest-first so multi-word phrases match before individual words.
432
+ */
433
+ declare function buildReplacementRegex(words: string[]): RegExp | null;
434
+ /**
435
+ * Returns a replacer function for the given censor mode.
436
+ */
437
+ declare function createReplacer(mode: CensorMode): (match: string) => string;
438
+ /**
439
+ * Applies profanity censorship to cue text lines in raw VTT content via
440
+ * regex replacement. Headers, timestamps, and cue identifiers are untouched.
441
+ */
442
+ declare function censorVttContent(rawVtt: string, profanity: string[], mode: CensorMode): {
443
+ censoredVtt: string;
444
+ replacements: ReplacementRecord[];
445
+ };
446
+ /**
447
+ * Merges `alwaysCensor` into and filters `neverCensor` from an LLM-detected
448
+ * profanity list. Comparison is case-insensitive. `neverCensor` takes
449
+ * precedence over `alwaysCensor` when the same word appears in both.
450
+ */
451
+ declare function applyOverrideLists(detected: string[], alwaysCensor: string[], neverCensor: string[]): string[];
452
+ /**
453
+ * Applies static find/replace pairs to cue text lines in raw VTT content
454
+ * using word-boundary regex. Case-sensitive matching since static replacements
455
+ * target specific known strings. Headers, timestamps, and cue identifiers are
456
+ * untouched. Returns the edited VTT and the total number of replacements.
457
+ */
458
+ declare function applyReplacements(rawVtt: string, replacements: CaptionReplacement[]): {
459
+ editedVtt: string;
460
+ replacements: ReplacementRecord[];
461
+ };
462
+ declare function editCaptions<P extends SupportedProvider = SupportedProvider>(assetId: string, trackId: string, options: EditCaptionsOptions<P>): Promise<EditCaptionsResult>;
463
+
351
464
  /** Configuration accepted by `generateEmbeddings`. */
352
465
  interface EmbeddingsOptions extends MuxAIOptions {
353
466
  /** AI provider used to generate embeddings (defaults to 'openai'). */
@@ -372,6 +485,8 @@ declare function generateVideoEmbeddings(assetId: string, options?: EmbeddingsOp
372
485
  /** Per-thumbnail moderation result returned from `getModerationScores`. */
373
486
  interface ThumbnailModerationScore {
374
487
  url: string;
488
+ /** Time in seconds of the thumbnail within the video. Absent for transcript moderation entries. */
489
+ time?: number;
375
490
  sexual: number;
376
491
  violence: number;
377
492
  error: boolean;
@@ -456,7 +571,9 @@ declare const HIVE_VIOLENCE_CATEGORIES: string[];
456
571
  */
457
572
  declare function getModerationScores(assetId: string, options?: ModerationOptions): Promise<ModerationResult>;
458
573
 
459
- declare const SUMMARY_KEYWORD_LIMIT = 10;
574
+ declare const DEFAULT_SUMMARY_KEYWORD_LIMIT = 10;
575
+ declare const DEFAULT_TITLE_LENGTH = 10;
576
+ declare const DEFAULT_DESCRIPTION_LENGTH = 50;
460
577
  declare const summarySchema: z.ZodObject<{
461
578
  keywords: z.ZodArray<z.ZodString, "many">;
462
579
  title: z.ZodString;
@@ -529,9 +646,9 @@ interface SummarizationOptions extends MuxAIOptions {
529
646
  * Useful for customizing the AI's output for specific use cases (SEO, social media, etc.)
530
647
  */
531
648
  promptOverrides?: SummarizationPromptOverrides;
532
- /** Desired title length in characters. */
649
+ /** Desired title length in words. */
533
650
  titleLength?: number;
534
- /** Desired description length in characters. */
651
+ /** Desired description length in words. */
535
652
  descriptionLength?: number;
536
653
  /** Desired number of tags. */
537
654
  tagCount?: number;
@@ -680,6 +797,8 @@ interface AudioTranslationOptions extends MuxAIOptions {
680
797
  uploadToMux?: boolean;
681
798
  /** Optional storage adapter override for upload + presign operations. */
682
799
  storageAdapter?: StorageAdapter;
800
+ /** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
801
+ s3SignedUrlExpirySeconds?: number;
683
802
  }
684
803
  declare function translateAudio(assetId: string, toLanguageCode: string, options?: AudioTranslationOptions): Promise<AudioTranslationResult>;
685
804
 
@@ -726,6 +845,28 @@ interface TranslationOptions<P extends SupportedProvider = SupportedProvider> ex
726
845
  uploadToMux?: boolean;
727
846
  /** Optional storage adapter override for upload + presign operations. */
728
847
  storageAdapter?: StorageAdapter;
848
+ /** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
849
+ s3SignedUrlExpirySeconds?: number;
850
+ /**
851
+ * Optional VTT-aware chunking for caption translation.
852
+ * When enabled, the workflow splits cue-aligned translation requests by
853
+ * cue count and text token budget, then rebuilds the final VTT locally.
854
+ */
855
+ chunking?: TranslationChunkingOptions;
856
+ }
857
+ interface TranslationChunkingOptions {
858
+ /** Set to false to translate all cues in a single structured request. Defaults to true. */
859
+ enabled?: boolean;
860
+ /** Prefer a single request until the asset is at least this long. Defaults to 30 minutes. */
861
+ minimumAssetDurationSeconds?: number;
862
+ /** Soft target for chunk duration once chunking starts. Defaults to 30 minutes. */
863
+ targetChunkDurationSeconds?: number;
864
+ /** Max number of concurrent translation requests when chunking. Defaults to 4. */
865
+ maxConcurrentTranslations?: number;
866
+ /** Hard cap for cues included in a single AI translation chunk. Defaults to 80. */
867
+ maxCuesPerChunk?: number;
868
+ /** Approximate cap for cue text tokens included in a single AI translation chunk. Defaults to 2000. */
869
+ maxCueTextTokensPerChunk?: number;
729
870
  }
730
871
  /** Schema used when requesting caption translation from a language model. */
731
872
  declare const translationSchema: z.ZodObject<{
@@ -737,6 +878,8 @@ declare const translationSchema: z.ZodObject<{
737
878
  }>;
738
879
  /** Inferred shape returned by `translationSchema`. */
739
880
  type TranslationPayload = z.infer<typeof translationSchema>;
881
+ declare function shouldSplitChunkTranslationError(error: unknown): boolean;
882
+ declare function aggregateTokenUsage(usages: TokenUsage[]): TokenUsage;
740
883
  declare function translateCaptions<P extends SupportedProvider = SupportedProvider>(assetId: string, fromLanguageCode: string, toLanguageCode: string, options: TranslationOptions<P>): Promise<TranslationResult>;
741
884
 
742
885
  type index_AskQuestionsOptions = AskQuestionsOptions;
@@ -744,11 +887,14 @@ type index_AskQuestionsResult = AskQuestionsResult;
744
887
  type index_AskQuestionsType = AskQuestionsType;
745
888
  type index_AudioTranslationOptions = AudioTranslationOptions;
746
889
  type index_AudioTranslationResult = AudioTranslationResult;
890
+ type index_AutoCensorProfanityOptions = AutoCensorProfanityOptions;
747
891
  type index_BurnedInCaptionsAnalysis = BurnedInCaptionsAnalysis;
748
892
  type index_BurnedInCaptionsOptions = BurnedInCaptionsOptions;
749
893
  type index_BurnedInCaptionsPromptOverrides = BurnedInCaptionsPromptOverrides;
750
894
  type index_BurnedInCaptionsPromptSections = BurnedInCaptionsPromptSections;
751
895
  type index_BurnedInCaptionsResult = BurnedInCaptionsResult;
896
+ type index_CaptionReplacement = CaptionReplacement;
897
+ type index_CensorMode = CensorMode;
752
898
  type index_Chapter = Chapter;
753
899
  type index_ChapterSystemPromptSections = ChapterSystemPromptSections;
754
900
  type index_ChaptersOptions = ChaptersOptions;
@@ -756,6 +902,11 @@ type index_ChaptersPromptOverrides = ChaptersPromptOverrides;
756
902
  type index_ChaptersPromptSections = ChaptersPromptSections;
757
903
  type index_ChaptersResult = ChaptersResult;
758
904
  type index_ChaptersType = ChaptersType;
905
+ declare const index_DEFAULT_DESCRIPTION_LENGTH: typeof DEFAULT_DESCRIPTION_LENGTH;
906
+ declare const index_DEFAULT_SUMMARY_KEYWORD_LIMIT: typeof DEFAULT_SUMMARY_KEYWORD_LIMIT;
907
+ declare const index_DEFAULT_TITLE_LENGTH: typeof DEFAULT_TITLE_LENGTH;
908
+ type index_EditCaptionsOptions<P extends SupportedProvider = SupportedProvider> = EditCaptionsOptions<P>;
909
+ type index_EditCaptionsResult = EditCaptionsResult;
759
910
  type index_EmbeddingsOptions = EmbeddingsOptions;
760
911
  type index_EmbeddingsResult = EmbeddingsResult;
761
912
  declare const index_HIVE_SEXUAL_CATEGORIES: typeof HIVE_SEXUAL_CATEGORIES;
@@ -765,36 +916,48 @@ type index_HiveModerationSource = HiveModerationSource;
765
916
  type index_ModerationOptions = ModerationOptions;
766
917
  type index_ModerationProvider = ModerationProvider;
767
918
  type index_ModerationResult = ModerationResult;
919
+ type index_ProfanityDetectionPayload = ProfanityDetectionPayload;
768
920
  type index_Question = Question;
769
921
  type index_QuestionAnswer = QuestionAnswer;
770
922
  type index_QuestionAnswerType = QuestionAnswerType;
771
- declare const index_SUMMARY_KEYWORD_LIMIT: typeof SUMMARY_KEYWORD_LIMIT;
923
+ type index_ReplacementRecord = ReplacementRecord;
772
924
  type index_SummarizationOptions = SummarizationOptions;
773
925
  type index_SummarizationPromptOverrides = SummarizationPromptOverrides;
774
926
  type index_SummarizationPromptSections = SummarizationPromptSections;
775
927
  type index_SummaryAndTagsResult = SummaryAndTagsResult;
776
928
  type index_SummaryType = SummaryType;
777
929
  type index_ThumbnailModerationScore = ThumbnailModerationScore;
930
+ type index_TranslationChunkingOptions = TranslationChunkingOptions;
778
931
  type index_TranslationOptions<P extends SupportedProvider = SupportedProvider> = TranslationOptions<P>;
779
932
  type index_TranslationPayload = TranslationPayload;
780
933
  type index_TranslationResult = TranslationResult;
934
+ declare const index_aggregateTokenUsage: typeof aggregateTokenUsage;
935
+ declare const index_applyOverrideLists: typeof applyOverrideLists;
936
+ declare const index_applyReplacements: typeof applyReplacements;
781
937
  declare const index_askQuestions: typeof askQuestions;
938
+ declare const index_buildReplacementRegex: typeof buildReplacementRegex;
782
939
  declare const index_burnedInCaptionsSchema: typeof burnedInCaptionsSchema;
940
+ declare const index_censorVttContent: typeof censorVttContent;
783
941
  declare const index_chapterSchema: typeof chapterSchema;
784
942
  declare const index_chaptersSchema: typeof chaptersSchema;
943
+ declare const index_createReplacer: typeof createReplacer;
944
+ declare const index_editCaptions: typeof editCaptions;
785
945
  declare const index_generateChapters: typeof generateChapters;
786
946
  declare const index_generateEmbeddings: typeof generateEmbeddings;
787
947
  declare const index_generateVideoEmbeddings: typeof generateVideoEmbeddings;
788
948
  declare const index_getModerationScores: typeof getModerationScores;
789
949
  declare const index_getSummaryAndTags: typeof getSummaryAndTags;
790
950
  declare const index_hasBurnedInCaptions: typeof hasBurnedInCaptions;
951
+ declare const index_profanityDetectionSchema: typeof profanityDetectionSchema;
791
952
  declare const index_questionAnswerSchema: typeof questionAnswerSchema;
953
+ declare const index_shouldSplitChunkTranslationError: typeof shouldSplitChunkTranslationError;
792
954
  declare const index_summarySchema: typeof summarySchema;
955
+ declare const index_transformCueText: typeof transformCueText;
793
956
  declare const index_translateAudio: typeof translateAudio;
794
957
  declare const index_translateCaptions: typeof translateCaptions;
795
958
  declare const index_translationSchema: typeof translationSchema;
796
959
  declare namespace index {
797
- export { type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, index_SUMMARY_KEYWORD_LIMIT as SUMMARY_KEYWORD_LIMIT, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_askQuestions as askQuestions, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_questionAnswerSchema as questionAnswerSchema, index_summarySchema as summarySchema, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema };
960
+ export { type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_AutoCensorProfanityOptions as AutoCensorProfanityOptions, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_CaptionReplacement as CaptionReplacement, type index_CensorMode as CensorMode, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, index_DEFAULT_DESCRIPTION_LENGTH as DEFAULT_DESCRIPTION_LENGTH, index_DEFAULT_SUMMARY_KEYWORD_LIMIT as DEFAULT_SUMMARY_KEYWORD_LIMIT, index_DEFAULT_TITLE_LENGTH as DEFAULT_TITLE_LENGTH, type index_EditCaptionsOptions as EditCaptionsOptions, type index_EditCaptionsResult as EditCaptionsResult, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_ProfanityDetectionPayload as ProfanityDetectionPayload, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, type index_ReplacementRecord as ReplacementRecord, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, index_applyOverrideLists as applyOverrideLists, index_applyReplacements as applyReplacements, index_askQuestions as askQuestions, index_buildReplacementRegex as buildReplacementRegex, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_censorVttContent as censorVttContent, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_createReplacer as createReplacer, index_editCaptions as editCaptions, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_profanityDetectionSchema as profanityDetectionSchema, index_questionAnswerSchema as questionAnswerSchema, index_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_transformCueText as transformCueText, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema };
798
961
  }
799
962
 
800
- export { translateCaptions as $, type AskQuestionsOptions as A, type BurnedInCaptionsAnalysis as B, type Chapter as C, type SummaryAndTagsResult as D, type EmbeddingsOptions as E, type SummaryType as F, type TranslationOptions as G, HIVE_SEXUAL_CATEGORIES as H, type TranslationPayload as I, type TranslationResult as J, askQuestions as K, burnedInCaptionsSchema as L, type ModerationOptions as M, chapterSchema as N, chaptersSchema as O, generateChapters as P, type Question as Q, generateEmbeddings as R, SUMMARY_KEYWORD_LIMIT as S, type ThumbnailModerationScore as T, generateVideoEmbeddings as U, getModerationScores as V, getSummaryAndTags as W, hasBurnedInCaptions as X, questionAnswerSchema as Y, summarySchema as Z, translateAudio as _, type AskQuestionsResult as a, translationSchema as a0, type AskQuestionsType as b, type AudioTranslationOptions as c, type AudioTranslationResult as d, type BurnedInCaptionsOptions as e, type BurnedInCaptionsPromptOverrides as f, type BurnedInCaptionsPromptSections as g, type BurnedInCaptionsResult as h, index as i, type ChapterSystemPromptSections as j, type ChaptersOptions as k, type ChaptersPromptOverrides as l, type ChaptersPromptSections as m, type ChaptersResult as n, type ChaptersType as o, type EmbeddingsResult as p, HIVE_VIOLENCE_CATEGORIES as q, type HiveModerationOutput as r, type HiveModerationSource as s, type ModerationProvider as t, type ModerationResult as u, type QuestionAnswer as v, type QuestionAnswerType as w, type SummarizationOptions as x, type SummarizationPromptOverrides as y, type SummarizationPromptSections as z };
963
+ export { askQuestions as $, type AskQuestionsOptions as A, type BurnedInCaptionsAnalysis as B, type CaptionReplacement as C, DEFAULT_DESCRIPTION_LENGTH as D, type EditCaptionsOptions as E, type ModerationProvider as F, type ModerationResult as G, HIVE_SEXUAL_CATEGORIES as H, type QuestionAnswer as I, type QuestionAnswerType as J, type SummarizationPromptOverrides as K, type SummarizationPromptSections as L, type ModerationOptions as M, type SummaryAndTagsResult as N, type SummaryType as O, type ProfanityDetectionPayload as P, type Question as Q, type ReplacementRecord as R, type SummarizationOptions as S, type ThumbnailModerationScore as T, type TranslationChunkingOptions as U, type TranslationOptions as V, type TranslationPayload as W, type TranslationResult as X, aggregateTokenUsage as Y, applyOverrideLists as Z, applyReplacements as _, type AskQuestionsResult as a, buildReplacementRegex as a0, burnedInCaptionsSchema as a1, censorVttContent as a2, chapterSchema as a3, chaptersSchema as a4, createReplacer as a5, editCaptions as a6, generateChapters as a7, generateEmbeddings as a8, generateVideoEmbeddings as a9, getModerationScores as aa, getSummaryAndTags as ab, hasBurnedInCaptions as ac, profanityDetectionSchema as ad, questionAnswerSchema as ae, shouldSplitChunkTranslationError as af, summarySchema as ag, transformCueText as ah, translateAudio as ai, translateCaptions as aj, translationSchema as ak, type AskQuestionsType as b, type AudioTranslationOptions as c, type AudioTranslationResult as d, type AutoCensorProfanityOptions as e, type BurnedInCaptionsOptions as f, type BurnedInCaptionsPromptOverrides as g, type BurnedInCaptionsPromptSections as h, index as i, type BurnedInCaptionsResult as j, type CensorMode as k, type Chapter as l, type ChapterSystemPromptSections as m, type ChaptersOptions as n, type ChaptersPromptOverrides as o, type ChaptersPromptSections as p, type ChaptersResult as q, type ChaptersType as r, DEFAULT_SUMMARY_KEYWORD_LIMIT as s, DEFAULT_TITLE_LENGTH as t, type EditCaptionsResult as u, type EmbeddingsOptions as v, type EmbeddingsResult as w, HIVE_VIOLENCE_CATEGORIES as x, type HiveModerationOutput as y, type HiveModerationSource as z };
@@ -99,6 +99,67 @@ declare function getHotspotsForVideo(videoId: string, options?: HotspotOptions):
99
99
  */
100
100
  declare function getHotspotsForPlaybackId(playbackId: string, options?: HotspotOptions): Promise<Hotspot[]>;
101
101
 
102
+ interface Shot {
103
+ /** Start time of the shot in seconds from the beginning of the asset. */
104
+ startTime: number;
105
+ /** Signed URL for a representative image of the shot. */
106
+ imageUrl: string;
107
+ }
108
+ interface PendingShotsResult {
109
+ status: "pending";
110
+ createdAt: string;
111
+ }
112
+ interface ErroredShotsResult {
113
+ status: "errored";
114
+ createdAt: string;
115
+ error: {
116
+ type: string;
117
+ messages: string[];
118
+ };
119
+ }
120
+ interface CompletedShotsResult {
121
+ status: "completed";
122
+ createdAt: string;
123
+ shots: Shot[];
124
+ }
125
+ type ShotsResult = PendingShotsResult | ErroredShotsResult | CompletedShotsResult;
126
+ interface ShotRequestOptions {
127
+ /** Optional workflow credentials */
128
+ credentials?: WorkflowCredentialsInput;
129
+ }
130
+ interface WaitForShotsOptions extends ShotRequestOptions {
131
+ /** Polling interval in milliseconds (default: 2000, minimum enforced: 1000) */
132
+ pollIntervalMs?: number;
133
+ /** Maximum number of polling attempts (default: 60) */
134
+ maxAttempts?: number;
135
+ /** When true, request shot generation before polling (default: true) */
136
+ createIfMissing?: boolean;
137
+ }
138
+ /**
139
+ * Starts generating shots for an asset.
140
+ *
141
+ * @param assetId - The Mux asset ID
142
+ * @param options - Request options
143
+ * @returns Pending shot generation state
144
+ */
145
+ declare function requestShotsForAsset(assetId: string, options?: ShotRequestOptions): Promise<PendingShotsResult>;
146
+ /**
147
+ * Gets the current shot generation status for an asset.
148
+ *
149
+ * @param assetId - The Mux asset ID
150
+ * @param options - Request options
151
+ * @returns Pending, errored, or completed shot result
152
+ */
153
+ declare function getShotsForAsset(assetId: string, options?: ShotRequestOptions): Promise<ShotsResult>;
154
+ /**
155
+ * Requests shot generation if needed and polls until shots are completed.
156
+ *
157
+ * @param assetId - The Mux asset ID
158
+ * @param options - Polling options
159
+ * @returns Completed shot result
160
+ */
161
+ declare function waitForShotsForAsset(assetId: string, options?: WaitForShotsOptions): Promise<CompletedShotsResult>;
162
+
102
163
  declare const DEFAULT_STORYBOARD_WIDTH = 640;
103
164
  /**
104
165
  * Generates a storyboard URL for the given playback ID.
@@ -156,6 +217,14 @@ declare function extractTimestampedTranscript(vttContent: string): string;
156
217
  * @returns Array of VTT cues with start/end times and text
157
218
  */
158
219
  declare function parseVTTCues(vttContent: string): VTTCue[];
220
+ declare function splitVttPreambleAndCueBlocks(vttContent: string): {
221
+ preamble: string;
222
+ cueBlocks: string[];
223
+ };
224
+ declare function buildVttFromCueBlocks(cueBlocks: string[], preamble?: string): string;
225
+ declare function replaceCueText(cueBlock: string, translatedText: string): string;
226
+ declare function buildVttFromTranslatedCueBlocks(cueBlocks: string[], translatedTexts: string[], preamble?: string): string;
227
+ declare function concatenateVttSegments(segments: string[], preamble?: string): string;
159
228
  /**
160
229
  * Builds a transcript URL for the given playback ID and track ID.
161
230
  * If a signing context is provided, the URL will be signed with a token.
@@ -168,6 +237,38 @@ declare function parseVTTCues(vttContent: string): VTTCue[];
168
237
  declare function buildTranscriptUrl(playbackId: string, trackId: string, shouldSign?: boolean, credentials?: WorkflowCredentialsInput): Promise<string>;
169
238
  declare function fetchTranscriptForAsset(asset: MuxAsset, playbackId: string, options?: TranscriptFetchOptions): Promise<TranscriptResult>;
170
239
 
240
+ /**
241
+ * Generic text-first chunking utilities.
242
+ *
243
+ * Reach for this module when the downstream consumer only needs chunk text plus
244
+ * lightweight metadata such as token count or approximate start/end times.
245
+ * These helpers are ideal for embeddings, retrieval, summarization inputs, or
246
+ * other workflows where preserving the original document format is not required.
247
+ *
248
+ * This module also includes cue-preserving chunk planners for VTT workflows.
249
+ * Those helpers still operate at the chunk-planning layer; if you need to split
250
+ * or rebuild full VTT documents, use the VTT structure helpers from
251
+ * `@mux/ai/primitives/transcripts`.
252
+ */
253
+ interface VTTDurationChunkingOptions {
254
+ targetChunkDurationSeconds: number;
255
+ maxChunkDurationSeconds: number;
256
+ minChunkDurationSeconds?: number;
257
+ boundaryLookaheadCues?: number;
258
+ boundaryPauseSeconds?: number;
259
+ }
260
+ interface VTTCueBudgetChunkingOptions {
261
+ maxCuesPerChunk: number;
262
+ maxTextTokensPerChunk?: number;
263
+ }
264
+ interface VTTDurationChunk {
265
+ id: string;
266
+ cueStartIndex: number;
267
+ cueEndIndex: number;
268
+ cueCount: number;
269
+ startTime: number;
270
+ endTime: number;
271
+ }
171
272
  /**
172
273
  * Simple token counter that approximates tokens by word count.
173
274
  * For production use with OpenAI, consider using a proper tokenizer like tiktoken.
@@ -193,6 +294,8 @@ declare function chunkByTokens(text: string, maxTokens: number, overlapTokens?:
193
294
  * @returns Array of text chunks with accurate start/end times
194
295
  */
195
296
  declare function chunkVTTCues(cues: VTTCue[], maxTokens: number, overlapCues?: number): TextChunk[];
297
+ declare function chunkVTTCuesByBudget(cues: VTTCue[], options: VTTCueBudgetChunkingOptions): VTTDurationChunk[];
298
+ declare function chunkVTTCuesByDuration(cues: VTTCue[], options: VTTDurationChunkingOptions): VTTDurationChunk[];
196
299
  /**
197
300
  * Chunks text according to the specified strategy.
198
301
  *
@@ -221,24 +324,42 @@ interface ThumbnailOptions {
221
324
  * @param playbackId - The Mux playback ID
222
325
  * @param duration - Video duration in seconds
223
326
  * @param options - Thumbnail generation options
224
- * @returns Array of thumbnail URLs (signed if shouldSign is true)
327
+ * @returns Array of objects containing the thumbnail URL and its time in seconds
225
328
  */
226
- declare function getThumbnailUrls(playbackId: string, duration: number, options?: ThumbnailOptions): Promise<string[]>;
329
+ declare function getThumbnailUrls(playbackId: string, duration: number, options?: ThumbnailOptions): Promise<Array<{
330
+ url: string;
331
+ time: number;
332
+ }>>;
227
333
 
334
+ type index_CompletedShotsResult = CompletedShotsResult;
228
335
  declare const index_DEFAULT_STORYBOARD_WIDTH: typeof DEFAULT_STORYBOARD_WIDTH;
336
+ type index_ErroredShotsResult = ErroredShotsResult;
229
337
  type index_HeatmapOptions = HeatmapOptions;
230
338
  type index_HeatmapResponse = HeatmapResponse;
231
339
  type index_Hotspot = Hotspot;
232
340
  type index_HotspotOptions = HotspotOptions;
233
341
  type index_HotspotResponse = HotspotResponse;
342
+ type index_PendingShotsResult = PendingShotsResult;
343
+ type index_Shot = Shot;
344
+ type index_ShotRequestOptions = ShotRequestOptions;
345
+ type index_ShotsResult = ShotsResult;
234
346
  type index_ThumbnailOptions = ThumbnailOptions;
235
347
  type index_TranscriptFetchOptions = TranscriptFetchOptions;
236
348
  type index_TranscriptResult = TranscriptResult;
237
349
  type index_VTTCue = VTTCue;
350
+ type index_VTTCueBudgetChunkingOptions = VTTCueBudgetChunkingOptions;
351
+ type index_VTTDurationChunk = VTTDurationChunk;
352
+ type index_VTTDurationChunkingOptions = VTTDurationChunkingOptions;
353
+ type index_WaitForShotsOptions = WaitForShotsOptions;
238
354
  declare const index_buildTranscriptUrl: typeof buildTranscriptUrl;
355
+ declare const index_buildVttFromCueBlocks: typeof buildVttFromCueBlocks;
356
+ declare const index_buildVttFromTranslatedCueBlocks: typeof buildVttFromTranslatedCueBlocks;
239
357
  declare const index_chunkByTokens: typeof chunkByTokens;
240
358
  declare const index_chunkText: typeof chunkText;
241
359
  declare const index_chunkVTTCues: typeof chunkVTTCues;
360
+ declare const index_chunkVTTCuesByBudget: typeof chunkVTTCuesByBudget;
361
+ declare const index_chunkVTTCuesByDuration: typeof chunkVTTCuesByDuration;
362
+ declare const index_concatenateVttSegments: typeof concatenateVttSegments;
242
363
  declare const index_estimateTokenCount: typeof estimateTokenCount;
243
364
  declare const index_extractTextFromVTT: typeof extractTextFromVTT;
244
365
  declare const index_extractTimestampedTranscript: typeof extractTimestampedTranscript;
@@ -251,13 +372,18 @@ declare const index_getHotspotsForAsset: typeof getHotspotsForAsset;
251
372
  declare const index_getHotspotsForPlaybackId: typeof getHotspotsForPlaybackId;
252
373
  declare const index_getHotspotsForVideo: typeof getHotspotsForVideo;
253
374
  declare const index_getReadyTextTracks: typeof getReadyTextTracks;
375
+ declare const index_getShotsForAsset: typeof getShotsForAsset;
254
376
  declare const index_getStoryboardUrl: typeof getStoryboardUrl;
255
377
  declare const index_getThumbnailUrls: typeof getThumbnailUrls;
256
378
  declare const index_parseVTTCues: typeof parseVTTCues;
379
+ declare const index_replaceCueText: typeof replaceCueText;
380
+ declare const index_requestShotsForAsset: typeof requestShotsForAsset;
257
381
  declare const index_secondsToTimestamp: typeof secondsToTimestamp;
382
+ declare const index_splitVttPreambleAndCueBlocks: typeof splitVttPreambleAndCueBlocks;
258
383
  declare const index_vttTimestampToSeconds: typeof vttTimestampToSeconds;
384
+ declare const index_waitForShotsForAsset: typeof waitForShotsForAsset;
259
385
  declare namespace index {
260
- export { index_DEFAULT_STORYBOARD_WIDTH as DEFAULT_STORYBOARD_WIDTH, type index_HeatmapOptions as HeatmapOptions, type index_HeatmapResponse as HeatmapResponse, type index_Hotspot as Hotspot, type index_HotspotOptions as HotspotOptions, type index_HotspotResponse as HotspotResponse, type index_ThumbnailOptions as ThumbnailOptions, type index_TranscriptFetchOptions as TranscriptFetchOptions, type index_TranscriptResult as TranscriptResult, type index_VTTCue as VTTCue, index_buildTranscriptUrl as buildTranscriptUrl, index_chunkByTokens as chunkByTokens, index_chunkText as chunkText, index_chunkVTTCues as chunkVTTCues, index_estimateTokenCount as estimateTokenCount, index_extractTextFromVTT as extractTextFromVTT, index_extractTimestampedTranscript as extractTimestampedTranscript, index_fetchTranscriptForAsset as fetchTranscriptForAsset, index_findCaptionTrack as findCaptionTrack, index_getHeatmapForAsset as getHeatmapForAsset, index_getHeatmapForPlaybackId as getHeatmapForPlaybackId, index_getHeatmapForVideo as getHeatmapForVideo, index_getHotspotsForAsset as getHotspotsForAsset, index_getHotspotsForPlaybackId as getHotspotsForPlaybackId, index_getHotspotsForVideo as getHotspotsForVideo, index_getReadyTextTracks as getReadyTextTracks, index_getStoryboardUrl as getStoryboardUrl, index_getThumbnailUrls as getThumbnailUrls, index_parseVTTCues as parseVTTCues, index_secondsToTimestamp as secondsToTimestamp, index_vttTimestampToSeconds as vttTimestampToSeconds };
386
+ export { type index_CompletedShotsResult as CompletedShotsResult, index_DEFAULT_STORYBOARD_WIDTH as DEFAULT_STORYBOARD_WIDTH, type index_ErroredShotsResult as ErroredShotsResult, type index_HeatmapOptions as HeatmapOptions, type index_HeatmapResponse as HeatmapResponse, type index_Hotspot as Hotspot, type index_HotspotOptions as HotspotOptions, type index_HotspotResponse as HotspotResponse, type index_PendingShotsResult as PendingShotsResult, type index_Shot as Shot, type index_ShotRequestOptions as ShotRequestOptions, type index_ShotsResult as ShotsResult, type index_ThumbnailOptions as ThumbnailOptions, type index_TranscriptFetchOptions as TranscriptFetchOptions, type index_TranscriptResult as TranscriptResult, type index_VTTCue as VTTCue, type index_VTTCueBudgetChunkingOptions as VTTCueBudgetChunkingOptions, type index_VTTDurationChunk as VTTDurationChunk, type index_VTTDurationChunkingOptions as VTTDurationChunkingOptions, type index_WaitForShotsOptions as WaitForShotsOptions, index_buildTranscriptUrl as buildTranscriptUrl, index_buildVttFromCueBlocks as buildVttFromCueBlocks, index_buildVttFromTranslatedCueBlocks as buildVttFromTranslatedCueBlocks, index_chunkByTokens as chunkByTokens, index_chunkText as chunkText, index_chunkVTTCues as chunkVTTCues, index_chunkVTTCuesByBudget as chunkVTTCuesByBudget, index_chunkVTTCuesByDuration as chunkVTTCuesByDuration, index_concatenateVttSegments as concatenateVttSegments, index_estimateTokenCount as estimateTokenCount, index_extractTextFromVTT as extractTextFromVTT, index_extractTimestampedTranscript as extractTimestampedTranscript, index_fetchTranscriptForAsset as fetchTranscriptForAsset, index_findCaptionTrack as findCaptionTrack, index_getHeatmapForAsset as getHeatmapForAsset, index_getHeatmapForPlaybackId as getHeatmapForPlaybackId, index_getHeatmapForVideo as getHeatmapForVideo, index_getHotspotsForAsset as getHotspotsForAsset, index_getHotspotsForPlaybackId as getHotspotsForPlaybackId, index_getHotspotsForVideo as getHotspotsForVideo, index_getReadyTextTracks as getReadyTextTracks, index_getShotsForAsset as getShotsForAsset, index_getStoryboardUrl as getStoryboardUrl, index_getThumbnailUrls as getThumbnailUrls, index_parseVTTCues as parseVTTCues, index_replaceCueText as replaceCueText, index_requestShotsForAsset as requestShotsForAsset, index_secondsToTimestamp as secondsToTimestamp, index_splitVttPreambleAndCueBlocks as splitVttPreambleAndCueBlocks, index_vttTimestampToSeconds as vttTimestampToSeconds, index_waitForShotsForAsset as waitForShotsForAsset };
261
387
  }
262
388
 
263
- export { secondsToTimestamp as A, vttTimestampToSeconds as B, DEFAULT_STORYBOARD_WIDTH as D, type HeatmapOptions as H, type ThumbnailOptions as T, type VTTCue as V, type HeatmapResponse as a, type Hotspot as b, type HotspotOptions as c, type HotspotResponse as d, type TranscriptFetchOptions as e, type TranscriptResult as f, buildTranscriptUrl as g, chunkByTokens as h, index as i, chunkText as j, chunkVTTCues as k, estimateTokenCount as l, extractTextFromVTT as m, extractTimestampedTranscript as n, fetchTranscriptForAsset as o, findCaptionTrack as p, getHeatmapForAsset as q, getHeatmapForPlaybackId as r, getHeatmapForVideo as s, getHotspotsForAsset as t, getHotspotsForPlaybackId as u, getHotspotsForVideo as v, getReadyTextTracks as w, getStoryboardUrl as x, getThumbnailUrls as y, parseVTTCues as z };
389
+ export { getHeatmapForAsset as A, getHeatmapForPlaybackId as B, type CompletedShotsResult as C, DEFAULT_STORYBOARD_WIDTH as D, type ErroredShotsResult as E, getHeatmapForVideo as F, getHotspotsForAsset as G, type HeatmapOptions as H, getHotspotsForPlaybackId as I, getHotspotsForVideo as J, getReadyTextTracks as K, getShotsForAsset as L, getStoryboardUrl as M, getThumbnailUrls as N, parseVTTCues as O, type PendingShotsResult as P, replaceCueText as Q, requestShotsForAsset as R, type Shot as S, type ThumbnailOptions as T, secondsToTimestamp as U, type VTTCue as V, type WaitForShotsOptions as W, splitVttPreambleAndCueBlocks as X, vttTimestampToSeconds as Y, waitForShotsForAsset as Z, type HeatmapResponse as a, type Hotspot as b, type HotspotOptions as c, type HotspotResponse as d, type ShotRequestOptions as e, type ShotsResult as f, type TranscriptFetchOptions as g, type TranscriptResult as h, index as i, type VTTCueBudgetChunkingOptions as j, type VTTDurationChunk as k, type VTTDurationChunkingOptions as l, buildTranscriptUrl as m, buildVttFromCueBlocks as n, buildVttFromTranslatedCueBlocks as o, chunkByTokens as p, chunkText as q, chunkVTTCues as r, chunkVTTCuesByBudget as s, chunkVTTCuesByDuration as t, concatenateVttSegments as u, estimateTokenCount as v, extractTextFromVTT as w, extractTimestampedTranscript as x, fetchTranscriptForAsset as y, findCaptionTrack as z };
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './types-BRbaGW3t.js';
2
2
  export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, M as MuxAIOptions, d as MuxAsset, P as PlaybackAsset, e as PlaybackPolicy, f as StorageAdapter, T as TextChunk, g as TokenChunkingConfig, h as TokenUsage, i as ToneType, U as UsageMetadata, V as VTTChunkingConfig, j as VideoEmbeddingsResult, k as WorkflowCredentialsInput, l as WorkflowMuxClient, m as decryptFromWorkflow, n as encryptForWorkflow } from './types-BRbaGW3t.js';
3
3
  import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
4
- export { i as primitives } from './index-Nxf6BaBO.js';
5
- export { i as workflows } from './index-CkJStzYO.js';
4
+ export { i as primitives } from './index-DLhfJsOd.js';
5
+ export { i as workflows } from './index-BapL6paa.js';
6
6
  import '@mux/mux-node';
7
7
  import 'zod';
8
8
  import '@ai-sdk/anthropic';
9
9
  import '@ai-sdk/google';
10
10
  import '@ai-sdk/openai';
11
11
 
12
- var version = "0.9.0";
12
+ var version = "0.11.0";
13
13
 
14
14
  /**
15
15
  * A function that returns workflow credentials, either synchronously or asynchronously.