import type { Logger } from '@dexto/core'; import type { BlobStore, BlobInput, BlobMetadata, BlobReference, BlobData, BlobStats } from './types.js'; import type { InMemoryBlobStoreConfigInput } from './schemas.js'; /** * In-memory blob store implementation. * * Stores blobs in memory with content-based deduplication and size limits. * Suitable for development, testing, and scenarios where blob persistence * across restarts is not required. * * Features: * - Content-based deduplication (same as LocalBlobStore) * - Configurable size limits (per-blob and total) * - Automatic cleanup of old blobs * - MIME type detection * - Multi-format retrieval (base64, buffer, stream, data URI) * * Limitations: * - Data lost on restart (no persistence) * - Path format not supported (no filesystem) * - Memory usage proportional to blob size */ export type MemoryBlobStoreOptions = Omit; export declare class MemoryBlobStore implements BlobStore { private config; private blobs; private connected; private logger; constructor(options: MemoryBlobStoreOptions, logger: Logger); connect(): Promise; disconnect(): Promise; isConnected(): boolean; getStoreType(): string; store(input: BlobInput, metadata?: BlobMetadata): Promise; retrieve(reference: string, format?: 'base64' | 'buffer' | 'path' | 'stream' | 'url'): Promise; exists(reference: string): Promise; delete(reference: string): Promise; cleanup(olderThan?: Date): Promise; getStats(): Promise; listBlobs(): Promise; getStoragePath(): string | undefined; /** * Calculate total size of all blobs in memory */ private getTotalSize; /** * Convert various input types to Buffer. * Copied from LocalBlobStore with minor adaptations. */ private inputToBuffer; /** * Parse blob reference to extract ID. * Copied from LocalBlobStore. */ private parseReference; /** * Detect MIME type from buffer content and/or filename. * Copied from LocalBlobStore. */ private detectMimeType; /** * Check if buffer contains text content. * Copied from LocalBlobStore. */ private isTextBuffer; } //# sourceMappingURL=memory-blob-store.d.ts.map