Commit graph

284 commits

Author SHA1 Message Date
32dbdcec61 chore(release): 7.9.0 2026-01-27 13:48:43 -08:00
6c27f9f7fd chore(release): 7.8.0 2026-01-27 10:30:38 -08:00
2b901974ed chore(release): 7.7.0 2026-01-26 17:25:15 -08:00
b0ea2f3810 chore(release): 7.6.1 2026-01-26 14:22:44 -08:00
2ee6a049a6 chore(release): 7.6.0 2026-01-26 13:16:08 -08:00
f0f7acccc5 chore(release): 7.5.4 2026-01-26 13:08:44 -08:00
7883bb1545 chore(release): 7.5.3 2026-01-26 13:02:15 -08:00
1208c6597e chore(release): 7.5.2 2026-01-26 12:52:33 -08:00
20a3a59def chore(release): 7.5.1 2026-01-26 12:49:11 -08:00
58d85b9c91 chore(release): 7.5.0 2026-01-26 12:16:09 -08:00
478c6e6342 chore(release): 7.4.1 2026-01-20 17:38:29 -08:00
311f165533 chore(release): 7.4.0 2026-01-20 16:22:12 -08:00
24039e8a1a chore(release): 7.3.1 2026-01-16 17:05:10 -08:00
1a813c7b86 chore(release): 7.3.0 2026-01-07 12:52:12 -08:00
19c5e67035 chore(release): 7.2.2 2026-01-07 10:46:59 -08:00
cf06d82520 chore(release): 7.2.1 2026-01-06 18:01:38 -08:00
1a32ed65ab chore(release): 7.2.0 2026-01-06 17:19:58 -08:00
677e2d6624 perf: 580x faster embedding init - separate model from WASM
Cloud Run cold starts taking 139 seconds due to 90MB WASM file with
embedded 87MB model weights. WASM compilation scales with file size.

Solution: Split into 2.4MB WASM (code only) + external model files.
- WASM compile: 139,000ms → 6-8ms
- Model load: N/A → 30-115ms
- Total init: 139,000ms → 136-240ms

New modelLoader.ts handles all environments:
- Node.js: fs.readFile()
- Bun: Bun.file()
- Bun --compile: auto-embedded assets
- Browser: fetch()

Zero config - same API, npm package includes model files.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 17:18:58 -08:00
4fc1fb7340 chore(release): 7.1.1 2026-01-06 16:03:55 -08:00
65703dbe59 fix: resolve 50-100x slower add() on cloud storage (GCS/S3/R2/Azure)
Root cause: Storage type detection at 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 (7-12 seconds instead of 50-200ms).

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.

Also added:
- Performance regression tests (10 new tests)
- test:perf npm script for running performance tests

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 16:02:13 -08:00
61100bdc9d chore(release): 7.1.0 2026-01-06 14:53:13 -08:00
8e21e71980 chore(release): 7.0.1 2026-01-06 14:10:08 -08:00
ffd18c9598 chore(release): 7.0.0 2026-01-06 12:53:42 -08:00
da7d2ed29d feat: migrate embeddings to Candle WASM + remove semantic type inference
Major architectural changes:

1. EMBEDDINGS ENGINE (ONNX → Candle WASM):
   - Replace ONNX Runtime with Rust Candle compiled to WASM
   - Embedded model in WASM binary (no external downloads)
   - Quantized Q8 precision with <50MB memory footprint
   - Zero-download, offline-first operation
   - Same embedding quality (all-MiniLM-L6-v2)

2. REMOVE SEMANTIC TYPE INFERENCE:
   - Delete embeddedKeywordEmbeddings.ts (14MB of pre-computed embeddings)
   - Remove typeAwareQueryPlanner.ts and semanticTypeInference.ts
   - Remove VerbExactMatchSignal (uses keyword embeddings)
   - Update SmartRelationshipExtractor to 3 signals (55%/30%/15% weights)

API CHANGES (requires v7.0.0):
- Removed: inferTypes(), inferNouns(), inferVerbs(), inferIntent()
- Removed: getSemanticTypeInference(), SemanticTypeInference class
- Removed: TypeInference, SemanticTypeInferenceOptions types

Users can still use natural language queries in find() - they just
need to specify type explicitly for type-optimized searches.

