feat: show active embedding provider in memory stats#1623
Open
marioja wants to merge 2 commits intoruvnet:mainfrom
Open
feat: show active embedding provider in memory stats#1623marioja wants to merge 2 commits intoruvnet:mainfrom
marioja wants to merge 2 commits intoruvnet:mainfrom
Conversation
`ruflo memory stats` now displays which embedding provider is active, its vector dimensions, and whether the HNSW fast-search index is available. This makes it easy to diagnose which fallback the system selected without re-running `memory init --verbose`. The embedding provider is resolved via a priority fallback chain in `memory-initializer.ts:loadEmbeddingModel()` (line 1498). Possible values for the Provider field: 1. "cached" — model already loaded in this process 2. "Xenova/all-MiniLM-L6-v2" — @xenova/transformers ONNX (384-dim) 3. "agentic-flow/reasoningbank" — agentic-flow ReasoningBank (768-dim) 4. "ruvector/onnx" — ruvector bundled MiniLM (384-dim) 5. "agentic-flow" — agentic-flow core embeddings (768-dim) 6. "hash-fallback" — no AI, deterministic hash (128-dim) 7. "none" — memory-initializer unavailable The new Embedding section appears in both table and --format json output. Other changes: - .gitignore: use **/node_modules/ to catch nested workspace dirs - v3/package.json: bump packageManager to pnpm@10.33.0 - Two new tests for embedding info in stats output Co-Authored-By: claude-flow <ruv@ruv.net>
Adds an optional Line 5 to the Claude Code statusline showing the active embedding provider, vector dimensions, and HNSW indexing status. The line is hidden until .swarm/embedding-provider.json is present, so existing users see no change until memory is exercised. Changes: - memory-initializer.ts: add _writeEmbeddingProviderFile() helper called at every non-cache return site in loadEmbeddingModel(). Writes provider, dimensions, and preserved hnswAvailable on first model resolution, covering all callers (session-start hooks, memory init/store/search/stats). - memory.ts (statsCommand): remove the misplaced file-write block; stats continues to display embedding info from the loadEmbeddingModel() return value. Removes debug console.log. - statusline.cjs + statusline-generator.ts: add getEmbeddingProviderStats() reading .swarm/embedding-provider.json, and a conditional Line 5 rendered as: 🧬 Embeddings Provider ●<name> │ Dims <n>-dim │ HNSW ⚡active|inactive Also exposes embedding field in --json output. Co-Authored-By: claude-flow <ruv@ruv.net>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
ruflo memory statsnow shows which embedding provider is active, its vector dimensions, and whether the HNSW index is available--format jsonoutputJustification
There is currently no way to know which embedding provider ruflo selected for a project without re-running
ruflo memory init --verbose --force(which reinitializes the database). The embedding provider directly affects:When
memory statsshowsProvider: hash-fallback, that immediately tells the user their semantic search is degraded and they need to install an ONNX provider. Without this info, memory search silently returns poor results with no indication why.Possible provider values
Xenova/all-MiniLM-L6-v2@xenova/transformersagentic-flow/reasoningbankagentic-flowruvector/onnxruvectoragentic-flowagentic-flowhash-fallbacknoneExample output
Changes
v3/@claude-flow/cli/src/commands/memory.tsloadEmbeddingModel()andgetHNSWIndex()in stats command, display Embedding sectionv3/@claude-flow/cli/__tests__/commands.test.ts.gitignore**/node_modules/to catch nested workspace dirsv3/package.jsonpackageManagerto pnpm@10.33.0Test plan
npx vitest run -t "memory stats"— both new tests passnode v3/@claude-flow/cli/bin/cli.js memory stats— Embedding section renders correctly--format jsonincludesembedding.provider,embedding.dimensions,embedding.hnswAvailableprovider: "none"when memory-initializer is unavailable🤖 Generated with claude-flow