### Changes: - Introduced environment-independent WebStreams API compatibility: - Added `initializeStreamClasses` for dynamic detection of WebStreams API support in browsers and Node.js. - Implemented fallback mechanism with detailed error messages for unsupported environments. - Ensured asynchronous initialization of stream classes without blocking module execution. - Updated `SequentialPipeline`: - Added `ensureStreamClassesInitialized` method to streamline WebStreams setup across operations. - Enhanced `initialize` to parallelize stream classes and `BrainyData` initialization. - Refactored WebSocket handlers (`createWebSocketHandler` and `createWebSocketStreams`) to support async stream initialization. - Improved TypeScript typings for streams (`TransformStreamDefaultController`, `PipelineResult<unknown>`). - Adjusted `ServerSearchConduitAugmentation`: - Introduced dependency on `BrainyDataInterface` instead of direct `BrainyData` usage. - Ensured `localDb` is set prior to initialization with an appropriate error message. - Updated methods (`setLocalDb`, `getLocalDb`, and vector operations) to rely on `BrainyDataInterface`. - Enhanced error handling and logging throughout streaming and augmentation processes. ### Purpose: Improved cross-environment compatibility of WebStreams API, ensuring seamless usage in both browsers and Node.js. Refactored `ServerSearchConduitAugmentation` to decouple `BrainyData` dependency, |
||
|---|---|---|
| .. | ||
| augmentations | ||
| examples | ||
| hnsw | ||
| storage | ||
| types | ||
| utils | ||
| augmentationPipeline.ts | ||
| augmentationRegistry.ts | ||
| augmentationRegistryLoader.ts | ||
| brainyData.ts | ||
| cli.ts | ||
| coreTypes.ts | ||
| index.ts | ||
| sequentialPipeline.ts | ||
| unified.ts | ||