File size: 505 Bytes
c6ad652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9cd0080
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
Shared module to hold singleton instances.
Ensures app.py and mcp_tools.py share the same state.
"""
from storage import TaskManager
from metrics import MetricsTracker
import os

# Configuration
LAUNCH_MODE = os.getenv("LAUNCH_MODE", "demo").lower()

# Initialize singletons
# For demo mode, we use in-memory storage to avoid filesystem issues in HF Spaces
use_memory = (LAUNCH_MODE == "demo")

task_manager = TaskManager(use_memory=use_memory)
metrics_tracker = MetricsTracker(use_memory=use_memory)