/** * Character file to database synchronization * Handles YAML character profiles → database, and DB → YAML reverse sync. */ import type { MCPClient } from '../core/database.js'; export interface CharacterSyncOptions { /** When true, overwrite DB data from file even if a conflict is detected. */ forceFile?: boolean; /** When true, skip relationship resolution (use for first-pass bulk sync). */ skipRelationships?: boolean; } export declare class CharacterSync { private mcpClient; private projectId; private projectPath?; private readonly syncStateRepo; constructor(mcpClient: MCPClient, projectId: number, projectPath?: string | undefined); /** * Sync a character YAML file to the database. * * @param filePath - absolute path to the YAML character file * @param options - optional flags; set `forceFile: true` to suppress conflict errors */ syncCharacterFile(filePath: string, options?: CharacterSyncOptions): Promise; /** * Second-pass: resolve relationships for a character file whose record is already in the DB. * Safe to call after all character records have been inserted (resolves forward references). */ syncRelationshipsFromFile(filePath: string): Promise; /** * Export a character from the database back to a YAML file (reverse sync). * Writes to `/characters/.yaml`. * * @param characterId - numeric DB id of the character row * @returns absolute path to the written file */ exportToYAML(characterId: string): Promise; /** * Insert or update character record */ private upsertCharacter; /** * Sync character attributes to database */ private syncAttributes; /** * Insert or update a single attribute */ private upsertAttribute; /** * Sync character relationships */ private syncRelationships; /** * Sync character arc information */ private syncArc; /** * Serialize voice notes to string */ private serializeVoiceNotes; /** * Delete a character from database (when file is deleted) */ deleteCharacter(characterName: string): Promise; } //# sourceMappingURL=character-sync.d.ts.map