/** * Extracts metadata from pure YAML memory files for lightweight indexing. * * Memory files differ from other elements: they are pure YAML (not markdown * with frontmatter). Metadata lives under a top-level `metadata` key or * directly as top-level keys. This extractor reads raw YAML and returns * the subset of fields needed for ElementIndexEntry without constructing * a full Memory object. */ import type { ElementIndexEntry } from './types.js'; export declare class MemoryMetadataExtractor { /** * Align with the memory save/load limit (256KB). Issue #2329: this was 64KB, * so memories that grew past it indexed as 'unnamed' with default metadata. */ private static readonly MAX_YAML_SIZE; /** * Extract index-relevant metadata from raw YAML memory content. * * @param rawContent - Full YAML file content * @param relativePath - Path relative to the memories element directory * @returns Partial ElementIndexEntry with extracted fields */ static extractMetadata(rawContent: string, relativePath: string): Partial; /** * Infer the memory type from the file's relative path. * * @param relativePath - Path relative to the memories directory * @returns 'system' | 'adapter' | 'user' */ static inferMemoryType(relativePath: string): string; /** * Extract YAML content between --- frontmatter markers. * Returns null if no valid frontmatter block found. */ private static extractFrontmatter; /** * Parse raw YAML using the centralized secure parser. * Returns parse diagnostics so callers can fail closed while preserving error context. */ private static tryParseYamlObject; /** Return a minimal default entry for empty/corrupt content. */ private static defaultEntry; private static normalizeText; } //# sourceMappingURL=MemoryMetadataExtractor.d.ts.map