What's New
HTTP Serve Command
New vault-recommender serve subcommand starts an HTTP server on port 7532 (configurable) that loads the index once and serves fast queries. Designed for Claude Code hook integration where sub-second latency is required.
Endpoints:
GET /health— readiness checkGET /recommend?topic=X&top_k=3— semantic searchGET /recommend?note=X&exclude_linked=true— note-based recommendationsPOST /reload— hot-reload index from disk
MCP Server Improvements
- Eager loading via FastMCP lifespan — index and link graph load at startup instead of on first tool call
- Uses
ctx.lifespan_contextfor clean state management
Other Changes
create_recommender()factory shared across CLI, HTTP server, and MCP server- Removed unused scikit-learn dependency (cosine similarity uses numpy dot product)
- 39 tests, all passing