brainy/scripts
David Snelling 1f59aa2013 feat: replace transformers.js with direct ONNX WASM for Bun compatibility
- Remove @huggingface/transformers dependency (539MB native binaries)
- Add direct ONNX Runtime Web embedding engine
- Bundle all-MiniLM-L6-v2-q8 model (24MB, no runtime downloads)
- Works with Node.js, Bun, and bun build --compile
- Air-gap compatible: fully self-contained, no internet required

New WASM embedding components:
- WASMEmbeddingEngine: Main integration class
- WordPieceTokenizer: Pure TypeScript tokenizer
- EmbeddingPostProcessor: Mean pooling + L2 normalization
- ONNXInferenceEngine: Direct ONNX Runtime Web wrapper
- AssetLoader: Model file loading

Tests added:
- 11 WASM embedding integration tests
- 8 Bun compatibility tests

New npm scripts:
- test:wasm - Run WASM embedding tests
- test:bun - Run tests with Bun
- test:bun:compile - Build and run compiled binary
2025-12-17 17:42:37 -08:00
..
buildEmbeddedPatterns.ts fix: handle potential undefined embedding vectors in buildEmbeddedPatterns 2025-09-29 10:10:00 -07:00
buildKeywordEmbeddings.ts fix: update all Stage 2 references to Stage 3 CANONICAL type counts 2025-11-06 09:40:33 -08:00
buildTypeEmbeddings.ts feat: Stage 3 CANONICAL taxonomy with 169 types (v5.5.0) 2025-11-06 09:02:23 -08:00
check-keyword-embeddings.cjs feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
check-patterns.cjs fix: use .cjs extension for check-patterns script 2025-08-27 10:00:56 -07:00
check-type-embeddings.cjs perf: pre-compute type embeddings at build time (zero runtime cost) 2025-10-09 18:08:57 -07:00
create-models-release.sh feat: reliable multi-source model delivery system 2025-08-28 08:45:35 -07:00
diagnose-workshop-issue.ts feat: brain.find() excludes VFS by default (Option 3C) 2025-10-24 11:42:47 -07:00
download-model.cjs feat: replace transformers.js with direct ONNX WASM for Bun compatibility 2025-12-17 17:42:37 -08:00
download-models.cjs feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
ensure-models.js 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
migrate-to-structured-logger.ts feat: Brainy 3.0 - Triple Intelligence Release 2025-09-15 11:06:16 -07:00
migrate-vfs-storage.ts feat: add ImageHandler with EXIF extraction and comprehensive MIME detection (v5.2.0) 2025-11-03 14:06:17 -08:00
prepare-models.js 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
release.sh feat: add --skip-tests flag to release script 2025-10-01 13:51:47 -07:00
setup-github-models.sh feat: reliable multi-source model delivery system 2025-08-28 08:45:35 -07:00
test-with-memory.sh 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
update-augmentations-metadata.sh feat: comprehensive metadata namespace architecture and cleanup system 2025-08-27 15:38:48 -07:00