/** * Document Template Service * * Handles document formatting with knowledge-base template headers * and status emoji mapping. */ import { type DocumentMetadata, type DocumentStatus, type DocumentType } from '../types/document.types.js'; export declare class DocumentTemplateService { private readonly logger; /** * Format content with standard knowledge-base header */ formatWithHeader(content: string, metadata: DocumentMetadata): string; /** * Normalize header line endings to ensure double spaces for Markdown line breaks * Use this when content already has a header that should be preserved */ normalizeHeaderLineEndings(content: string): string; /** * Normalize all metadata line endings throughout the entire content body * This ensures **Key**: Value lines render with proper line breaks in Markdown preview */ normalizeContentLineEndings(content: string): string; /** * Build the standard header block * Note: Double spaces at end of lines create Markdown line breaks */ private buildHeader; /** * Remove existing header from content if present */ private removeExistingHeader; /** * Get status emoji for document status */ getStatusEmoji(status: DocumentStatus): string; /** * Get default title for document type */ getDefaultTitle(type: DocumentType): string; /** * Create default metadata for a new document */ createDefaultMetadata(type: DocumentType, purpose: string): DocumentMetadata; /** * Update metadata for an existing document */ updateMetadata(existing: DocumentMetadata, updates?: Partial): DocumentMetadata; /** * Markdown formatting prefixes that indicate structural lines */ private static readonly MARKDOWN_PREFIXES; /** * Check if a line is a formatting marker or structural syntax (not actual content) */ private isFormattingLine; /** * Check if line is markdown formatting */ private isMarkdownFormatting; /** * Check if line is JSON structural syntax */ private isJsonStructural; /** * Try to extract meaningful text from JSON content */ private extractFromJson; /** * Extract purpose from content if not provided */ extractPurpose(content: string, type: DocumentType): string; /** * Get default purpose for document type */ private getDefaultPurpose; /** * Truncate text at a sentence boundary up to maxLength * Ensures we don't cut off mid-sentence */ private truncateAtSentence; } //# sourceMappingURL=document-template.service.d.ts.map