@mux/ai 0.28.1 → 0.30.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.
@@ -97,6 +97,24 @@ interface MuxAIOptions {
97
97
  /** Optional storage adapter for upload and presigning operations. */
98
98
  storageAdapter?: StorageAdapter;
99
99
  }
100
+ /**
101
+ * Asset-relative time range used to limit workflow analysis.
102
+ *
103
+ * Times are expressed in seconds. The start is inclusive and the end is
104
+ * exclusive. Either boundary may be omitted to analyze from the beginning or
105
+ * through the end of the asset, respectively.
106
+ */
107
+ interface WorkflowScope {
108
+ /** Inclusive start offset from the beginning of the asset, in seconds. */
109
+ startTime?: number;
110
+ /** Exclusive end offset from the beginning of the asset, in seconds. */
111
+ endTime?: number;
112
+ }
113
+ /** Base options for workflows that can analyze a bounded part of an asset. */
114
+ interface ScopedMuxAIOptions extends MuxAIOptions {
115
+ /** Optional asset-relative time range to analyze. */
116
+ scope?: WorkflowScope;
117
+ }
100
118
  /**
101
119
  * Workflow credentials.
102
120
  *
@@ -237,6 +255,8 @@ interface TokenUsage {
237
255
  reasoningTokens?: number;
238
256
  /** Input tokens served from cache (reduces cost). */
239
257
  cachedInputTokens?: number;
258
+ /** Input tokens written to cache (may use a provider-specific rate). */
259
+ cacheWriteTokens?: number;
240
260
  /** Workflow metadata (asset duration, thumbnails, etc.). */
241
261
  metadata?: UsageMetadata;
242
262
  }
@@ -356,4 +376,4 @@ declare function getShotsForAsset(assetId: string, options?: ShotRequestOptions)
356
376
  */
357
377
  declare function waitForShotsForAsset(assetId: string, options?: WaitForShotsOptions): Promise<CompletedShotsResult>;
358
378
 
