brainy/src
David Snelling 25f7ab73b4 **feat: enhance WebStreams API compatibility and refactor BrainyData integration**
### 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,
2025-06-19 15:03:17 -07:00
..
augmentations **feat: enhance WebStreams API compatibility and refactor BrainyData integration** 2025-06-19 15:03:17 -07:00
examples chore: remove examples/externalPlugins.js and pluginLoader.ts, update imports to .js 2025-05-29 09:52:30 -07:00
hnsw **feat: integrate optimized index functionality into BrainyData** 2025-06-19 15:02:25 -07:00
storage **refactor: rename directories and variables for semantic clarity in OPFS storage** 2025-06-19 15:03:06 -07:00
types **feat: introduce Optimized HNSW Index with product quantization and disk-based storage support** 2025-06-19 15:02:05 -07:00
utils **refactor: remove simple embedding model and enhance UniversalSentenceEncoder implementation** 2025-06-19 15:02:39 -07:00
augmentationPipeline.ts feat: implement SequentialPipeline with threading and WebSocket support 2025-06-04 10:01:46 -07:00
augmentationRegistry.ts chore: remove examples/externalPlugins.js and pluginLoader.ts, update imports to .js 2025-05-29 09:52:30 -07:00
augmentationRegistryLoader.ts chore: remove examples/externalPlugins.js and pluginLoader.ts, update imports to .js 2025-05-29 09:52:30 -07:00
brainyData.ts **feat: integrate optimized index functionality into BrainyData** 2025-06-19 15:02:25 -07:00
cli.ts **feat: add backup and restore commands for database operations** 2025-06-19 15:00:58 -07:00
coreTypes.ts **feat: introduce Optimized HNSW Index with product quantization and disk-based storage support** 2025-06-19 15:02:05 -07:00
index.ts **feat: add browser-compatible build configuration and environment detection** 2025-06-19 14:59:42 -07:00
sequentialPipeline.ts **feat: enhance WebStreams API compatibility and refactor BrainyData integration** 2025-06-19 15:03:17 -07:00
unified.ts **feat: add browser-compatible build configuration and environment detection** 2025-06-19 14:59:42 -07:00