@@ -61,27 +61,19 @@ static Env() {
6161 AgentMaxRecoveryAttempts = config . AgentMaxRecoveryAttempts ;
6262 AgentQueueBacklogWarningThreshold = config . AgentQueueBacklogWarningThreshold ;
6363 AgentProcessMemoryLimitMb = config . AgentProcessMemoryLimitMb ;
64+ EnableLlmWindowsSandbox = config . EnableLlmWindowsSandbox || config . EnableLlmSandboxie ;
6465 EnableLlmSandboxie = config . EnableLlmSandboxie ;
65- SandboxieStartExe = string . IsNullOrWhiteSpace ( config . SandboxieStartExe )
66- ? @"C:\Program Files\Sandboxie-Plus\Start.exe"
67- : config . SandboxieStartExe . Trim ( ) ;
68- SandboxieIniPath = string . IsNullOrWhiteSpace ( config . SandboxieIniPath )
69- ? @"C:\Windows\Sandboxie.ini"
70- : config . SandboxieIniPath . Trim ( ) ;
71- SandboxieAutoRegisterImportBox = config . SandboxieAutoRegisterImportBox ;
72- SandboxieDenyHostFileSystem = config . SandboxieDenyHostFileSystem ;
73- SandboxieBoxImportDirectory = string . IsNullOrWhiteSpace ( config . SandboxieBoxImportDirectory )
74- ? Path . Combine ( WorkDir , "Sandboxie" , "Boxes" )
75- : config . SandboxieBoxImportDirectory ;
76- SandboxieBoxPrefix = string . IsNullOrWhiteSpace ( config . SandboxieBoxPrefix ) ? "TGSB_G_" : config . SandboxieBoxPrefix ;
7766 SandboxieGroupFilesRoot = string . IsNullOrWhiteSpace ( config . SandboxieGroupFilesRoot )
7867 ? string . Empty
7968 : config . SandboxieGroupFilesRoot . Trim ( ) ;
8069 SandboxieGlobalReadPaths = config . SandboxieGlobalReadPaths ?? new List < string > ( ) ;
81- SandboxieGlobalClosedPaths = config . SandboxieGlobalClosedPaths ?? new List < string > ( ) ;
82- SandboxieCommandTimeoutSeconds = Math . Clamp ( config . SandboxieCommandTimeoutSeconds , 1 , 3600 ) ;
8370 SandboxieToolHostStartupTimeoutSeconds = Math . Clamp ( config . SandboxieToolHostStartupTimeoutSeconds , 1 , 3600 ) ;
8471 SandboxieToolTimeoutSeconds = Math . Clamp ( config . SandboxieToolTimeoutSeconds , 5 , 3600 ) ;
72+ WindowsSandboxProfilePrefix = string . IsNullOrWhiteSpace ( config . WindowsSandboxProfilePrefix )
73+ ? "TelegramSearchBot.Chat."
74+ : config . WindowsSandboxProfilePrefix . Trim ( ) ;
75+ WindowsSandboxActiveProcessLimit = Math . Clamp ( config . WindowsSandboxActiveProcessLimit , 1 , 256 ) ;
76+ WindowsSandboxJobMemoryLimitMb = Math . Clamp ( config . WindowsSandboxJobMemoryLimitMb , 64 , 32768 ) ;
8577 EnableCodingAgentTool = config . EnableCodingAgentTool ;
8678 CodingAgentAllowedGroupIds = config . CodingAgentAllowedGroupIds ?? new List < long > ( ) ;
8779 CodingAgentDeniedPathPrefixes = ResolveCodingAgentDeniedPathPrefixes ( config . CodingAgentDeniedPathPrefixes ) ;
@@ -171,19 +163,15 @@ private static string NormalizeBaseUrl(string? baseUrl, string fallback) {
171163 public static int AgentMaxRecoveryAttempts { get ; set ; } = 2 ;
172164 public static int AgentQueueBacklogWarningThreshold { get ; set ; } = 20 ;
173165 public static int AgentProcessMemoryLimitMb { get ; set ; } = 256 ;
166+ public static bool EnableLlmWindowsSandbox { get ; set ; } = false ;
174167 public static bool EnableLlmSandboxie { get ; set ; } = false ;
175- public static string SandboxieStartExe { get ; set ; } = @"C:\Program Files\Sandboxie-Plus\Start.exe" ;
176- public static string SandboxieIniPath { get ; set ; } = @"C:\Windows\Sandboxie.ini" ;
177- public static bool SandboxieAutoRegisterImportBox { get ; set ; } = true ;
178- public static bool SandboxieDenyHostFileSystem { get ; set ; } = false ;
179- public static string SandboxieBoxImportDirectory { get ; set ; } = null ! ;
180- public static string SandboxieBoxPrefix { get ; set ; } = "TGSB_G_" ;
181168 public static string SandboxieGroupFilesRoot { get ; set ; } = null ! ;
182169 public static List < string > SandboxieGlobalReadPaths { get ; set ; } = new List < string > ( ) ;
183- public static List < string > SandboxieGlobalClosedPaths { get ; set ; } = new List < string > ( ) ;
184- public static int SandboxieCommandTimeoutSeconds { get ; set ; } = 10 ;
185170 public static int SandboxieToolHostStartupTimeoutSeconds { get ; set ; } = 15 ;
186171 public static int SandboxieToolTimeoutSeconds { get ; set ; } = 120 ;
172+ public static string WindowsSandboxProfilePrefix { get ; set ; } = "TelegramSearchBot.Chat." ;
173+ public static int WindowsSandboxActiveProcessLimit { get ; set ; } = 32 ;
174+ public static int WindowsSandboxJobMemoryLimitMb { get ; set ; } = 1024 ;
187175 public static bool EnableCodingAgentTool { get ; set ; } = false ;
188176 public static List < long > CodingAgentAllowedGroupIds { get ; set ; } = new List < long > ( ) ;
189177 public static List < string > CodingAgentDeniedPathPrefixes { get ; set ; } = new List < string > ( ) ;
@@ -340,19 +328,15 @@ public class Config {
340328 public int AgentMaxRecoveryAttempts { get ; set ; } = 2 ;
341329 public int AgentQueueBacklogWarningThreshold { get ; set ; } = 20 ;
342330 public int AgentProcessMemoryLimitMb { get ; set ; } = 256 ;
331+ public bool EnableLlmWindowsSandbox { get ; set ; } = false ;
343332 public bool EnableLlmSandboxie { get ; set ; } = false ;
344- public string SandboxieStartExe { get ; set ; } = @"C:\Program Files\Sandboxie-Plus\Start.exe" ;
345- public string SandboxieIniPath { get ; set ; } = @"C:\Windows\Sandboxie.ini" ;
346- public bool SandboxieAutoRegisterImportBox { get ; set ; } = true ;
347- public bool SandboxieDenyHostFileSystem { get ; set ; } = false ;
348- public string SandboxieBoxImportDirectory { get ; set ; } = string . Empty ;
349- public string SandboxieBoxPrefix { get ; set ; } = "TGSB_G_" ;
350333 public string SandboxieGroupFilesRoot { get ; set ; } = string . Empty ;
351334 public List < string > SandboxieGlobalReadPaths { get ; set ; } = new List < string > ( ) ;
352- public List < string > SandboxieGlobalClosedPaths { get ; set ; } = new List < string > ( ) ;
353- public int SandboxieCommandTimeoutSeconds { get ; set ; } = 10 ;
354335 public int SandboxieToolHostStartupTimeoutSeconds { get ; set ; } = 15 ;
355336 public int SandboxieToolTimeoutSeconds { get ; set ; } = 120 ;
337+ public string WindowsSandboxProfilePrefix { get ; set ; } = "TelegramSearchBot.Chat." ;
338+ public int WindowsSandboxActiveProcessLimit { get ; set ; } = 32 ;
339+ public int WindowsSandboxJobMemoryLimitMb { get ; set ; } = 1024 ;
356340 public bool EnableCodingAgentTool { get ; set ; } = false ;
357341 public List < long > CodingAgentAllowedGroupIds { get ; set ; } = new List < long > ( ) ;
358342 public List < string > CodingAgentDeniedPathPrefixes { get ; set ; } = new List < string > ( ) ;
0 commit comments