import os DEFAULT_MODEL = "x-ai/grok-code-fast-1" DEFAULT_API_URL = "https://static.molodetz.nl/rp.cgi/api/v1/chat/completions" MODEL_LIST_URL = "https://static.molodetz.nl/rp.cgi/api/v1/models" DB_PATH = os.path.expanduser("~/.assistant_db.sqlite") LOG_FILE = os.path.expanduser("~/.assistant_error.log") CONTEXT_FILE = ".rcontext.txt" GLOBAL_CONTEXT_FILE = os.path.expanduser("~/.rcontext.txt") HISTORY_FILE = os.path.expanduser("~/.assistant_history") DEFAULT_TEMPERATURE = 0.1 DEFAULT_MAX_TOKENS = 4096 MAX_AUTONOMOUS_ITERATIONS = 50 CONTEXT_COMPRESSION_THRESHOLD = 15 RECENT_MESSAGES_TO_KEEP = 20 API_TOTAL_TOKEN_LIMIT = 256000 MAX_OUTPUT_TOKENS = 30000 SAFETY_BUFFER_TOKENS = 30000 MAX_TOKENS_LIMIT = API_TOTAL_TOKEN_LIMIT - MAX_OUTPUT_TOKENS - SAFETY_BUFFER_TOKENS CHARS_PER_TOKEN = 2.0 EMERGENCY_MESSAGES_TO_KEEP = 3 CONTENT_TRIM_LENGTH = 30000 MAX_TOOL_RESULT_LENGTH = 30000 LANGUAGE_KEYWORDS = { 'python': ['def', 'class', 'import', 'from', 'if', 'else', 'elif', 'for', 'while', 'return', 'try', 'except', 'finally', 'with', 'as', 'lambda', 'yield', 'None', 'True', 'False', 'and', 'or', 'not', 'in', 'is'], 'javascript': ['function', 'var', 'let', 'const', 'if', 'else', 'for', 'while', 'return', 'try', 'catch', 'finally', 'class', 'extends', 'new', 'this', 'null', 'undefined', 'true', 'false'], 'java': ['public', 'private', 'protected', 'class', 'interface', 'extends', 'implements', 'static', 'final', 'void', 'int', 'String', 'boolean', 'if', 'else', 'for', 'while', 'return', 'try', 'catch', 'finally'], } CACHE_ENABLED = True API_CACHE_TTL = 3600 TOOL_CACHE_TTL = 300 WORKFLOW_MAX_RETRIES = 3 WORKFLOW_DEFAULT_TIMEOUT = 300 WORKFLOW_EXECUTOR_MAX_WORKERS = 5 AGENT_DEFAULT_TEMPERATURE = 0.7 AGENT_MAX_WORKERS = 3 AGENT_SESSION_TIMEOUT = 7200 KNOWLEDGE_IMPORTANCE_THRESHOLD = 0.5 KNOWLEDGE_SEARCH_LIMIT = 5 MEMORY_AUTO_SUMMARIZE = True CONVERSATION_SUMMARY_THRESHOLD = 20 ADVANCED_CONTEXT_ENABLED = True CONTEXT_RELEVANCE_THRESHOLD = 0.3 ADAPTIVE_CONTEXT_MIN = 10 ADAPTIVE_CONTEXT_MAX = 50 # Background monitoring and multiplexer configuration BACKGROUND_MONITOR_ENABLED = True BACKGROUND_MONITOR_INTERVAL = 5.0 # seconds AUTONOMOUS_INTERACTION_INTERVAL = 10.0 # seconds MULTIPLEXER_BUFFER_SIZE = 1000 # lines MULTIPLEXER_OUTPUT_TIMEOUT = 30 # seconds MAX_CONCURRENT_SESSIONS = 10 # Process-specific timeouts (seconds) PROCESS_TIMEOUTS = { 'default': 300, # 5 minutes 'apt': 600, # 10 minutes 'ssh': 60, # 1 minute 'vim': 3600, # 1 hour 'git': 300, # 5 minutes 'npm': 600, # 10 minutes 'pip': 300, # 5 minutes } # Activity thresholds for LLM notification HIGH_OUTPUT_THRESHOLD = 50 # lines INACTIVE_THRESHOLD = 300 # seconds SESSION_NOTIFY_INTERVAL = 60 # seconds # Autonomous behavior flags ENABLE_AUTONOMOUS_SESSIONS = True ENABLE_BACKGROUND_UPDATES = True ENABLE_TIMEOUT_DETECTION = True