import type { AuthProfileStore } from "../agents/auth-profiles/types.js"; import type { KlawConfig } from "../config/types.js"; import type { ActiveMediaModel } from "./active-model.types.js"; import type { MediaUnderstandingDecision, MediaUnderstandingOutput, MediaUnderstandingProvider, StructuredExtractionInput } from "./types.js"; export type RunMediaUnderstandingFileParams = { capability: "image" | "audio" | "video"; filePath: string; mediaUrl?: string; cfg: KlawConfig; agentDir?: string; workspaceDir?: string; mime?: string; activeModel?: ActiveMediaModel; prompt?: string; timeoutMs?: number; }; export type RunMediaUnderstandingFileResult = { text: string | undefined; provider?: string; model?: string; output?: MediaUnderstandingOutput; decision?: MediaUnderstandingDecision; }; export type DescribeImageFileParams = { filePath: string; mediaUrl?: string; cfg: KlawConfig; agentDir?: string; workspaceDir?: string; mime?: string; activeModel?: ActiveMediaModel; prompt?: string; timeoutMs?: number; }; export type DescribeImageFileWithModelParams = { filePath: string; mediaUrl?: string; cfg: KlawConfig; agentDir?: string; workspaceDir?: string; mime?: string; provider: string; model: string; prompt: string; maxTokens?: number; timeoutMs?: number; }; type DescribeImageFileWithModelResult = Awaited>>; export type ExtractStructuredWithModelParams = { /** At least one image input is required; text inputs provide supplemental context. */ input: StructuredExtractionInput[]; instructions: string; schemaName?: string; jsonSchema?: unknown; jsonMode?: boolean; cfg: KlawConfig; agentDir?: string; provider: string; model: string; profile?: string; preferredProfile?: string; authStore?: AuthProfileStore; timeoutMs?: number; }; type ExtractStructuredWithModelResult = Awaited>>; export type DescribeVideoFileParams = { filePath: string; cfg: KlawConfig; agentDir?: string; workspaceDir?: string; mime?: string; activeModel?: ActiveMediaModel; }; export type TranscribeAudioFileParams = { filePath: string; cfg: KlawConfig; agentDir?: string; workspaceDir?: string; mime?: string; activeModel?: ActiveMediaModel; language?: string; prompt?: string; }; export type MediaUnderstandingRuntime = { runMediaUnderstandingFile: (params: RunMediaUnderstandingFileParams) => Promise; describeImageFile: (params: DescribeImageFileParams) => Promise; describeImageFileWithModel: (params: DescribeImageFileWithModelParams) => Promise; extractStructuredWithModel: (params: ExtractStructuredWithModelParams) => Promise; describeVideoFile: (params: DescribeVideoFileParams) => Promise; transcribeAudioFile: (params: TranscribeAudioFileParams) => Promise; }; export {};