/** * The Record-motion panel's server half, minus the I/O: what `POST /api/editor/motion-video` * accepts and how it names things. Kept pure — no fs, no network — so it is testable the way * `recording-sink.ts` and `save.ts` are; `server.ts` owns the request and the job. * * The page POSTs the recording's raw bytes (a MediaRecorder Blob or a picked file) with the * blob's own Content-Type, and the asset options as query parameters. Raw rather than multipart * because the sidecar has no multipart parser beyond the recorder's frame sink, and a single * binary body is the simplest thing both sides get right. */ import { type LocomotionState } from '@bitmagic/asset-core'; /** Matches the CLI lane's own cap (`generate/animation-from-video.ts`) and asset-forger's. */ export declare const MOTION_BODY_LIMIT_BYTES: number; export interface MotionVideoRequest { extension: string; contentType: string; name: string; locomotionState?: LocomotionState; loop?: boolean; /** Cut walk-to-the-camera frames off both ends. Legacy clients only; the panel now sends an explicit window. */ autoTrim?: boolean; /** * Explicit trim window (seconds into the source clip), both or neither — the * window the creator confirmed on the panel's trim bar. Wins over autoTrim. */ trimStartSeconds?: number; trimEndSeconds?: number; /** The sidecar's pending analysis clip; a match reuses its already-uploaded URL. */ pendingId?: string; } export interface MotionVideoRefusal { status: 400 | 413 | 415; error: string; } /** The bare media type: `video/webm;codecs=vp9` → `video/webm`. */ export declare function baseContentType(contentType: string | undefined): string; export declare function parseMotionVideoRequest(input: { contentType: string | undefined; contentLength: number; query: URLSearchParams; }): MotionVideoRequest | MotionVideoRefusal; /** * The panel's done note. Names what auto-trim removed, because the trim happens in the Forger * with nothing on screen to show for it — the preview page's seek bar marks WHERE the cut landed, * but the creator has to know there was one before going to look. */ export declare function motionDoneMessage(result: { name: string; motionId: string; locomotionState?: string; trimmedStartSeconds?: number; trimmedEndSeconds?: number; }): string; /** The command the panel prints when nobody is logged in — what the agent (or the creator) runs instead. */ export declare function motionCommand(videoPath: string, request: Pick): string;