PACKAGE SIZE IMPACT:
- Compressed: 90.1 MB → 86.2 MB (-4.3%)
- Uncompressed: 114.4 MB → 100.3 MB (-12%)
- ~448K lines of code removed

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 12:52:34 -08:00
81cd16e41b chore(release): 6.6.2 2026-01-05 16:57:51 -08:00
7ae520883a chore(release): 6.6.1 2025-12-18 10:31:10 -08:00
746b1b8e24 chore(release): 6.6.0 2025-12-17 17:43:58 -08:00
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
c1deb7a623 chore(release): 6.5.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 13:27:45 -08:00
ec6fe0c039 chore(release): 6.4.0 2025-12-11 08:41:14 -08:00
f0270cc568 chore(release): 6.3.2 2025-12-09 16:17:45 -08:00
f3765afb9e chore(release): 6.3.1 2025-12-09 09:38:05 -08:00
292be1b9cd chore(release): 6.3.0 - singleton GraphAdjacencyIndex architecture fix
Critical architectural fix for VFS tree corruption bug:
- GraphAdjacencyIndex singleton via storage.getGraphIndex()
- Auto-rebuild verbIdSet when LSM-trees have existing data
- Removed dual-ownership causing verbIdSet out of sync
- PathResolver cache invalidation on checkout/fork

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 12:55:35 -08:00
810b75647c chore(release): 6.2.9 - fix critical VFS bugs (directory corruption)
Bug fixes:
- Fix verbCountsByType optimization skipping Contains relationships
- Fix UnifiedCache not invalidated on path deletion
- Add fast path for sourceId + verbType queries (common VFS pattern)
- Save statistics on first entity of each type

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:22:41 -08:00
1da6048245 chore(release): 6.2.8 - deferred HNSW persistence for 30-50× faster cloud adds
Performance fix for GCS/S3/R2/Azure:
- Single add(): 7-11 seconds → 200-400ms
- Zero configuration - automatic for cloud storage
- flush() on close() ensures data durability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 14:20:12 -08:00
a33b759c40 chore(release): 6.2.7 - simplify cloud storage to always-on write buffering
Performance & Consistency Improvements:
- Always-on write buffering for cloud adapters (GCS, S3, R2, Azure)
- Removes dynamic mode switching complexity (-204 lines)
- Consistent, predictable behavior regardless of load
- Preserves v6.2.6 cache-before-buffer fix

Cloud storage always benefits from batching - no reason for dynamic switching.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 13:43:11 -08:00
6449bb1afe chore(release): 6.2.6 - fix cloud storage read-after-write consistency
Fix add() → relate() race condition in cloud storage (GCS, S3, R2, Azure)

Problem:
- In high-volume mode, writes go to buffer instead of direct storage
- Cache was NOT populated when buffering
- add() returns but relate() fails with "Source entity not found"

Solution:
- Populate cache BEFORE adding to write buffer
- Ensures immediate read-after-write consistency
- Buffer still flushes asynchronously for performance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 13:23:25 -08:00
e4bbd7fb0e chore(release): 6.2.5 - fix counts.byType() accumulation bug 2025-12-02 11:45:22 -08:00
ea53c11fea chore(release): 6.2.4 - fix asOf() COW property name mismatch 2025-12-02 11:22:17 -08:00
0ba6da405e chore(release): 6.2.3 - fix counts.byType({ excludeVFS: true }) returning empty
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 12:08:04 -08:00
e4ca3839e0 chore(release): 6.2.2 2025-11-25 15:41:12 -08:00
0c90eaa8cf chore(release): 6.2.1 - excludeVFS consistency + VFS statistics API 2025-11-25 12:37:44 -08:00
c0d3968ccf chore(release): 6.2.0 2025-11-20 15:24:59 -08:00
b7c2c6fc99 feat: VFS path resolution now uses MetadataIndexManager for 75x faster reads
Add 3-tier caching architecture to PathResolver for optimal performance
across all storage adapters (FileSystem, GCS, S3, Azure, R2, OPFS):

- L1: UnifiedCache (global LRU, <1ms)
- L2: PathResolver cache (local warm cache, <1ms)
- L3: MetadataIndexManager (roaring bitmap query, 5-20ms on GCS)
- Fallback: Graph traversal (graceful degradation)

Performance improvements:
- Cold reads: GCS/S3/Azure 1,500ms → 20ms (75x faster)
- Warm reads: All adapters <1ms (1,500x faster)

Works for all storage adapters with zero config. Automatically uses
MetadataIndexManager if available, falls back to graph traversal.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 10:30:58 -08:00
43300531a6 chore(release): 6.0.2 2025-11-20 09:55:31 -08:00
f5f998619a chore(release): 6.0.1 2025-11-20 08:42:35 -08:00
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
9730ca41e5 chore(release): 5.12.0 2025-11-19 09:00:49 -08:00
d624f39fce chore(release): 5.11.1 2025-11-18 16:30:36 -08:00
b27dda8251 chore(release): 5.11.0 2025-11-18 13:48:27 -08:00