/** * PNG frames of a 4K recording run to tens of megabytes, and a long session's timeline manifest is * event-per-frame JSON — both far past `server.ts`'s 8 MB scene-snapshot cap, which is why the sink * routes carry their own. */ export declare const RECORDING_BODY_LIMIT_BYTES: number; /** * Mirrors game-play-agent's `isSafePathSegment`, additionally refusing the two dot segments its * regex technically admits — `..` would resolve the recording directory to the home directory * itself. The recorder only ever sends `gameplay_recording_`, so nothing real is * refused. */ export declare function isSafeRecordingName(value: string): boolean; /** A parsed `/api/dev/save-frame` body. */ export interface FrameSave { recordingName: string; frameIndex: number; frame: Buffer; } /** A parsed `/api/dev/save-recording-timeline` body, with the manifest already serialized. */ export interface TimelineSave { recordingName: string; json: string; } /** Why a body was refused, phrased for the recorder's console warning. */ export interface SinkParseError { error: string; } /** Parse the recorder's frame POST, whichever of the two encodings it used. */ export declare function parseSaveFrameRequest(contentType: string | undefined, body: Buffer, query?: URLSearchParams): Promise; /** * Parse the recorder's timeline POST. Serialized pretty-printed exactly as game-play-agent writes * it, so a `timeline.json` reads the same whichever lane produced it. */ export declare function parseTimelineRequest(body: Buffer): TimelineSave | SinkParseError; /** `_%06d.png` — the frame naming the ffmpeg command and the trailer renderer both expect. */ export declare function frameFileName(recordingName: string, frameIndex: number): string; /** Write one frame of a recording. */ export declare function writeRecordingFrame(root: string, save: FrameSave): Promise; /** Write the timeline manifest next to the frames. */ export declare function writeRecordingTimeline(root: string, save: TimelineSave): Promise;