• v7.3.0 1a813c7b86

    dpsifr released this 2026-01-07 21:52:12 +01:00 | 472 commits to main since this release

    Downloads
  • v7.2.2 19c5e67035

    dpsifr released this 2026-01-07 19:46:59 +01:00 | 474 commits to main since this release

    Downloads
  • v7.2.1 cf06d82520

    dpsifr released this 2026-01-07 03:01:38 +01:00 | 477 commits to main since this release

    Downloads
  • v7.2.0 1a32ed65ab

    dpsifr released this 2026-01-07 02:19:58 +01:00 | 479 commits to main since this release

    Downloads
  • v7.1.1 4fc1fb7340

    dpsifr released this 2026-01-07 01:03:55 +01:00 | 481 commits to main since this release

    Critical Bug Fix

    Fixed 50-100x slower add() operations on cloud storage (GCS/S3/R2/Azure)

    Symptoms

    • add() taking 7-12 seconds instead of 50-200ms
    • Only affects cloud storage with auto-detection (not explicit type: 'gcs')

    Root Cause

    Storage type detection in setupIndex() relied on this.config.storage.type which was never set after createStorage() auto-detected the storage type. This caused cloud storage to use 'immediate' persistence mode instead of 'deferred', resulting in 20-30 GCS writes per add() operation.

    Fix

    Added getStorageType() helper that detects storage type from the storage instance class name (e.g., GcsStorage'gcs'), used as fallback when config.storage.type is not explicitly set.

    Upgrade Instructions

    Simply update to v7.1.1:

    npm install @soulcraft/brainy@7.1.1
    

    No configuration changes required - the fix automatically detects cloud storage types.

    Workaround for v7.1.0 users (if you can't upgrade immediately)

    const brain = new Brainy({
      storage: {
        type: 'gcs',  // Explicit type fixes the issue
        gcsNativeStorage: { bucketName: 'your-bucket' }
      },
      hnswPersistMode: 'deferred'  // Or explicitly set this
    })
    

    Performance Tests Added

    Added regression tests to prevent future issues:

    • Single add() < 500ms
    • 10 add() operations < 5 seconds
    • Storage type detection verification for GCS/S3/R2/Azure

    Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v7.1.0...v7.1.1

    Downloads
  • v7.1.0 61100bdc9d

    dpsifr released this 2026-01-06 23:53:13 +01:00 | 484 commits to main since this release

    New APIs

    6 New Public APIs leveraging the Candle WASM embedding engine and optimized indexes:

    API Description Performance
    embedBatch(texts) Batch embed multiple texts Batch WASM processing - avoids N separate JS↔WASM calls
    similarity(textA, textB) Semantic similarity score (0-1) Single call vs manual embed + embed + cosine
    indexStats() Comprehensive index statistics O(1) - aggregates pre-computed stats
    neighbors(entityId, options) Graph traversal with filters O(log n) - LSM-tree with bloom filters, sub-5ms
    findDuplicates(options) Find semantic duplicates O(k log n) - uses HNSW for ANN search
    cluster(options) Cluster by similarity O(k log n) - greedy algorithm with HNSW

    Performance Stack (v7.0.0+)

    The new APIs leverage the optimized infrastructure introduced in v7.0.0:

    Component Technology Benefit
    Embeddings Candle WASM (Rust) 93MB binary with embedded MiniLM-L6-v2, zero downloads
    Vector Search HNSW Index O(log n) approximate nearest neighbor
    Graph Traversal LSM-tree + Bloom Filters 90% of queries skip disk I/O, sub-5ms lookups
    Metadata Filtering RoaringBitmap32 Compressed bitmaps for fast AND/OR operations

    Examples

    // Batch embedding
    const embeddings = await brain.embedBatch([
      'Machine learning',
      'Deep neural networks',
      'Natural language processing'
    ])
    
    // Semantic similarity
    const score = await brain.similarity(
      'The cat sat on the mat',
      'A feline was resting on the rug'
    ) // ~0.85
    
    // Find duplicates
    const duplicates = await brain.findDuplicates({
      threshold: 0.9,
      type: NounType.Document
    })
    
    // Clustering
    const clusters = await brain.cluster({
      threshold: 0.8,
      minClusterSize: 3,
      includeCentroid: true
    })
    
    // Graph neighbors
    const neighbors = await brain.neighbors(entityId, {
      direction: 'outgoing',
      depth: 2
    })
    
    // Index statistics
    const stats = await brain.indexStats()
    console.log(`${stats.entities} entities, ${stats.vectors} vectors`)
    

    Migration from v6.x

    v7.0.0 introduced breaking changes to the embedding system:

    • Removed: onnxruntime-node dependency (was 200MB+ with external model downloads)
    • Added: Candle WASM with embedded model weights (93MB, zero-config)
    • Removed: Semantic type inference (NLP-based type detection)
    • Works in: Node.js, Bun, Bun --compile, browsers

    Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v7.0.1...v7.1.0

    Downloads
  • v7.0.1 8e21e71980

    v7.0.1 Stable

    dpsifr released this 2026-01-06 23:10:08 +01:00 | 486 commits to main since this release

    Downloads
  • v7.0.0 ffd18c9598

    v7.0.0 Stable

    dpsifr released this 2026-01-06 21:53:42 +01:00 | 488 commits to main since this release

    Downloads
  • v6.6.1 7ae520883a

    dpsifr released this 2025-12-18 19:31:10 +01:00 | 493 commits to main since this release

    Downloads
  • v6.6.0 746b1b8e24

    dpsifr released this 2025-12-18 02:43:58 +01:00 | 495 commits to main since this release

    Downloads