Spaces:
Sleeping
Sleeping
Commit History
-
fix: replace BaseHTTPMiddleware with pure ASGI middleware for SSE compatibility
M.Hisadome +1: Claude Sonnet 4.6Unverified signatureBaseHTTPMiddleware buffers the response body, which causes an AssertionError when Starlette's middleware stack encounters the SSE streaming response. Switch to a raw ASGI callable that passes scope/receive/send directly so streaming is never interrupted. Also allow /messages/ through without re-checking the API key: the endpoint is already secured by the random session_id, which is only obtainable after a successful /sse authentication. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6fb4929 -
feat: add NOTEBOOKLM_MCP_API_KEY Bearer token authentication for HF Spaces
M.Hisadome +1: Claude Sonnet 4.6Unverified signatureProtect the public SSE endpoint from unauthorized access by requiring a Bearer token when NOTEBOOKLM_MCP_API_KEY is set as an environment variable. Uses FastMCP's create_sse_app() middleware parameter so the check runs at the HTTP layer before any MCP processing. - _BearerAuthMiddleware: constant-time comparison via secrets.compare_digest - Supports Authorization: Bearer header and ?api_key= query param - / and /health remain open for HF infrastructure probes - README updated with token generation instructions and client config example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>290b6bd -
fix: refresh_auth checks NOTEBOOKLM_COOKIES env var first
M.Hisadome +1: Claude Sonnet 4.6Unverified signatureOn HF Spaces there is no nlm login / disk cache, so refresh_auth always returned "No cached tokens". Now it checks the env var first, making auth work correctly when NOTEBOOKLM_COOKIES is set as a Secret. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d363310 -
fix: add root / route and preserve tool __signature__ for schema
M.Hisadome +1: Claude Sonnet 4.6Unverified signature- server.py: add GET / endpoint to suppress HF infra 404 probes - _utils.py: set wrapper.__signature__ = inspect.signature(func) so FastMCP generates correct tool parameter schemas instead of empty ones; without this mcp.tool()(wrapper) registers tools with no parameters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>95d63b7
-
Upload 121 files
Verified signature7c87115