2025-05-23 10:55:20 -07:00
/ * *
* OPFS BrainyData
* A vector database using HNSW indexing with Origin Private File System storage
* /
// Export main BrainyData class and related types
2025-05-29 09:52:30 -07:00
import { BrainyData , BrainyDataConfig } from './brainyData.js'
2025-05-23 10:55:20 -07:00
export { BrainyData }
export type { BrainyDataConfig }
// Export distance functions for convenience
2025-05-29 09:52:30 -07:00
import {
euclideanDistance ,
cosineDistance ,
manhattanDistance ,
dotProductDistance
} from './utils/index.js'
export {
euclideanDistance ,
cosineDistance ,
manhattanDistance ,
dotProductDistance
2025-05-23 10:55:20 -07:00
}
2025-05-27 13:58:49 -07:00
// Export embedding functionality
import {
SimpleEmbedding ,
UniversalSentenceEncoder ,
createEmbeddingFunction ,
2025-05-27 15:11:12 -07:00
createTensorFlowEmbeddingFunction ,
createSimpleEmbeddingFunction ,
2025-05-27 13:58:49 -07:00
defaultEmbeddingFunction
2025-05-29 09:52:30 -07:00
} from './utils/embedding.js'
2025-05-27 13:58:49 -07:00
export {
SimpleEmbedding ,
UniversalSentenceEncoder ,
createEmbeddingFunction ,
2025-05-27 15:11:12 -07:00
createTensorFlowEmbeddingFunction ,
createSimpleEmbeddingFunction ,
2025-05-27 13:58:49 -07:00
defaultEmbeddingFunction
}
2025-05-23 10:55:20 -07:00
// Export storage adapters
2025-05-29 09:52:30 -07:00
import {
OPFSStorage ,
MemoryStorage ,
createStorage
} from './storage/opfsStorage.js'
2025-06-04 10:00:38 -07:00
import { FileSystemStorage } from './storage/fileSystemStorage.js'
import { R2Storage , S3CompatibleStorage } from './storage/s3CompatibleStorage.js'
2025-05-29 09:52:30 -07:00
export {
OPFSStorage ,
MemoryStorage ,
2025-06-04 10:00:38 -07:00
FileSystemStorage ,
R2Storage ,
S3CompatibleStorage ,
2025-05-29 09:52:30 -07:00
createStorage
2025-05-23 10:55:20 -07:00
}
2025-05-27 10:08:01 -07:00
// Export augmentation pipeline
import {
AugmentationPipeline ,
augmentationPipeline ,
ExecutionMode ,
PipelineOptions
2025-05-29 09:52:30 -07:00
} from './augmentationPipeline.js'
2025-06-04 10:00:38 -07:00
// Export sequential pipeline
import {
SequentialPipeline ,
sequentialPipeline ,
PipelineResult ,
SequentialPipelineOptions
} from './sequentialPipeline.js'
2025-05-27 10:08:01 -07:00
export {
AugmentationPipeline ,
augmentationPipeline ,
2025-06-04 10:00:38 -07:00
ExecutionMode ,
SequentialPipeline ,
sequentialPipeline
2025-05-27 10:08:01 -07:00
}
2025-06-04 10:00:38 -07:00
export type { PipelineOptions , PipelineResult , SequentialPipelineOptions }
2025-05-27 10:08:01 -07:00
2025-05-29 09:52:30 -07:00
// Export augmentation registry for build-time loading
2025-05-28 15:39:14 -07:00
import {
2025-05-29 09:52:30 -07:00
availableAugmentations ,
registerAugmentation ,
initializeAugmentationPipeline ,
setAugmentationEnabled ,
getAugmentationsByType
} from './augmentationRegistry.js'
export {
availableAugmentations ,
registerAugmentation ,
initializeAugmentationPipeline ,
setAugmentationEnabled ,
getAugmentationsByType
}
// Export augmentation registry loader for build tools
import {
loadAugmentationsFromModules ,
createAugmentationRegistryPlugin ,
createAugmentationRegistryRollupPlugin
} from './augmentationRegistryLoader.js'
2025-05-28 15:39:14 -07:00
import type {
2025-05-29 09:52:30 -07:00
AugmentationRegistryLoaderOptions ,
AugmentationLoadResult
} from './augmentationRegistryLoader.js'
2025-05-28 15:39:14 -07:00
export {
2025-05-29 09:52:30 -07:00
loadAugmentationsFromModules ,
createAugmentationRegistryPlugin ,
createAugmentationRegistryRollupPlugin
2025-05-28 15:39:14 -07:00
}
export type {
2025-05-29 09:52:30 -07:00
AugmentationRegistryLoaderOptions ,
AugmentationLoadResult
2025-05-28 15:39:14 -07:00
}
2025-05-29 10:29:52 -07:00
// Export augmentation implementations
import {
2025-06-02 12:23:11 -07:00
MemoryStorageAugmentation ,
FileSystemStorageAugmentation ,
OPFSStorageAugmentation ,
createMemoryAugmentation
} from './augmentations/memoryAugmentations.js'
2025-05-29 10:29:52 -07:00
export {
2025-06-02 12:23:11 -07:00
MemoryStorageAugmentation ,
FileSystemStorageAugmentation ,
OPFSStorageAugmentation ,
2025-06-02 17:03:53 -07:00
createMemoryAugmentation
2025-05-29 10:29:52 -07:00
}
2025-05-29 09:52:30 -07:00
2025-05-23 10:55:20 -07:00
// Export types
import type {
Vector ,
VectorDocument ,
SearchResult ,
DistanceFunction ,
EmbeddingFunction ,
EmbeddingModel ,
HNSWNode ,
Edge ,
HNSWConfig ,
StorageAdapter
2025-05-29 09:52:30 -07:00
} from './coreTypes.js'
2025-05-23 10:55:20 -07:00
export type {
Vector ,
VectorDocument ,
SearchResult ,
DistanceFunction ,
EmbeddingFunction ,
EmbeddingModel ,
HNSWNode ,
Edge ,
HNSWConfig ,
StorageAdapter
}
2025-05-27 10:08:01 -07:00
// Export augmentation types
import type {
IAugmentation ,
AugmentationResponse ,
2025-05-28 11:03:32 -07:00
IWebSocketSupport ,
ISenseAugmentation ,
IConduitAugmentation ,
ICognitionAugmentation ,
IMemoryAugmentation ,
IPerceptionAugmentation ,
IDialogAugmentation ,
IActivationAugmentation
2025-05-29 09:52:30 -07:00
} from './types/augmentations.js'
import { AugmentationType , BrainyAugmentations } from './types/augmentations.js'
2025-05-27 10:08:01 -07:00
export type {
IAugmentation ,
AugmentationResponse ,
2025-05-28 11:48:24 -07:00
IWebSocketSupport
}
export {
AugmentationType ,
BrainyAugmentations ,
2025-05-28 11:03:32 -07:00
ISenseAugmentation ,
IConduitAugmentation ,
ICognitionAugmentation ,
IMemoryAugmentation ,
IPerceptionAugmentation ,
IDialogAugmentation ,
IActivationAugmentation
2025-05-27 10:08:01 -07:00
}
// Export combined WebSocket augmentation interfaces
export type {
IWebSocketCognitionAugmentation ,
IWebSocketSenseAugmentation ,
IWebSocketPerceptionAugmentation ,
IWebSocketActivationAugmentation ,
IWebSocketDialogAugmentation ,
IWebSocketConduitAugmentation ,
IWebSocketMemoryAugmentation
2025-05-29 09:52:30 -07:00
} from './types/augmentations.js'
2025-05-28 11:31:10 -07:00
// Export graph types
import type {
GraphNoun ,
GraphVerb ,
EmbeddedGraphVerb ,
Person ,
Place ,
Thing ,
Event ,
Concept ,
Content
2025-05-29 09:52:30 -07:00
} from './types/graphTypes.js'
import { NounType , VerbType } from './types/graphTypes.js'
2025-05-28 11:31:10 -07:00
export type {
GraphNoun ,
GraphVerb ,
EmbeddedGraphVerb ,
Person ,
Place ,
Thing ,
Event ,
Concept ,
Content
}
export { NounType , VerbType }