Repository navigation
Add R2 cloud sync for shared paper storage - #7
Merged
Merged
Conversation
Architecture: local embeddings (MPS/CUDA) + cloud vector storage - New worker/: thin Cloudflare Worker (~85 lines) proxying Vectorize - POST /upsert, /query, /delete with Bearer token auth - New vectorize_client.py: replaces chromadb_client.py - Local HuggingFace embeddings (bge-small-en-v1.5) - HTTP calls to Worker for vector storage/retrieval - query_all_papers() for cross-paper RAG search - Updated embed.py: embed locally, store in Vectorize - Updated search.py: RAG search via Vectorize, grep stays local - Removed chromadb, llama-index-vector-stores-chroma deps
- Restore ChromaDB as the vector store (revert Vectorize experiment) - Add sync.py: rclone-based R2 sync (pull before search, push after process) - Keep PDF hash dedup from earlier work - Architecture: fully local MCP server + R2 as shared file store via rclone - No Worker, no Vectorize, no remote MCP - Both users mount same R2 bucket via rclone - ChromaDB indexes sync alongside papers
LOCAL_DIR was a literal "~/Documents/papers" string passed to rclone via subprocess (no shell). rclone doesn't expand ~ on its own and treats it as a literal dirname relative to cwd. When the MCP server ran from /Users/oded, pull() materialized everything at /Users/oded/~/Documents/papers/ (1.5 GB stray tree). push() had the same flaw in reverse. Bump version to 0.4.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/Documents/papersTest plan
rcloneinstalls and configures from 1Passwordsync.pull()downloads papers from R2sync.push()uploads local papers to R2