Spaces:
Runtime error
Runtime error
Commit History
-
fix(server): cap list_recent days at 365
An unbounded days argument let one call dump the entire corpus; bound it the same way search_papers bounds limit.3ccdaee -
fix: harden corpus sync, remove request-time file races, reject blank queries
- Corpus.sync() now fetches+hard-resets instead of pull --ff-only, so a force-pushed corpus repo can't wedge the refresh loop forever, and git failures surface stderr instead of being swallowed by capture_output. - Paper.markdown is populated once in Corpus.load() (which already reads every file for the citation graph) so get_paper serves from the in-memory snapshot instead of re-reading disk mid-request, which could race the refresh thread's in-place git reset. - search_papers rejects blank/whitespace queries before they reach BM25/ embedding search, where they silently produced meaningless results. - lookup() takes the papers dict explicitly so get_paper and get_citations share one unknown-id error path instead of duplicating the message. - Add .dockerignore so COPY . . doesn't ingest dev-only directories.ede187b -
feat: mount per-corpus MCP servers with search, read, citation, and recency tools
Wires the Corpus/SearchIndex layers into two FastMCP streamable-HTTP servers (lipsync, tts) mounted under one Starlette app via create_app(), each exposing search_papers/get_paper/get_citations/list_recent tools and refreshed on a background interval. Disables FastMCP's default DNS-rebinding Host-header check: it only ever allowlists 127.0.0.1/localhost, which would reject every request once this app is mounted (not run standalone) behind a real hostname. Adds tests/__init__.py so tests/test_server.py can import shared fixtures via `from tests.conftest import ...` as an ordinary package import.c88c4a7