35 lines
858 B
Python
35 lines
858 B
Python
# config.py
|
|
"""
|
|
Configuration de base pour agent_v0.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
AGENT_VERSION = "0.1.0"
|
|
|
|
# Dossier racine du projet (là où se trouve ce fichier)
|
|
BASE_DIR = Path(__file__).resolve().parent
|
|
|
|
# Endpoint de ton serveur (placeholder pour l'instant)
|
|
SERVER_URL = "https://example.com/api/traces/upload"
|
|
|
|
# Durée max d'une session en secondes (ex: 30 minutes)
|
|
MAX_SESSION_DURATION_S = 30 * 60
|
|
|
|
# Dossier racine local où stocker les sessions (chemin ABSOLU)
|
|
SESSIONS_ROOT = str(BASE_DIR / "sessions")
|
|
|
|
# Dossier et fichier de logs
|
|
LOGS_DIR = BASE_DIR / "logs"
|
|
LOG_FILE = LOGS_DIR / "agent_v0.log"
|
|
|
|
# Faut-il quitter l'application après un Stop session ?
|
|
EXIT_AFTER_SESSION = True
|
|
|
|
# Création des dossiers si besoin
|
|
os.makedirs(SESSIONS_ROOT, exist_ok=True)
|
|
os.makedirs(LOGS_DIR, exist_ok=True)
|