@mux/ai 0.10.0 → 0.12.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
@@ -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.
@@ -270,12 +331,18 @@ declare function getThumbnailUrls(playbackId: string, duration: number, options?
270
331
  time: number;
271
332
  }>>;
272
333
 
334
+ type index_CompletedShotsResult = CompletedShotsResult;
273
335
  declare const index_DEFAULT_STORYBOARD_WIDTH: typeof DEFAULT_STORYBOARD_WIDTH;
336
+ type index_ErroredShotsResult = ErroredShotsResult;
274
337
  type index_HeatmapOptions = HeatmapOptions;
275
338
  type index_HeatmapResponse = HeatmapResponse;
276
339
  type index_Hotspot = Hotspot;
277
340
  type index_HotspotOptions = HotspotOptions;
278
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;
279
346
  type index_ThumbnailOptions = ThumbnailOptions;
280
347
  type index_TranscriptFetchOptions = TranscriptFetchOptions;
281
348
  type index_TranscriptResult = TranscriptResult;
@@ -283,6 +350,7 @@ type index_VTTCue = VTTCue;
283
350
  type index_VTTCueBudgetChunkingOptions = VTTCueBudgetChunkingOptions;
284
351
  type index_VTTDurationChunk = VTTDurationChunk;
285
352
  type index_VTTDurationChunkingOptions = VTTDurationChunkingOptions;
353
+ type index_WaitForShotsOptions = WaitForShotsOptions;
286
354
  declare const index_buildTranscriptUrl: typeof buildTranscriptUrl;
287
355
  declare const index_buildVttFromCueBlocks: typeof buildVttFromCueBlocks;
288
356
  declare const index_buildVttFromTranslatedCueBlocks: typeof buildVttFromTranslatedCueBlocks;
@@ -304,15 +372,18 @@ declare const index_getHotspotsForAsset: typeof getHotspotsForAsset;
304
372
  declare const index_getHotspotsForPlaybackId: typeof getHotspotsForPlaybackId;
305
373
  declare const index_getHotspotsForVideo: typeof getHotspotsForVideo;
306
374
  declare const index_getReadyTextTracks: typeof getReadyTextTracks;
375
+ declare const index_getShotsForAsset: typeof getShotsForAsset;
307
376
  declare const index_getStoryboardUrl: typeof getStoryboardUrl;
308
377
  declare const index_getThumbnailUrls: typeof getThumbnailUrls;
309
378
  declare const index_parseVTTCues: typeof parseVTTCues;
310
379
  declare const index_replaceCueText: typeof replaceCueText;
380
+ declare const index_requestShotsForAsset: typeof requestShotsForAsset;
311
381
  declare const index_secondsToTimestamp: typeof secondsToTimestamp;
312
382
  declare const index_splitVttPreambleAndCueBlocks: typeof splitVttPreambleAndCueBlocks;
313
383
  declare const index_vttTimestampToSeconds: typeof vttTimestampToSeconds;
384
+ declare const index_waitForShotsForAsset: typeof waitForShotsForAsset;
314
385
  declare namespace index {
315
- 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, type index_VTTCueBudgetChunkingOptions as VTTCueBudgetChunkingOptions, type index_VTTDurationChunk as VTTDurationChunk, type index_VTTDurationChunkingOptions as VTTDurationChunkingOptions, 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_getStoryboardUrl as getStoryboardUrl, index_getThumbnailUrls as getThumbnailUrls, index_parseVTTCues as parseVTTCues, index_replaceCueText as replaceCueText, index_secondsToTimestamp as secondsToTimestamp, index_splitVttPreambleAndCueBlocks as splitVttPreambleAndCueBlocks, 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 };
316
387
  }
317
388
 
