import type { ClipInfo, Frame, FrameRange, HostCapabilities, MarkerInfo, TimelineState } from "../../../types.js"; import { type FusionCompArgs, type VideoHost } from "../types.js"; /** * DaVinci Resolve adapter. * * Drives Resolve through a long-lived Python sidecar (see ./bridge.ts and * ./bridge-source.ts). The sidecar imports DaVinciResolveScript and exposes * a JSON-line RPC over stdin/stdout. One process is shared across the whole * session — first call pays the spawn cost (~300ms), all subsequent calls * are sub-50ms round trips. * * Requirements: * - Resolve Studio (free version does not expose the API externally) * - DaVinci Resolve running with a project + timeline open * - Preferences → System → General → "External scripting using" set to Local * - Python 3 on PATH (python3 / python / py -3 — auto-detected) * * Capability map (verified against Resolve 20 API docs): * - canMoveClips: false (API only supports append-to-end) * - canScriptColor: true (nodes, LUTs, CDLs, primary corrections) * - canScriptAudio: false at gg-editor's tool level (Resolve exposes some * Fairlight APIs, but not the full mix/EQ/ducking pipeline we need yet) * - canTriggerAI: partial / Studio-sensitive (Smart Reframe and similar calls * may require Studio and runtime confirmation) * - preferredImportFormat: edl (also FCPXML, AAF, DRT) */ export declare class ResolveAdapter implements VideoHost { readonly name: "resolve"; readonly displayName = "DaVinci Resolve"; private bridge; capabilities(): Promise; getTimeline(): Promise; addMarker(marker: MarkerInfo): Promise; cutAt(_track: number, _frame: Frame): Promise; rippleDelete(_track: number, _range: FrameRange): Promise; appendClip(track: number, mediaPath: string): Promise; importTimeline(filePath: string): Promise; render(opts: { preset: string; output: string; }): Promise; getMarkers(): Promise; createTimeline(opts: { name: string; fps: number; width?: number; height?: number; }): Promise; importToMediaPool(paths: string[], bin?: string): Promise; setClipSpeed(clipId: string, speed: number): Promise; applyLut(clipId: string, lutPath: string, nodeIndex?: number): Promise; setPrimaryCorrection(clipId: string, cdl: { slope?: [number, number, number]; offset?: [number, number, number]; power?: [number, number, number]; saturation?: number; nodeIndex?: number; }): Promise; copyGrade(sourceClipId: string, targetClipIds: string[]): Promise; listRenderPresets(): Promise; replaceClip(clipId: string, mediaPath: string): Promise; cloneTimeline(newName: string): Promise<{ name: string; }>; saveProject(): Promise; addTrack(kind: "video" | "audio" | "subtitle"): Promise<{ track: number; }>; setClipVolume(clipId: string, volumeDb: number): Promise; insertClipOnTrack(opts: { mediaPath: string; track: number; recordFrame: number; sourceInFrame?: number; sourceOutFrame?: number; mediaKind?: "video" | "audio"; }): Promise; smartReframe(clipId: string, opts: { aspect: "9:16" | "1:1" | "4:5" | "16:9" | "4:3"; frameInterest?: "all" | "keyframes" | "reference-frame"; referenceFrame?: number; }): Promise; importSubtitles(srtPath: string): Promise<{ imported: boolean; attached: boolean; note?: string; }>; openPage(name: "media" | "cut" | "edit" | "fusion" | "color" | "fairlight" | "deliver"): Promise; executeCode(code: string): Promise<{ result: unknown; stdout?: string; }>; executeFusionComp(args: FusionCompArgs): Promise; /** * Optional: explicitly close the bridge (e.g. on CLI shutdown). The bridge * also dies when the parent process exits, so this is mostly for tests. */ shutdown(): void; /** * Pre-flight reachability check. Validates the env we'd hand to the bridge * before we try to spawn it, so capabilities() can report a clear reason * without paying the spawn cost. */ private checkReachable; } //# sourceMappingURL=adapter.d.ts.map