• v6.0.0 42ae5be455

    dpsifr released this 2025-11-20 01:46:11 +01:00 | 527 commits to main since this release

    🚀 v6.0.0 - ID-First Storage Architecture

    Major Performance Improvement: Direct O(1) entity access without type lookups!

    Breaking Changes

    ID-First Storage Paths

    • Before: entities/nouns/{TYPE}/metadata/{SHARD}/{ID}.json
    • After: entities/nouns/{SHARD}/{ID}/metadata.json
    • Migration handled automatically on first init()

    Removed Memory-Unsafe APIs
    All APIs that loaded entire datasets into memory have been removed:

    • brain.merge() → Use checkout() or manual pagination
    • brain.diff() → Use asOf() with pagination
    • brain.data().backup() → Use fork() for instant snapshots
    • brain.data().restore() → Use checkout() to switch branches

    Core Improvements

    Storage Architecture

    • All 8 storage adapters properly initialize GraphAdjacencyIndex
    • Fixed ID-first path typos (vector.jsonvectors.json)
    • Fixed MemoryStorage.initializeCounts() for ID-first paths
    • Direct O(1) entity access - no type lookups needed!

    New VFS APIs

    • vfs.du(path) - POSIX disk usage calculator
    • vfs.access(path, mode) - Permission checking
    • vfs.find(path, options) - Pattern-based file search

    Migration Guide

    See CHANGELOG.md for complete migration paths and examples.

    Stats

    • 28 files changed
    • +1,075 / -1,933 lines (net -858 lines!)
    • Cleaner, faster, more scalable
    Downloads