brainy/src/storage/adapters
David Snelling 42ae5be455 feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0)
BREAKING CHANGES:

**ID-First Storage Paths**
- Direct O(1) entity access without type lookups
- 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**
- Removed brain.merge() - loaded all entities into memory
- Removed brain.diff() - loaded all entities into memory
- Removed brain.data().backup() - loaded all entities into memory
- Removed brain.data().restore() - depended on backup()
- Removed CLI commands: backup, restore, cow merge

**Migration Paths**
- merge() → Use checkout() or manually copy entities with pagination
- diff() → Use asOf() with manual paginated comparison
- backup() → Use fork() for instant COW snapshots
- restore() → Use checkout() to switch to snapshot branch

Core Improvements:
-  All 8 storage adapters properly call super.init()
-  GraphAdjacencyIndex integration in BaseStorage.init()
-  Fixed ID-first path bugs (vector.json → vectors.json)
-  Fixed MemoryStorage.initializeCounts() for ID-first paths
-  New VFS APIs: du(), access(), find()
-  Comprehensive documentation with migration guides

Storage Adapters Fixed:
- MemoryStorage, FileSystemStorage, AzureBlobStorage
- GCSStorage, R2Storage, S3CompatibleStorage
- OPFSStorage, HistoricalStorageAdapter

Files Changed: 28 files, +1,075/-1,933 lines (net -858)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:46:11 -08:00
..
azureBlobStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
baseStorageAdapter.ts fix: prevent circuit breaker activation and data loss during bulk imports 2025-10-30 08:54:04 -07:00
batchS3Operations.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
fileSystemStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
gcsStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
historicalStorageAdapter.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
memoryStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
opfsStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
optimizedS3Search.ts fix: resolve critical 378x pagination infinite loop bug (v5.7.11) 2025-11-13 14:20:19 -08:00
r2Storage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
s3CompatibleStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00