From 887c74b5cbf1b31c6cd3a951ed99e37abbc0fcf6 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 16 Jun 2026 23:28:54 +0200 Subject: [PATCH] Initialize global library constants and utility functions --- backend/local_rag.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/local_rag.py b/backend/local_rag.py index e1be190..4d0c7fb 100644 --- a/backend/local_rag.py +++ b/backend/local_rag.py @@ -41,6 +41,9 @@ router = APIRouter(tags=["local-rag"]) LIB_ROOT = library_root() +GLOBAL_LIBRARY_SLUG = "_global" +GLOBAL_LIBRARY_NAME = "Knowledge" +MIGRATED_LIBRARY_ARCHIVE = "_migrated_libraries" RAW_CORPUS_PROFILE = "per-file-default-v1" PREPARE_PROFILE = "selective-enrich-v2" DEFAULT_EMBED_MODEL = DEFAULT_EMBED_MODEL_SETTING @@ -145,6 +148,10 @@ def lib_json(slug: str) -> Path: return lib_dir(slug) / "library.json" +def global_library_slug() -> str: + return GLOBAL_LIBRARY_SLUG + + def stage_dir(slug: str) -> Path: path = lib_dir(slug) / "stage" path.mkdir(parents=True, exist_ok=True)