File size: 921 Bytes
148a4a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""Configuration management using Pydantic Settings"""

from typing import Optional
from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    """Application settings"""
    
    # Server Configuration
    HOST: str = "0.0.0.0"
    PORT: int = 7860
    
    # Floor Manager Settings
    DEFAULT_FLOOR_DURATION: int = 300  # seconds
    MAX_AGENTS_PER_SESSION: int = 10
    SESSION_TIMEOUT: int = 3600  # seconds
    AUTO_GRANT_FLOOR: bool = True
    
    # Protocol Settings
    OFP_VERSION: str = "1.0.0"
    MESSAGE_TIMEOUT: int = 30  # seconds
    
    # UI Settings
    UPDATE_INTERVAL: int = 2  # seconds
    MAX_MESSAGE_DISPLAY: int = 100
    
    # Logging
    LOG_LEVEL: str = "INFO"
    
    model_config = SettingsConfigDict(
        env_file=".env",
        env_file_encoding="utf-8",
        case_sensitive=True
    )


# Global settings instance
settings = Settings()