/** * Snapshot module for multi-contributor task state sharing. * * Exports task state from SQLite to a portable JSON format suitable for * git commit and cross-contributor review. Imports snapshots back into * the local task database with last-write-wins merge. * * @task T4882 */ /** Snapshot metadata. */ export interface SnapshotMeta { format: 'cleo-snapshot'; version: string; createdAt: string; source: { project: string; cleoVersion: string; }; checksum: string; taskCount: number; } /** Portable task representation (subset of Task, omitting local-only fields). */ export interface SnapshotTask { id: string; title: string; status: string; priority: string; type?: string; parentId?: string | null; size?: string | null; phase?: string; description?: string; depends?: string[]; labels?: string[]; createdAt: string; updatedAt?: string | null; completedAt?: string; } /** Complete snapshot package. */ export interface Snapshot { $schema: string; _meta: SnapshotMeta; project: { name: string; currentPhase?: string | null; }; tasks: SnapshotTask[]; } /** Import result summary. */ export interface ImportResult { added: number; updated: number; skipped: number; conflicts: string[]; } /** * Export current task state to a snapshot. * @task T4882 */ export declare function exportSnapshot(cwd?: string): Promise; /** * Write a snapshot to a file. * @task T4882 */ export declare function writeSnapshot(snapshot: Snapshot, outputPath: string): Promise; /** * Read a snapshot from a file. * @task T4882 */ export declare function readSnapshot(inputPath: string): Promise; /** * Generate a default snapshot file path. * @task T4882 */ export declare function getDefaultSnapshotPath(cwd?: string): string; /** * Import a snapshot into the local task database. * Uses last-write-wins strategy: if a task exists locally and in the snapshot, * the snapshot version wins only if its updatedAt is newer. * @task T4882 */ export declare function importSnapshot(snapshot: Snapshot, cwd?: string): Promise; //# sourceMappingURL=index.d.ts.map