Bug fixes
- An incremental re-index no longer empties the index.
semtree indexnever actually loaded the existing vector store before adding to it, so every incremental run persisted only the chunks it had just touched and silently dropped the rest. Anyone who ransemtree indextwice has an index holding a fraction of their code; this release rebuilds it correctly, andsemtree statsnow warns when the vector count and the chunk count disagree. --langaccepted only 5 of the 20 supported languages. Filtering byjava,kotlin,zigand the rest failed with "unknown language". Language and kind names are parsed insemtree-corenow, and a test fails if a language the parser handles is not filterable.- usearch could not grow past its reserved capacity. Adding to an index read back from disk failed with "Reserve capacity ahead of insertions!". The store now grows on demand.
.fastembed_cacheis ignored when walking a tree, so semtree no longer indexes the ONNX model it downloaded into the directory it was pointed at.
Breaking changes
VectorStore::loadtakes&selfinstead of&mut self, so a store shared asArc<dyn VectorStore>can be reopened in place. Custom stores keep their mutable state behind their own lock.VectorStoregains a requiredclear(), which is what makes--fulla real rebuild rather than a rebuild layered on top of the old vectors.ChunkKindis nowCopy + Ordand implementsDisplay;Languageis nowOrd.semtree analyzeandsemtree statsno longer load an embedding model, so they answer instantly.
New features
MCP server (semtree-mcp)
- New crate and binary. Point it at a project and any MCP client - Claude Code, Cursor, Windsurf, Zed - can search that codebase by meaning, entirely on-device.
- Four tools:
search_code(locations, cheap),get_context(source, prompt-shaped),index_statusandreindex.search_codetakeslang,kind,pathandmodefilters. - Indexes the project itself: it builds the index on first run and catches up on changed files at every startup, so there is no separate indexing step. Indexing runs in the background, so a large tree does not time out the client's
initialize. - Replaces the
examples/mcp-serverexample crate, which needed a pre-built index and exposed one tool.
Index lifecycle (semtree-rag)
- New
IndexSession: open an index, check it still matches the pipeline that built it, refresh it incrementally, persist it, search it. The CLI and the MCP server are both thin shells over it, so the lifecycle exists once instead of being reimplemented per binary. - New
SearchFilterswithmatches,fetch_size, and name-based constructors that reject an unknown language rather than silently matching nothing. - New
IndexStats::openandChunkRegistry::openread an index's metadata without booting an embedder. ContextWindow::from_hitsbuilds a context window from any ranking, sosemtree contextnow benefits from hybrid search instead of plain vector similarity.
Umbrella crate (semtree)
backends_from_configbuilds the embedder and store aSemtreeConfigasks for, sizing the store to the embedder. A backend the config names but the build does not include is an error rather than a silent fallback.
CLI (semtree-cli)
semtree context --mode hybrid|semantic|lexical, matchingsemtree search.