using System.Collections.Generic; namespace io.github.hatayama.uLoopMCP { /// /// Security management utility for ExecuteDynamicCodeTool /// Related Classes: DynamicCodeSecurityLevel, AssemblyReferencePolicy, RoslynCompiler /// public static class DynamicCodeSecurityManager { /// /// Check if code execution is possible at the specified security level /// public static bool CanExecute(DynamicCodeSecurityLevel level) { switch (level) { case DynamicCodeSecurityLevel.Restricted: case DynamicCodeSecurityLevel.FullAccess: // Level 1, 2: Execution permitted return true; default: return false; } } /// /// Retrieve list of allowed assemblies based on the security level /// public static IReadOnlyList GetAllowedAssemblies(DynamicCodeSecurityLevel level) { return AssemblyReferencePolicy.GetAssemblies(level); } } }