feat(core): initial commit unified architecture (scud_ai v2.5 with modular web_api)

This commit is contained in:
2026-08-14 15:01:50 +03:00
commit cc12397e29
59 changed files with 11031 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""
FILE: modules/web_api/llm/db/connection.py
"""
import os
import sqlite3
# Динамический путь к общей БД в корне проекта
BASE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../"))
DB_PATH = os.path.join(BASE_ROOT, "data", "scud_orion_ai.db")
def get_db_connection() -> sqlite3.Connection:
conn = sqlite3.connect(DB_PATH, timeout=30.0)
conn.row_factory = sqlite3.Row
conn.execute("PRAGMA foreign_keys = ON;")
conn.execute("PRAGMA journal_mode = WAL;")
conn.execute("PRAGMA synchronous = NORMAL;")
return conn