fix(#1427): disable ChromaDB telemetry for sovereignty
ChromaDB enables anonymous telemetry by default, leaking usage patterns to Chroma Inc. This violates local-first sovereignty. Two layers of protection: 1. Set ANONYMIZED_TELEMETRY=false env var at import time 2. Pass Settings(anonymized_telemetry=False) to PersistentClient Closes #1427
This commit is contained in:
@@ -46,7 +46,9 @@ class MemPalaceResult:
|
||||
def _get_client(palace_path: Path):
|
||||
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable."""
|
||||
try:
|
||||
import chromadb # type: ignore
|
||||
import os
|
||||
os.environ["ANONYMIZED_TELEMETRY"] = "false"
|
||||
import chromadb # type: ignore
|
||||
except ImportError as exc:
|
||||
raise MemPalaceUnavailable(
|
||||
"ChromaDB is not installed. "
|
||||
@@ -59,7 +61,11 @@ def _get_client(palace_path: Path):
|
||||
"Run 'mempalace mine' to initialise the palace."
|
||||
)
|
||||
|
||||
return chromadb.PersistentClient(path=str(palace_path))
|
||||
import chromadb.config
|
||||
return chromadb.PersistentClient(
|
||||
path=str(palace_path),
|
||||
settings=chromadb.config.Settings(anonymized_telemetry=False),
|
||||
)
|
||||
|
||||
|
||||
def search_memories(
|
||||
|
||||
Reference in New Issue
Block a user