brainy/src/embeddings
David Snelling d4c78c8310 fix: resolve ONNX HandleScope V8 API errors by eliminating worker threads
CRITICAL ARCHITECTURAL FIX:
- Change node-worker strategy to node-direct for ONNX compatibility
- Use single model instance on main thread instead of worker pool
- Prevents HandleScope V8 API locking errors in Node.js 22/24
- Reduces memory usage from 360MB+ to ~90MB (single model vs 4 workers)
- Maintains async operations using native transformers.js capabilities

Root Cause: ONNX runtime cannot properly handle V8 isolate context
switching between worker threads, causing fatal HandleScope errors.

Solution: Keep ONNX operations in main V8 isolate while preserving
all existing async functionality and performance.

Tested: Multiple concurrent addNoun operations work without errors.
2025-08-28 16:24:02 -07:00
..
lightweight-embedder.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
model-manager.ts feat: reliable multi-source model delivery system 2025-08-28 08:45:35 -07:00
universal-memory-manager.ts fix: resolve ONNX HandleScope V8 API errors by eliminating worker threads 2025-08-28 16:24:02 -07:00
worker-embedding.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
worker-manager.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00