import { default as Database } from 'better-sqlite3'; import { EnhancementLogManager } from './enhancementLog.js'; import { TranscriptMetadata, PklTranscriptConfig, ContentDiff, AuditLogEntry, RawTranscriptData, TranscriptHistory } from './types.js'; /** * PklTranscript - SQLite-based transcript storage * * Provides a clean API for reading and writing transcript data, * with built-in change tracking and audit trails. */ export declare class PklTranscript { private db; private historyManager; private auditManager; private artifactManager; private enhancementLogManager; private _metadata; private _content; private _contentId; private readonly config; /** * Private constructor - use static open() or create() methods */ private constructor(); /** * Open an existing .pkl transcript file */ static open(filePath: string, options?: Partial>): PklTranscript; /** * Create a new .pkl transcript file */ static create(filePath: string, metadata: TranscriptMetadata, options?: Partial>): PklTranscript; /** * Load existing data from the database */ private load; /** * Initialize a new transcript with metadata */ private initialize; /** * Get the file path */ get filePath(): string; /** * Get the transcript metadata */ get metadata(): TranscriptMetadata; /** * Get the enhanced transcript content */ get content(): string; /** * Get the raw transcript (from Whisper) */ get rawTranscript(): RawTranscriptData | null; /** * Check if raw transcript exists */ get hasRawTranscript(): boolean; /** * Update the enhanced transcript content * Automatically saves a diff for history tracking */ updateContent(newContent: string): void; /** * Set the raw transcript (write-once operation) */ setRawTranscript(data: RawTranscriptData): void; /** * Update metadata fields * Automatically logs changes to audit trail */ updateMetadata(updates: Partial): void; /** * Get the full history (content diffs + audit log) */ getHistory(): TranscriptHistory; /** * Get content diffs only */ getContentHistory(): ContentDiff[]; /** * Get audit log only */ getAuditLog(): AuditLogEntry[]; /** * Reconstruct content at a specific version */ getContentAtVersion(versionId: number): string | null; /** * Get the number of content versions */ getVersionCount(): number; /** * Add a custom artifact */ addArtifact(type: string, data: Buffer | null, metadata?: Record): number; /** * Get an artifact by type */ getArtifact(type: string): import('./types.js').Artifact | null; /** * Check if an artifact type exists */ hasArtifact(type: string): boolean; /** * Get the enhancement log manager for direct access */ get enhancementLog(): EnhancementLogManager; /** * Get the full enhancement log */ getEnhancementLog(options?: { phase?: 'transcribe' | 'enhance' | 'simple-replace'; action?: string; }): import('./types.js').EnhancementLogEntry[]; /** * Get enhancement log count */ getEnhancementLogCount(): number; /** * Close the transcript and release database connection */ close(): void; /** * Get database for advanced operations (use with caution) */ getDatabase(): Database.Database; } //# sourceMappingURL=transcript.d.ts.map