/** * Types for protokoll-format package * Defines interfaces for .pkl SQLite transcript format */ /** * Status of a transcript in its lifecycle * * Upload workflow: uploaded → transcribing → initial → enhanced → reviewed → closed * Error can occur at any point */ export type TranscriptStatus = 'uploaded' | 'transcribing' | 'error' | 'initial' | 'enhanced' | 'reviewed' | 'in_progress' | 'closed' | 'archived' | 'deleted'; /** * A status transition record */ export interface StatusTransition { from: TranscriptStatus; to: TranscriptStatus; at: Date; } /** * A task associated with a transcript */ export interface Task { id: string; description: string; status: 'open' | 'done'; created: Date; changed?: Date; completed?: Date; } /** * A comment associated with a transcript */ export interface TranscriptComment { id: string; text: string; createdAt: string; updatedAt?: string; } /** * An entity reference (person, project, term, company) */ export interface EntityReference { id: string; name: string; type: 'person' | 'project' | 'term' | 'company'; } /** * Routing metadata for transcript destination */ export interface RoutingMetadata { destination?: string; confidence?: number; signals?: string[]; reasoning?: string; } /** * Entity collections in a transcript */ export interface TranscriptEntities { people?: EntityReference[]; projects?: EntityReference[]; terms?: EntityReference[]; companies?: EntityReference[]; } /** * Full transcript metadata */ export interface TranscriptMetadata { id: string; title?: string; date?: Date; recordingTime?: string; duration?: string; project?: string; projectId?: string; tags?: string[]; confidence?: number; routing?: RoutingMetadata; status?: TranscriptStatus; history?: StatusTransition[]; tasks?: Task[]; comments?: TranscriptComment[]; entities?: TranscriptEntities; errorDetails?: string; audioFile?: string; originalFilename?: string; audioHash?: string; } /** * Configuration for opening/creating a PklTranscript */ export interface PklTranscriptConfig { filePath: string; autoSave?: boolean; readOnly?: boolean; } /** * A content diff record */ export interface ContentDiff { id: number; contentId: number; diff: string; createdAt: Date; } /** * An audit log entry for metadata changes */ export interface AuditLogEntry { id: number; field: string; oldValue: string | null; newValue: string | null; changedAt: Date; } /** * An enhancement log entry tracking pipeline processing steps */ export interface EnhancementLogEntry { id: number; timestamp: Date; phase: 'transcribe' | 'enhance' | 'simple-replace' | 'user-correction'; action: string; details?: Record; entities?: EntityReference[]; } /** * An artifact stored in the transcript */ export interface Artifact { id: number; type: string; data: Buffer | null; metadata: Record | null; createdAt: Date; } /** * Raw transcript data from Whisper */ export interface RawTranscriptData { text: string; model?: string; duration?: number; audioFile?: string; audioHash?: string; transcribedAt?: string; confidence?: number; } /** * Result of a transcript history query */ export interface TranscriptHistory { contentDiffs: ContentDiff[]; auditLog: AuditLogEntry[]; } //# sourceMappingURL=types.d.ts.map