Skip to content

Feature/20260202 new features#1

Merged
leduclinh7141 merged 7 commits into
mainfrom
feature/20260202-new-features
Feb 2, 2026
Merged

Feature/20260202 new features#1
leduclinh7141 merged 7 commits into
mainfrom
feature/20260202-new-features

Conversation

@leduclinh7141

Copy link
Copy Markdown
Contributor

No description provided.

…ache

- Introduced LocalEmbeddingsService for offline text embeddings using Transformers.js.
- Implemented PersistentEmbeddingCache for caching embeddings with SQLite backend.
- Added tests for embedding cache functionality, including basic operations, expiration, capacity management, and statistics.
- Updated package.json to include new dependencies and paths for embeddings module.
- Created utility functions for embedding generation and cache management.
…cking

- Added HybridSearchEngine for combining FTS5 keyword search and vector semantic search.
- Introduced a 3-layer search workflow for improved token efficiency.
- Implemented token economics tracking to measure discovery and read tokens, along with savings metrics.
- Created TokenEconomicsTracker to manage per-entry and session-level token metrics.
- Added support for CJK languages using a trigram tokenizer.
- Established a fallback to LIKE search when FTS5 is unavailable.
- Updated search module index to export new functionalities.
…nce and CJK support

- Replaced SqlJsDatabase with BetterDatabase in HybridSearchEngine.
- Updated methods to use better-sqlite3's exec and prepare for SQL execution.
- Removed sql.js type declarations and backend implementation.
- Enhanced FTS5 initialization and query handling for better CJK language support.
- Improved error handling and logging during database operations.
…lization tests

- Added tests for cache eviction, updating existing entries, and LRU behavior in LocalEmbeddingsService.
- Improved initialization tests to handle double and concurrent initialization scenarios.
- Updated model ID defaults for better multilingual support.
- Removed migration utility and related types to streamline codebase.
- Introduced embedding generation in ProjectMemoryService initialization.
- Enhanced HybridSearchEngine tests for non-trigram tokenizers and semantic search capabilities.
…sqlite3 for improved performance

feat(cli): Enhance setup CLI to support MCP server configuration and additional hook events

feat(memory): Implement hybrid search functionality combining FTS and vector results with score fusion
- Add shutdown() method to all hook classes (Context, SessionInit, Observation, Summarize)
- Add ownsService flag to track when hook should close its service
- Update handlers.test.ts with trackHook() helper and proper cleanup
- Update integration.test.ts with same cleanup pattern
- Update CI to run tests on all branches

This fixes EBUSY errors on Windows where SQLite database files
remained locked after tests because createXxxHook() creates
internal MemoryHookService instances that weren't being closed.
@leduclinh7141 leduclinh7141 merged commit bf6fe3f into main Feb 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant