Spaces:
Paused
Paused
fix: include .hmac in backup so secret survives restarts
Browse files20 unmodified lines21222324252655 unmodified lines8283848586878820 unmodified linesREPO_ID = os.environ.get("AGENTMEMORY_DATASET_REPO", "Yash030/agentmemory-data")DATA_DIR = os.path.expanduser("~/.agentmemory")SKIP_FILES = {".env"} # never upload secretsdef get_api():return HfApi(token=HF_TOKEN)55 unmodified lines# skip hidden dirs like .cachedirs[:] = [d for d in dirs if not d.startswith('.')]for f in files:if f in SKIP_FILES or f.startswith('.'):continuefull = os.path.join(root, f)rel = os.path.relpath(full, DATA_DIR)20 unmodified lines2122232425262755 unmodified lines83848586878889909120 unmodified linesREPO_ID = os.environ.get("AGENTMEMORY_DATASET_REPO", "Yash030/agentmemory-data")DATA_DIR = os.path.expanduser("~/.agentmemory")SKIP_FILES = {".env"} # never upload secretsALLOW_HIDDEN = {".hmac"} # hidden files that ARE safe to backupdef get_api():return HfApi(token=HF_TOKEN)55 unmodified lines# skip hidden dirs like .cachedirs[:] = [d for d in dirs if not d.startswith('.')]for f in files:if f in SKIP_FILES:continueif f.startswith('.') and f not in ALLOW_HIDDEN:continuefull = os.path.join(root, f)rel = os.path.relpath(full, DATA_DIR)
sync.py+4-1