using System.Linq.Expressions; using AIStudio.Agents.AssistantAudit; namespace AIStudio.Settings.DataModel; /// /// Settings for auditing assistant plugins before activation. /// public sealed class DataAssistantPluginAudit(Expression>? configSelection = null) { /// /// The default constructor for the JSON deserializer. /// public DataAssistantPluginAudit() : this(null) { } /// /// Should assistant plugins be audited before they can be activated? /// public bool RequireAuditBeforeActivation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.RequireAuditBeforeActivation, true); /// /// Which provider should be used for the assistant plugin audit? /// When empty, the app-wide default provider is used. /// public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); /// /// The minimum audit level assistant plugins should meet. /// public AssistantAuditLevel MinimumLevel { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumLevel, AssistantAuditLevel.CAUTION); /// /// Should activation be blocked when the audit result is below the minimum level? /// public bool BlockActivationBelowMinimum { get; set; } = ManagedConfiguration.Register(configSelection, n => n.BlockActivationBelowMinimum, true); /// /// If true, the security audit will be hidden from the user and done in the background /// public bool AutomaticallyAuditAssistants { get; set; } = ManagedConfiguration.Register(configSelection, n => n.AutomaticallyAuditAssistants, false); }