feat: wire plugin system with provider resolution, storage factories, and browser deprecation
- Wire PluginRegistry into Brainy init() with provider resolution for distance,
metadataIndex, graphIndex, embeddings, roaring, msgpack, and storage adapters
- Add setupStorage() factory that resolves storage:* providers from plugins before
falling back to built-in createStorage()
- Export internals API (setGlobalCache, UnifiedCache, EntityIdMapper, etc.) for
cortex plugin consumption
- Add plugin.test.ts verifying registration, activation, and provider resolution
- Deprecate browser support (OPFS, Web Workers, WASM embeddings) with warnings
in preparation for v8.0 server-only release
- FileSystemStorage: fix setupStorage resolution for mmap-filesystem provider
2026-01-31 12:02:13 -08:00
|
|
|
/**
|
|
|
|
|
* Internal utilities for first-party plugins.
|
|
|
|
|
* NOT part of the public API — may change between minor versions.
|
|
|
|
|
*/
|
|
|
|
|
export { getGlobalCache, setGlobalCache, clearGlobalCache, UnifiedCache } from './utils/unifiedCache.js'
|
|
|
|
|
export type { UnifiedCacheConfig, CacheItem } from './utils/unifiedCache.js'
|
|
|
|
|
export { prodLog, createModuleLogger } from './utils/logger.js'
|
|
|
|
|
export { FieldTypeInference, FieldType } from './utils/fieldTypeInference.js'
|
|
|
|
|
export type { FieldTypeInfo } from './utils/fieldTypeInference.js'
|
|
|
|
|
export { EntityIdMapper } from './utils/entityIdMapper.js'
|
|
|
|
|
export type { EntityIdMapperOptions, EntityIdMapperData } from './utils/entityIdMapper.js'
|
2026-02-01 16:23:49 -08:00
|
|
|
export { getRecommendedCacheConfig, formatBytes, checkMemoryPressure } from './utils/memoryDetection.js'
|
|
|
|
|
export type { MemoryInfo, CacheAllocationStrategy } from './utils/memoryDetection.js'
|