/** * memory-journal-mcp — Markdown Exporter * * Converts journal entries to frontmattered `.md` files. * Deterministic filenames allow re-export to overwrite identically. */ import type { IDatabaseAdapter } from '../database/core/interfaces.js'; /** Entry shape from database query results */ export interface ExportableEntry { id: number; content: string; entryType: string; timestamp: string; tags: string[]; significance?: string; author?: string; } /** Result of an export operation */ export interface ExportResult { success: boolean; exported_count: number; output_dir: string; files: string[]; skipped: number; } /** * Generate a URL-safe slug from content text. * * - Takes first 50 characters * - Lowercases, replaces non-alphanumeric with dashes * - Trims leading/trailing dashes, collapses multiple dashes * - Falls back to 'untitled' for empty content */ export declare function generateSlug(content: string): string; /** * Generate a deterministic filename for an entry. * Format: `{id}-{slug}.md` */ export declare function generateFilename(id: number, content: string): string; /** * Export journal entries to frontmattered markdown files. * * - Creates output directory if it doesn't exist * - Writes one `.md` file per entry * - Deterministic filenames allow re-export without duplication * - Fetches relationships per entry for frontmatter inclusion * * @param entries - Entries to export * @param outputDir - Target directory for `.md` files * @param db - Database adapter for relationship lookups * @returns Export result with file list and counts */ export declare function exportEntriesToMarkdown(entries: ExportableEntry[], outputDir: string, db: IDatabaseAdapter, allowedRoots: string[]): Promise; //# sourceMappingURL=exporter.d.ts.map