318
- export { getHeatmapForVideo as A, getHotspotsForAsset as B, getHotspotsForPlaybackId as C, DEFAULT_STORYBOARD_WIDTH as D, getHotspotsForVideo as E, getReadyTextTracks as F, getStoryboardUrl as G, type HeatmapOptions as H, getThumbnailUrls as I, parseVTTCues as J, replaceCueText as K, secondsToTimestamp as L, splitVttPreambleAndCueBlocks as M, vttTimestampToSeconds as N, 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, type VTTCueBudgetChunkingOptions as g, type VTTDurationChunk as h, index as i, type VTTDurationChunkingOptions as j, buildTranscriptUrl as k, buildVttFromCueBlocks as l, buildVttFromTranslatedCueBlocks as m, chunkByTokens as n, chunkText as o, chunkVTTCues as p, chunkVTTCuesByBudget as q, chunkVTTCuesByDuration as r, concatenateVttSegments as s, estimateTokenCount as t, extractTextFromVTT as u, extractTimestampedTranscript as v, fetchTranscriptForAsset as w, findCaptionTrack as x, getHeatmapForAsset as y, getHeatmapForPlaybackId 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 };
@@ -43,12 +43,14 @@ interface Question {
43
43
  interface QuestionAnswer {
44
44
  /** The original question */
45
45
  question: string;
46
- /** Answer selected from the allowed options */
47
- answer: string;
48
- /** Confidence score between 0 and 1 */
46
+ /** Answer selected from the allowed options. Undefined when skipped. */
47
+ answer?: string;
48
+ /** Confidence score between 0 and 1. Always 0 when skipped. */
49
49
  confidence: number;
50
- /** Reasoning explaining the answer based on observable evidence */
50
+ /** Reasoning explaining the answer, or why the question was skipped */
51
51
  reasoning: string;
52
+ /** Whether the question was skipped due to irrelevance to the video content */
53
+ skipped: boolean;
52
54
  }
53
55
  /** Configuration options for askQuestions workflow. */
54
56
  interface AskQuestionsOptions extends MuxAIOptions {
@@ -82,22 +84,25 @@ interface AskQuestionsResult {
82
84
  /** Raw transcript text used for analysis (when includeTranscript is true). */
83
85
  transcriptText?: string;
84
86
  }
85
- /** Zod schema for a single answer. */
87
+ /** Zod schema for a single answer (matches the public QuestionAnswer interface). */
86
88
  declare const questionAnswerSchema: z.ZodObject<{
87
89
  question: z.ZodString;
88
- answer: z.ZodString;
90
+ answer: z.ZodOptional<z.ZodString>;
89
91
  confidence: z.ZodNumber;
90
92
  reasoning: z.ZodString;
93
+ skipped: z.ZodBoolean;
91
94
  }, "strip", z.ZodTypeAny, {
92
95
  question: string;
93
- answer: string;
94
96
  confidence: number;
95
97
  reasoning: string;
98
+ skipped: boolean;
99
+ answer?: string | undefined;
96
100
  }, {
97
101
  question: string;
98
- answer: string;
99
102
  confidence: number;
100
103
  reasoning: string;
104
+ skipped: boolean;
105
+ answer?: string | undefined;
101
106
  }>;
102
107
  type QuestionAnswerType = z.infer<typeof questionAnswerSchema>;
103
108
  declare function createAskQuestionsSchema(allowedAnswers: [string, ...string[]]): z.ZodObject<{
@@ -105,18 +110,21 @@ declare function createAskQuestionsSchema(allowedAnswers: [string, ...string[]])
105
110
  question: z.ZodString;
106
111
  confidence: z.ZodNumber;
107
112
  reasoning: z.ZodString;
113
+ skipped: z.ZodBoolean;
108
114
  } & {
109
- answer: z.ZodEnum<[string, ...string[]]>;
115
+ answer: z.ZodEnum<[string, ...string[], "__SKIPPED__"]>;
110
116
  }, "strip", z.ZodTypeAny, {
111
117
  question: string;
112
118
  answer: string;
113
119
  confidence: number;
114
120
  reasoning: string;
121
+ skipped: boolean;
115
122
  }, {
116
123
  question: string;
117
124
  answer: string;
118
125
  confidence: number;
119
126
  reasoning: string;
127
+ skipped: boolean;
120
128
  }>, "many">;
121
129
  }, "strip", z.ZodTypeAny, {
122
130
  answers: {
@@ -124,6 +132,7 @@ declare function createAskQuestionsSchema(allowedAnswers: [string, ...string[]])
124
132
  answer: string;
125
133
  confidence: number;
126
134
  reasoning: string;
135
+ skipped: boolean;
127
136
  }[];
128
137
  }, {
129
138
  answers: {
@@ -131,6 +140,7 @@ declare function createAskQuestionsSchema(allowedAnswers: [string, ...string[]])
131
140
  answer: string;
132
141
  confidence: number;
133
142
  reasoning: string;
143
+ skipped: boolean;
134
144
  }[];
135
145
  }>;
136
146
  type AskQuestionsSchema = ReturnType<typeof createAskQuestionsSchema>;
@@ -256,11 +266,11 @@ declare const chapterSchema: z.ZodObject<{
256
266
  startTime: z.ZodNumber;
257
267
  title: z.ZodString;
258
268
  }, "strip", z.ZodTypeAny, {
259
- title: string;
260
269
  startTime: number;
261
- }, {
262
270
  title: string;
271
+ }, {
263
272
  startTime: number;
273
+ title: string;
264
274
  }>;
265
275
  type Chapter = z.infer<typeof chapterSchema>;
266
276
  declare const chaptersSchema: z.ZodObject<{
@@ -268,21 +278,21 @@ declare const chaptersSchema: z.ZodObject<{
268
278
  startTime: z.ZodNumber;
269
279
  title: z.ZodString;
270
280
  }, "strip", z.ZodTypeAny, {
271
- title: string;
272
281
  startTime: number;
273
- }, {
274
282
  title: string;
283
+ }, {
275
284
  startTime: number;
285
+ title: string;
276
286
  }>, "many">;
277
287
  }, "strip", z.ZodTypeAny, {
278
288
  chapters: {
279
- title: string;
280
289
  startTime: number;
290
+ title: string;
281
291
  }[];
282
292
  }, {
283
293
  chapters: {
284
- title: string;
285
294
  startTime: number;
295
+ title: string;
286
296
  }[];
287
297
  }>;
288
298
  type ChaptersType = z.infer<typeof chaptersSchema>;
@@ -348,6 +358,119 @@ interface ChaptersOptions extends MuxAIOptions {
348
358
  type ChapterSystemPromptSections = "role" | "context" | "constraints" | "qualityGuidelines";
349
359
  declare function generateChapters(assetId: string, languageCode: string, options?: ChaptersOptions): Promise<ChaptersResult>;
350
360
 
361
+ /** Replacement strategy for censored words. */
362
+ type CensorMode = "blank" | "remove" | "mask";
363
+ interface AutoCensorProfanityOptions {
364
+ mode?: CensorMode;
365
+ alwaysCensor?: string[];
366
+ neverCensor?: string[];
367
+ }
368
+ interface CaptionReplacement {
369
+ find: string;
370
+ replace: string;
371
+ }
372
+ interface ReplacementRecord {
373
+ cueStartTime: number;
374
+ before: string;
375
+ after: string;
376
+ }
377
+ /** Configuration accepted by `editCaptions`. */
378
+ interface EditCaptionsOptions<P extends SupportedProvider = SupportedProvider> extends MuxAIOptions {
379
+ /** Provider responsible for profanity detection. Required when autoCensorProfanity is set. */
380
+ provider?: P;
381
+ /** Provider-specific chat model identifier. */
382
+ model?: ModelIdByProvider[P];
383
+ /** LLM-powered profanity censorship. */
384
+ autoCensorProfanity?: AutoCensorProfanityOptions;
385
+ /** Static find/replace pairs (no LLM needed). */
386
+ replacements?: CaptionReplacement[];
387
+ /** Delete the original track after creating the edited one. Defaults to true. */
388
+ deleteOriginalTrack?: boolean;
389
+ /**
390
+ * When true (default) the edited VTT is uploaded to the configured
391
+ * bucket and attached to the Mux asset.
392
+ */
393
+ uploadToMux?: boolean;
394
+ /** Optional override for the S3-compatible endpoint used for uploads. */
395
+ s3Endpoint?: string;
396
+ /** S3 region (defaults to env.S3_REGION or 'auto'). */
397
+ s3Region?: string;
398
+ /** Bucket that will store edited VTT files. */
399
+ s3Bucket?: string;
400
+ /** Suffix appended to the original track name, e.g. "edited" produces "Subtitles (edited)". Defaults to "edited". */
401
+ trackNameSuffix?: string;
402
+ /** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
403
+ s3SignedUrlExpirySeconds?: number;
404
+ }
405
+ /** Output returned from `editCaptions`. */
406
+ interface EditCaptionsResult {
407
+ assetId: string;
408
+ trackId: string;
409
+ originalVtt: string;
410
+ editedVtt: string;
411
+ totalReplacementCount: number;
412
+ autoCensorProfanity?: {
413
+ replacements: ReplacementRecord[];
414
+ };
415
+ replacements?: {
416
+ replacements: ReplacementRecord[];
417
+ };
418
+ uploadedTrackId?: string;
419
+ presignedUrl?: string;
420
+ usage?: TokenUsage;
421
+ }
422
+ /** Schema used when requesting profanity detection from a language model. */
423
+ declare const profanityDetectionSchema: z.ZodObject<{
424
+ profanity: z.ZodArray<z.ZodString, "many">;
425
+ }, "strip", z.ZodTypeAny, {
426
+ profanity: string[];
427
+ }, {
428
+ profanity: string[];
429
+ }>;
430
+ /** Inferred shape returned by `profanityDetectionSchema`. */
431
+ type ProfanityDetectionPayload = z.infer<typeof profanityDetectionSchema>;
432
+ /**
433
+ * Applies a transform function only to VTT cue text lines, leaving headers,
434
+ * timestamps, and cue identifiers untouched. A cue text line is any line that
435
+ * follows a timestamp line (contains "-->") up until the next blank line.
436
+ * The transform receives the line text and the cue's start time in seconds.
437
+ */
438
+ declare function transformCueText(rawVtt: string, transform: (line: string, cueStartTime: number) => string): string;
439
+ /**
440
+ * Builds a case-insensitive word-boundary regex from an array of profane words.
441
+ * Words are sorted longest-first so multi-word phrases match before individual words.
442
+ */
443
+ declare function buildReplacementRegex(words: string[]): RegExp | null;
444
+ /**
445
+ * Returns a replacer function for the given censor mode.
446
+ */
447
+ declare function createReplacer(mode: CensorMode): (match: string) => string;
448
+ /**
449
+ * Applies profanity censorship to cue text lines in raw VTT content via
450
+ * regex replacement. Headers, timestamps, and cue identifiers are untouched.
451
+ */
452
+ declare function censorVttContent(rawVtt: string, profanity: string[], mode: CensorMode): {
453
+ censoredVtt: string;
454
+ replacements: ReplacementRecord[];
455
+ };
456
+ /**
457
+ * Merges `alwaysCensor` into and filters `neverCensor` from an LLM-detected
458
+ * profanity list. Comparison is case-insensitive. `neverCensor` takes
459
+ * precedence over `alwaysCensor` when the same word appears in both.
460
+ */
461
+ declare function applyOverrideLists(detected: string[], alwaysCensor: string[], neverCensor: string[]): string[];
462
+ /**
463
+ * Applies static find/replace pairs to cue text lines in raw VTT content
464
+ * using word-boundary regex. Case-sensitive matching since static replacements
465
+ * target specific known strings. Headers, timestamps, and cue identifiers are
466
+ * untouched. Returns the edited VTT and the total number of replacements.
467
+ */
468
+ declare function applyReplacements(rawVtt: string, replacements: CaptionReplacement[]): {
469
+ editedVtt: string;
470
+ replacements: ReplacementRecord[];
471
+ };
472
+ declare function editCaptions<P extends SupportedProvider = SupportedProvider>(assetId: string, trackId: string, options: EditCaptionsOptions<P>): Promise<EditCaptionsResult>;
473
+
351
474
  /** Configuration accepted by `generateEmbeddings`. */
352
475
  interface EmbeddingsOptions extends MuxAIOptions {
353
476
  /** AI provider used to generate embeddings (defaults to 'openai'). */
@@ -458,7 +581,9 @@ declare const HIVE_VIOLENCE_CATEGORIES: string[];
458
581
  */
459
582
  declare function getModerationScores(assetId: string, options?: ModerationOptions): Promise<ModerationResult>;
460
583
 
461
- declare const SUMMARY_KEYWORD_LIMIT = 10;
584
+ declare const DEFAULT_SUMMARY_KEYWORD_LIMIT = 10;
585
+ declare const DEFAULT_TITLE_LENGTH = 10;
586
+ declare const DEFAULT_DESCRIPTION_LENGTH = 50;
462
587
  declare const summarySchema: z.ZodObject<{
463
588
  keywords: z.ZodArray<z.ZodString, "many">;
464
589
  title: z.ZodString;
@@ -531,9 +656,9 @@ interface SummarizationOptions extends MuxAIOptions {
531
656
  * Useful for customizing the AI's output for specific use cases (SEO, social media, etc.)
532
657
  */
533
658
  promptOverrides?: SummarizationPromptOverrides;
534
- /** Desired title length in characters. */
659
+ /** Maximum title length in words. Shorter titles are preferred. */
535
660
  titleLength?: number;
536
- /** Desired description length in characters. */
661
+ /** Maximum description length in words. Shorter descriptions are acceptable. */
537
662
  descriptionLength?: number;
538
663
  /** Desired number of tags. */
539
664
  tagCount?: number;
@@ -682,6 +807,8 @@ interface AudioTranslationOptions extends MuxAIOptions {
682
807
  uploadToMux?: boolean;
683
808
  /** Optional storage adapter override for upload + presign operations. */
684
809
  storageAdapter?: StorageAdapter;
810
+ /** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
811
+ s3SignedUrlExpirySeconds?: number;
685
812
  }
686
813
  declare function translateAudio(assetId: string, toLanguageCode: string, options?: AudioTranslationOptions): Promise<AudioTranslationResult>;
687
814
 
@@ -728,6 +855,8 @@ interface TranslationOptions<P extends SupportedProvider = SupportedProvider> ex
728
855
  uploadToMux?: boolean;
729
856
  /** Optional storage adapter override for upload + presign operations. */
730
857
  storageAdapter?: StorageAdapter;
858
+ /** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
859
+ s3SignedUrlExpirySeconds?: number;
731
860
  /**
732
861
  * Optional VTT-aware chunking for caption translation.
733
862
  * When enabled, the workflow splits cue-aligned translation requests by
@@ -768,11 +897,14 @@ type index_AskQuestionsResult = AskQuestionsResult;
768
897
  type index_AskQuestionsType = AskQuestionsType;
769
898
  type index_AudioTranslationOptions = AudioTranslationOptions;
770
899
  type index_AudioTranslationResult = AudioTranslationResult;
900
+ type index_AutoCensorProfanityOptions = AutoCensorProfanityOptions;
771
901
  type index_BurnedInCaptionsAnalysis = BurnedInCaptionsAnalysis;
772
902
  type index_BurnedInCaptionsOptions = BurnedInCaptionsOptions;
773
903
  type index_BurnedInCaptionsPromptOverrides = BurnedInCaptionsPromptOverrides;
774
904
  type index_BurnedInCaptionsPromptSections = BurnedInCaptionsPromptSections;
775
905
  type index_BurnedInCaptionsResult = BurnedInCaptionsResult;
906
+ type index_CaptionReplacement = CaptionReplacement;
907
+ type index_CensorMode = CensorMode;
776
908
  type index_Chapter = Chapter;
777
909
  type index_ChapterSystemPromptSections = ChapterSystemPromptSections;
778
910
  type index_ChaptersOptions = ChaptersOptions;
@@ -780,6 +912,11 @@ type index_ChaptersPromptOverrides = ChaptersPromptOverrides;
780
912
  type index_ChaptersPromptSections = ChaptersPromptSections;
781
913
  type index_ChaptersResult = ChaptersResult;
782
914
  type index_ChaptersType = ChaptersType;
915
+ declare const index_DEFAULT_DESCRIPTION_LENGTH: typeof DEFAULT_DESCRIPTION_LENGTH;
916
+ declare const index_DEFAULT_SUMMARY_KEYWORD_LIMIT: typeof DEFAULT_SUMMARY_KEYWORD_LIMIT;
917
+ declare const index_DEFAULT_TITLE_LENGTH: typeof DEFAULT_TITLE_LENGTH;
918
+ type index_EditCaptionsOptions<P extends SupportedProvider = SupportedProvider> = EditCaptionsOptions<P>;
919
+ type index_EditCaptionsResult = EditCaptionsResult;
783
920
  type index_EmbeddingsOptions = EmbeddingsOptions;
784
921
  type index_EmbeddingsResult = EmbeddingsResult;
785
922
  declare const index_HIVE_SEXUAL_CATEGORIES: typeof HIVE_SEXUAL_CATEGORIES;
@@ -789,10 +926,11 @@ type index_HiveModerationSource = HiveModerationSource;
789
926
  type index_ModerationOptions = ModerationOptions;
790
927
  type index_ModerationProvider = ModerationProvider;
791
928
  type index_ModerationResult = ModerationResult;
929
+ type index_ProfanityDetectionPayload = ProfanityDetectionPayload;
792
930
  type index_Question = Question;
793
931
  type index_QuestionAnswer = QuestionAnswer;
794
932
  type index_QuestionAnswerType = QuestionAnswerType;
795
- declare const index_SUMMARY_KEYWORD_LIMIT: typeof SUMMARY_KEYWORD_LIMIT;
933
+ type index_ReplacementRecord = ReplacementRecord;
796
934
  type index_SummarizationOptions = SummarizationOptions;
797
935
  type index_SummarizationPromptOverrides = SummarizationPromptOverrides;
798
936
  type index_SummarizationPromptSections = SummarizationPromptSections;
@@ -804,24 +942,32 @@ type index_TranslationOptions<P extends SupportedProvider = SupportedProvider> =
804
942
  type index_TranslationPayload = TranslationPayload;
805
943
  type index_TranslationResult = TranslationResult;
806
944
  declare const index_aggregateTokenUsage: typeof aggregateTokenUsage;
945
+ declare const index_applyOverrideLists: typeof applyOverrideLists;
946
+ declare const index_applyReplacements: typeof applyReplacements;
807
947
  declare const index_askQuestions: typeof askQuestions;
948
+ declare const index_buildReplacementRegex: typeof buildReplacementRegex;
808
949
  declare const index_burnedInCaptionsSchema: typeof burnedInCaptionsSchema;
950
+ declare const index_censorVttContent: typeof censorVttContent;
809
951
  declare const index_chapterSchema: typeof chapterSchema;
810
952
  declare const index_chaptersSchema: typeof chaptersSchema;
953
+ declare const index_createReplacer: typeof createReplacer;
954
+ declare const index_editCaptions: typeof editCaptions;
811
955
  declare const index_generateChapters: typeof generateChapters;
812
956
  declare const index_generateEmbeddings: typeof generateEmbeddings;
813
957
  declare const index_generateVideoEmbeddings: typeof generateVideoEmbeddings;
814
958
  declare const index_getModerationScores: typeof getModerationScores;
815
959
  declare const index_getSummaryAndTags: typeof getSummaryAndTags;
816
960
  declare const index_hasBurnedInCaptions: typeof hasBurnedInCaptions;
961
+ declare const index_profanityDetectionSchema: typeof profanityDetectionSchema;
817
962
  declare const index_questionAnswerSchema: typeof questionAnswerSchema;
818
963
  declare const index_shouldSplitChunkTranslationError: typeof shouldSplitChunkTranslationError;
819
964
  declare const index_summarySchema: typeof summarySchema;
965
+ declare const index_transformCueText: typeof transformCueText;
820
966
  declare const index_translateAudio: typeof translateAudio;
821
967
  declare const index_translateCaptions: typeof translateCaptions;
822
968
  declare const index_translationSchema: typeof translationSchema;
823
969
  declare namespace index {
824
- 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_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, 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_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema };
970
+ 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 };
825
971
  }
826
972
 
827
- export { shouldSplitChunkTranslationError 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 TranslationChunkingOptions as G, HIVE_SEXUAL_CATEGORIES as H, type TranslationOptions as I, type TranslationPayload as J, type TranslationResult as K, aggregateTokenUsage as L, type ModerationOptions as M, askQuestions as N, burnedInCaptionsSchema as O, chapterSchema as P, type Question as Q, chaptersSchema as R, SUMMARY_KEYWORD_LIMIT as S, type ThumbnailModerationScore as T, generateChapters as U, generateEmbeddings as V, generateVideoEmbeddings as W, getModerationScores as X, getSummaryAndTags as Y, hasBurnedInCaptions as Z, questionAnswerSchema as _, type AskQuestionsResult as a, summarySchema as a0, translateAudio as a1, translateCaptions as a2, translationSchema as a3, 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 };
973
+ 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 };
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-C8-E3VR9.js';
5
- export { i as workflows } from './index-CA7bG50u.js';
4
+ export { i as primitives } from './index-DLhfJsOd.js';
5
+ export { i as workflows } from './index-DyzifniY.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.10.0";
12
+ var version = "0.12.0";
13
13
 
14
14
  /**
15
15
  * A function that returns workflow credentials, either synchronously or asynchronously.