import type { Draft } from "../draft.js"; import { type Flags } from "../utils/cli.js"; export interface SyncOptions { dryRun?: boolean; /** Epoch ms stamped into backup filenames; injectable for deterministic tests. */ nowMs?: number; } export interface SyncGuidResult { guid: string; /** true when a CapCut-read mirror (draft_content.json or draft_info.json) existed, differed, and was overwritten — drives the data-loss WARNING. */ diverged: boolean; files_written: string[]; backups: string[]; } export interface SyncReport { schema: "capcut-david/sync-timelines@1"; ok: true; dry_run: boolean; synced: SyncGuidResult[]; already_in_sync: Array<{ guid: string; reason: string; }>; /** A guid whose reconciliation threw (e.g. a locked/read-only file). Isolated * per-guid so a single failure never aborts the others; surfaced as exit 1. */ errors: Array<{ guid: string; message: string; }>; root_siblings_written: string[]; summary: { guids_total: number; guids_synced: number; files_written: number; files_skipped: number; }; } export declare function syncTimelines(filePath: string, opts?: SyncOptions): SyncReport; /** * CLI entry. WRITE command (in WRITE_COMMANDS → CapCut-open guard fires in * index.ts). Emits a stderr WARNING for every guid whose draft_content.json * mirror was overwritten (data-loss transparency — see kickoff), then the JSON * report on stdout. Read-only on the root draft itself. */ export declare function cmdSyncTimelines(_draft: Draft, filePath: string, _positional: string[], flags: Flags): void;