Initial commit: Brainy - Multi-Dimensional AI Database

Open source vector database with HNSW indexing, graph relationships,
and metadata facets. Features CLI with professional augmentation registry
integration for discovering extensions and capabilities.
This commit is contained in:
David Snelling 2025-08-18 17:35:06 -07:00
commit f8c45f2d8d
448 changed files with 103294 additions and 0 deletions

60
dist/utils/metadataIndexCache.d.ts vendored Normal file
View file

@ -0,0 +1,60 @@
/**
* MetadataIndexCache - Caches metadata index data for improved performance
* Reuses the same pattern as SearchCache for consistency
*/
export interface MetadataCacheEntry {
data: any;
timestamp: number;
hits: number;
}
export interface MetadataIndexCacheConfig {
maxAge?: number;
maxSize?: number;
enabled?: boolean;
hitCountWeight?: number;
}
export declare class MetadataIndexCache {
private cache;
private maxAge;
private maxSize;
private enabled;
private hitCountWeight;
private hits;
private misses;
private evictions;
constructor(config?: MetadataIndexCacheConfig);
/**
* Get cached entry
*/
get(key: string): any | undefined;
/**
* Set cache entry
*/
set(key: string, data: any): void;
/**
* Evict least valuable entry based on age and hit count
*/
private evictLeastValuable;
/**
* Invalidate cache entries matching a pattern
*/
invalidatePattern(pattern: string): void;
/**
* Clear all cache entries
*/
clear(): void;
/**
* Get cache statistics
*/
getStats(): {
size: number;
hits: number;
misses: number;
hitRate: number;
evictions: number;
};
/**
* Get estimated memory usage
*/
getMemoryUsage(): number;
}