Skip to content

semtree v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Aug 21:51
· 1 commit to main since this release

Bug fixes

  • An incremental re-index no longer empties the index. semtree index never 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 ran semtree index twice has an index holding a fraction of their code; this release rebuilds it correctly, and semtree stats now warns when the vector count and the chunk count disagree.
  • --lang accepted only 5 of the 20 supported languages. Filtering by java, kotlin, zig and the rest failed with "unknown language". Language and kind names are parsed in semtree-core now, 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_cache is 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::load takes &self instead of &mut self, so a store shared as Arc<dyn VectorStore> can be reopened in place. Custom stores keep their mutable state behind their own lock.
  • VectorStore gains a required clear(), which is what makes --full a real rebuild rather than a rebuild layered on top of the old vectors.
  • ChunkKind is now Copy + Ord and implements Display; Language is now Ord.
  • semtree analyze and semtree stats no 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_status and reindex. search_code takes lang, kind, path and mode filters.
  • 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-server example 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 SearchFilters with matches, fetch_size, and name-based constructors that reject an unknown language rather than silently matching nothing.
  • New IndexStats::open and ChunkRegistry::open read an index's metadata without booting an embedder.
  • ContextWindow::from_hits builds a context window from any ranking, so semtree context now benefits from hybrid search instead of plain vector similarity.

Umbrella crate (semtree)

  • backends_from_config builds the embedder and store a SemtreeConfig asks 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, matching semtree search.