359
- export { type AssetTextTrack as A, getShotsForAsset as B, type ChunkEmbedding as C, requestShotsForAsset as D, type Encrypted as E, waitForShotsForAsset as F, type Hotspot as H, type ImageSubmissionMode as I, type MuxAIOptions as M, type PlaybackAsset as P, type StoragePutObjectInput as S, type TextChunk as T, type UsageMetadata as U, type VTTChunkingConfig as V, type WorkflowCredentials as W, type StoragePresignGetObjectInput as a, type ChunkingStrategy as b, type EncryptedPayload as c, type MuxAsset as d, type PlaybackPolicy as e, type StorageAdapter as f, type TokenChunkingConfig as g, type TokenUsage as h, type ToneType as i, type VideoEmbeddingsResult as j, type WorkflowCredentialsInput as k, type WorkflowMuxClient as l, decryptFromWorkflow as m, encryptForWorkflow as n, type CompletedShotsResult as o, type ErroredShotsResult as p, type HotspotOptions as q, type HotspotResponse as r, type PendingShotsResult as s, type Shot as t, type ShotRequestOptions as u, type ShotsResult as v, type WaitForShotsOptions as w, getHotspotsForAsset as x, getHotspotsForPlaybackId as y, getHotspotsForVideo as z };
379
+ export { type AssetTextTrack as A, getHotspotsForPlaybackId as B, type ChunkEmbedding as C, getHotspotsForVideo as D, type Encrypted as E, getShotsForAsset as F, requestShotsForAsset as G, type Hotspot as H, type ImageSubmissionMode as I, waitForShotsForAsset as J, type MuxAIOptions as M, type PlaybackAsset as P, type StoragePutObjectInput as S, type TextChunk as T, type UsageMetadata as U, type VTTChunkingConfig as V, type WorkflowCredentials as W, type StoragePresignGetObjectInput as a, type ChunkingStrategy as b, type EncryptedPayload as c, type MuxAsset as d, type PlaybackPolicy as e, type ScopedMuxAIOptions as f, type StorageAdapter as g, type TokenChunkingConfig as h, type TokenUsage as i, type ToneType as j, type VideoEmbeddingsResult as k, type WorkflowCredentialsInput as l, type WorkflowMuxClient as m, type WorkflowScope as n, decryptFromWorkflow as o, encryptForWorkflow as p, type CompletedShotsResult as q, type ErroredShotsResult as r, type HotspotOptions as s, type HotspotResponse as t, type PendingShotsResult as u, type Shot as v, type ShotRequestOptions as w, type ShotsResult as x, type WaitForShotsOptions as y, getHotspotsForAsset as z };
@@ -1,7 +1,7 @@
1
- export { A as AskQuestionsOptions, j as AskQuestionsResult, k as AskQuestionsType, l as AudioTranslationOptions, m as AudioTranslationResult, n as AutoCensorProfanityOptions, B as BurnedInCaptionsAnalysis, o as BurnedInCaptionsOptions, p as BurnedInCaptionsPromptOverrides, q as BurnedInCaptionsPromptSections, r as BurnedInCaptionsResult, C as CaptionReplacement, s as CensorMode, u as Chapter, v as ChapterSystemPromptSections, w as ChaptersOptions, x as ChaptersPromptOverrides, y as ChaptersPromptSections, z as ChaptersResult, D as ChaptersType, E as DEFAULT_DESCRIPTION_LENGTH, F as DEFAULT_SUMMARY_KEYWORD_LIMIT, G as DEFAULT_TITLE_LENGTH, H as EditCaptionsOptions, J as EditCaptionsResult, K as EmbeddingsOptions, M as EmbeddingsResult, N as EngagementInsightsOptions, O as EngagementInsightsResult, P as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, Q as HIVE_SEXUAL_CATEGORIES, R as HIVE_VIOLENCE_CATEGORIES, T as HiveModerationOutput, U as HiveModerationSource, V as ModerationOptions, W as ModerationProvider, X as ModerationResult, Y as MomentInsight, Z as OverallInsight, _ as ProfanityDetectionPayload, $ as Question, a0 as QuestionAnswer, a1 as QuestionAnswerType, a2 as ReplacementRecord, a3 as SummarizationOptions, a4 as SummarizationPromptOverrides, a5 as SummarizationPromptSections, a6 as SummaryAndTagsResult, a7 as SummaryType, a8 as ThumbnailModerationScore, a9 as TranslationChunkingOptions, aa as TranslationOptions, ab as TranslationPayload, ac as TranslationResult, ad as aggregateTokenUsage, ae as applyOverrideLists, af as applyReplacements, ag as askQuestions, ah as buildReplacementRegex, ai as burnedInCaptionsSchema, aj as censorVttContent, ak as chapterSchema, al as chaptersSchema, am as createReplacer, an as editCaptions, ao as extractTranscriptSegmentsForHotspots, ap as generateChapters, aq as generateEmbeddings, ar as generateEngagementInsights, as as generateVideoEmbeddings, at as getModerationScores, au as getSummaryAndTags, av as hasBurnedInCaptions, aw as mapShotsToHotspots, ax as normalizeTranslatedVtt, ay as profanityDetectionSchema, az as questionAnswerSchema, aA as shouldSplitChunkTranslationError, aB as summarySchema, aC as transformCueText, aD as translateAudio, aE as translateCaptions, aF as translationSchema } from '../index-DUVBpnj5.js';
1
+ export { A as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, j as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, k as ASK_QUESTIONS_MAX_QUESTION_LENGTH, l as AskQuestionsOptions, m as AskQuestionsResult, n as AskQuestionsType, o as AudioTranslationOptions, p as AudioTranslationResult, q as AutoCensorProfanityOptions, B as BurnedInCaptionsAnalysis, r as BurnedInCaptionsOptions, s as BurnedInCaptionsPromptOverrides, u as BurnedInCaptionsPromptSections, v as BurnedInCaptionsResult, C as CaptionReplacement, w as CensorMode, x as Chapter, y as ChapterSystemPromptSections, z as ChaptersOptions, D as ChaptersPromptOverrides, E as ChaptersPromptSections, F as ChaptersResult, G as ChaptersType, H as DEFAULT_DESCRIPTION_LENGTH, J as DEFAULT_SUMMARY_KEYWORD_LIMIT, K as DEFAULT_TITLE_LENGTH, M as EditCaptionsOptions, N as EditCaptionsResult, O as EmbeddingsOptions, P as EmbeddingsResult, Q as EngagementInsightsOptions, R as EngagementInsightsResult, T as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, U as HIVE_SEXUAL_CATEGORIES, V as HIVE_VIOLENCE_CATEGORIES, W as HiveModerationOutput, X as HiveModerationSource, Y as ModerationOptions, Z as ModerationProvider, _ as ModerationResult, $ as MomentInsight, a0 as OverallInsight, a1 as ProfanityDetectionPayload, a2 as Question, a3 as QuestionAnswer, a4 as QuestionAnswerType, a5 as ReplacementRecord, a6 as SummarizationOptions, a7 as SummarizationPromptOverrides, a8 as SummarizationPromptSections, a9 as SummaryAndTagsResult, aa as SummaryType, ab as ThumbnailModerationScore, ac as TranslationChunkingOptions, ad as TranslationOptions, ae as TranslationPayload, af as TranslationResult, ag as aggregateTokenUsage, ah as applyOverrideLists, ai as applyReplacements, aj as askQuestions, ak as buildReplacementRegex, al as burnedInCaptionsSchema, am as censorVttContent, an as chapterSchema, ao as chaptersSchema, ap as createReplacer, aq as editCaptions, ar as extractTranscriptSegmentsForHotspots, as as generateChapters, at as generateEmbeddings, au as generateEngagementInsights, av as generateVideoEmbeddings, aw as getModerationScores, ax as getSummaryAndTags, ay as hasBurnedInCaptions, az as mapShotsToHotspots, aA as normalizeTranslatedVtt, aB as profanityDetectionSchema, aC as questionAnswerSchema, aD as shouldSplitChunkTranslationError, aE as summarySchema, aF as transformCueText, aG as translateAudio, aH as translateCaptions, aI as translationSchema } from '../index-D3cB2ltG.js';
2
2
  import 'zod';
3
3
  import '@ai-sdk/anthropic';
4
4
  import '@ai-sdk/google';
5
5
  import '@ai-sdk/openai';
6
- import '../shots-mGJfYGiO.js';
6
+ import '../shots-Bh0GrvLx.js';
7
7
  import '@mux/mux-node';