import type { VideoRenderJob } from './types.js'; declare function processAlive(pid: number | undefined): boolean; declare function readTail(filePath: string, maxBytes?: number): string; export interface FfmpegPlan { args: string[]; outputPath: string; subtitlePath?: string; } export declare function buildFfmpegPlan(projectDir: string, outputPath: string, jobId: string): FfmpegPlan; /** * 도구 인자로 받은 ffmpegPath 검증 (2026-09 보안 점검). * * 예전엔 ffmpegPath 를 그대로 execFile 했다 — `-version` 을 붙여 실행하므로 모델이나 * 프롬프트 주입이 넘긴 임의 실행 파일(`/bin/sh`, 받은 스크립트 등)이 그대로 돌았다. * 이제 MCP 도구 스키마에서는 ffmpegPath 를 아예 받지 않는다 (환경변수 / PATH 만). 이 검사는 * 내부 호출부(startRender / validateVideo 의 인자)를 위한 두 번째 방어선이다. * * 파일 이름만 보면 부족하다: Windows 에서 `\\host\share\ffmpeg.exe`, `//host/share/ffmpeg.exe`, * `\\host@SSL\DavWWWRoot\ffmpeg.exe` 는 원격 바이너리 실행이 되고, 경로에 접근하는 순간 * NTLM 해시가 원격 호스트로 나간다. 그래서 **파일시스템에 손대기 전에** UNC·장치 경로를 * 거부하고, 로컬 절대경로만 realpath 로 풀어 실제 파일인지·이름이 ffmpeg 인지 확인한다. * 환경변수(MIMI_SEED_FFMPEG_PATH 등)는 사용자가 직접 설정한 값이라 여기서 막지 않는다. */ export declare function assertFfmpegPath(ffmpegPath: string): string; export interface StartRenderInput { projectDir: string; outputFileName?: string; ffmpegPath?: string; overwriteOutput?: boolean; } declare function acquireOutputLock(lockPath: string, projectDir: string, jobId: string): void; export declare function startRender(input: StartRenderInput): Promise; export declare function getRenderJob(projectDir: string, jobId: string): VideoRenderJob & { logTail?: string; }; declare function ffprobeFor(ffmpegPath?: string): string; export declare function validateVideo(filePath: string, ffmpegPath?: string): Promise<{ valid: boolean; format: unknown; streams: unknown[]; issues: string[]; }>; export declare const __testing: { ffprobeFor: typeof ffprobeFor; processAlive: typeof processAlive; acquireOutputLock: typeof acquireOutputLock; readTail: typeof readTail; }; export {};