agentic-flow 2.0.1-alpha.16 → 2.0.1-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/intelligence/EmbeddingCache.d.ts +105 -0
- package/dist/intelligence/EmbeddingCache.d.ts.map +1 -0
- package/dist/intelligence/EmbeddingCache.js +253 -0
- package/dist/intelligence/EmbeddingCache.js.map +1 -0
- package/dist/intelligence/EmbeddingService.d.ts +31 -1
- package/dist/intelligence/EmbeddingService.d.ts.map +1 -1
- package/dist/intelligence/EmbeddingService.js +86 -7
- package/dist/intelligence/EmbeddingService.js.map +1 -1
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.d.ts +121 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.d.ts.map +1 -1
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.js +215 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,86 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [2.0.1-alpha.18] - 2025-12-31
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Persistent SQLite Embedding Cache**: Cross-session embedding persistence
|
|
9
|
+
- New `EmbeddingCache` class with SQLite (better-sqlite3) backend
|
|
10
|
+
- **9000x faster** cached lookups: ~0.045ms vs ~400ms ONNX inference
|
|
11
|
+
- Batch writes with transactions: 0.016ms per embedding
|
|
12
|
+
- Stored at `~/.agentic-flow/embedding-cache.db`
|
|
13
|
+
- LRU eviction with configurable max entries (default: 10,000)
|
|
14
|
+
- Automatic cleanup of entries older than 30 days
|
|
15
|
+
- WAL mode for concurrent access
|
|
16
|
+
|
|
17
|
+
- **Cache Hierarchy** (checked in order):
|
|
18
|
+
1. In-memory LRU cache (~0.001ms) - fastest, ephemeral
|
|
19
|
+
2. Persistent SQLite cache (~0.045ms) - persists across sessions
|
|
20
|
+
3. ONNX inference (~400ms) - only on complete cache miss
|
|
21
|
+
|
|
22
|
+
- **EmbeddingService Cache Methods**:
|
|
23
|
+
- `clearPersistentCache()` - Clear SQLite cache
|
|
24
|
+
- `clearAllCaches()` - Clear both memory and persistent caches
|
|
25
|
+
- `getPersistentCacheStats()` - Get cache statistics
|
|
26
|
+
|
|
27
|
+
- **Environment Variables**:
|
|
28
|
+
- `AGENTIC_FLOW_PERSISTENT_CACHE=true|false` (default: true)
|
|
29
|
+
|
|
30
|
+
### Performance (with persistent cache)
|
|
31
|
+
| Operation | Time | Notes |
|
|
32
|
+
|-----------|------|-------|
|
|
33
|
+
| ONNX cold | ~400ms | First inference + cache write |
|
|
34
|
+
| SQLite read | ~0.045ms | Persistent cache lookup |
|
|
35
|
+
| SQLite batch write | 0.016ms/ea | Transactional batch insert |
|
|
36
|
+
| Memory cache | ~0.001ms | In-memory LRU lookup |
|
|
37
|
+
| **Speedup** | **9000x** | SQLite vs ONNX inference |
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- EmbeddingService now checks persistent cache before ONNX inference
|
|
41
|
+
- Only semantic (ONNX) embeddings are persisted (simple hash-based are not)
|
|
42
|
+
|
|
43
|
+
## [2.0.1-alpha.17] - 2025-12-31
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- **10 Attention Mechanisms** (ruvector@0.1.63):
|
|
47
|
+
- `MultiHeadAttention` - Pattern matching
|
|
48
|
+
- `FlashAttention` - Memory-efficient O(n)
|
|
49
|
+
- `HyperbolicAttention` - Hierarchical data (AST, trees)
|
|
50
|
+
- `LinearAttention` - O(n) real-time hooks
|
|
51
|
+
- `LocalGlobalAttention` - Long document summarization
|
|
52
|
+
- `MoEAttention` - Multi-agent routing
|
|
53
|
+
- `GraphRoPeAttention` - Code structure analysis
|
|
54
|
+
- `EdgeFeaturedAttention` - Import/dependency graphs
|
|
55
|
+
- `DualSpaceAttention` - Euclidean + Hyperbolic
|
|
56
|
+
|
|
57
|
+
- **Extended Worker Pool Operations**:
|
|
58
|
+
- `speculativeEmbed(files)` - Pre-embed for post-edit
|
|
59
|
+
- `analyzeAST(files)` - Multi-file parallel AST
|
|
60
|
+
- `analyzeComplexity(files)` - Cyclomatic metrics
|
|
61
|
+
- `buildDependencyGraph(files)` - Import graph
|
|
62
|
+
- `securityScan(files)` - Parallel SAST
|
|
63
|
+
- `ragRetrieve(query, chunks)` - Parallel RAG
|
|
64
|
+
- `rankContext(query, contexts)` - Relevance ranking
|
|
65
|
+
- `deduplicate(texts)` - Semantic deduplication
|
|
66
|
+
- `gitBlame(files)` - Parallel blame analysis
|
|
67
|
+
- `gitChurn(patterns, since)` - Code churn metrics
|
|
68
|
+
|
|
69
|
+
- **Parallel Attention Compute**:
|
|
70
|
+
- `parallelAttentionCompute()` - 3-4x faster multi-query
|
|
71
|
+
- `batchAttentionCompute()` - Batch Q-K-V sets
|
|
72
|
+
- `computeFlashAttentionAsync()` - Non-blocking flash
|
|
73
|
+
- `getAttentionForUseCase()` - Auto-select attention type
|
|
74
|
+
|
|
75
|
+
- **Training Utilities**:
|
|
76
|
+
- `AdamOptimizer` - Attention parameter training
|
|
77
|
+
- `infoNceLoss()` - Contrastive learning
|
|
78
|
+
- `mineHardNegatives()` - Hard negative mining
|
|
79
|
+
- `benchmarkAttention()` - Performance comparison
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
- Updated ruvector dependency: 0.1.62 → 0.1.63
|
|
83
|
+
- Intelligence bridge supports all attention mechanisms
|
|
84
|
+
|
|
5
85
|
## [2.0.1-alpha.16] - 2025-12-31
|
|
6
86
|
|
|
7
87
|
### Added
|