From d7c2dceb7b5d334d25cb73372eafbc49f8991d57 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 5 Jul 2026 12:59:03 +0200 Subject: [PATCH] Fixed configuration plugins so they can configure assistant plugin audit settings (#832) --- .../Plugins/configuration/plugin.lua | 27 +++++++++++++++++++ .../Tools/PluginSystem/PluginConfiguration.cs | 7 +++++ .../wwwroot/changelog/v26.6.3.md | 1 + 3 files changed, 35 insertions(+) diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua index 156bb05d..b8690ff4 100644 --- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua +++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua @@ -386,6 +386,33 @@ CONFIG["SETTINGS"] = {} -- "00000000-0000-0000-0000-000000000001", -- } +-- Configure assistant plugin security audits. +-- +-- Configure whether assistant plugins must be audited before users can activate them. +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.RequireAuditBeforeActivation"] = true +-- +-- Configure a dedicated provider for assistant plugin audits. +-- It must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"]. +-- Without a selected audit provider, AI Studio uses the app-wide default provider. +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.PreselectedAgentProvider"] = "00000000-0000-0000-0000-000000000000" +-- +-- Configure the minimum audit level assistant plugins must meet. +-- Allowed values are: UNKNOWN, DANGEROUS, CAUTION, SAFE +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.MinimumLevel"] = "CAUTION" +-- +-- Configure whether activation is blocked when the audit result is below the minimum level. +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.BlockActivationBelowMinimum"] = true +-- +-- Configure whether new or changed assistant plugins are audited automatically in the background. +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.AutomaticallyAuditAssistants"] = false +-- +-- Configure whether users can change assistant plugin audit settings locally. +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.RequireAuditBeforeActivation.AllowUserOverride"] = false +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.PreselectedAgentProvider.AllowUserOverride"] = false +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.MinimumLevel.AllowUserOverride"] = false +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.BlockActivationBelowMinimum.AllowUserOverride"] = false +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.AutomaticallyAuditAssistants.AllowUserOverride"] = false + -- Example chat templates for this configuration: CONFIG["CHAT_TEMPLATES"] = {} diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs index 92634f7b..2b492d6f 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs @@ -204,6 +204,13 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT // Config: data source security settings ManagedConfiguration.TryProcessConfiguration(x => x.DataSourceSecurity, x => x.TrustedProviderIds, this.Id, settingsTable, dryRun); + + // Config: assistant plugin audit settings + ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.RequireAuditBeforeActivation, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.PreselectedAgentProvider, Guid.Empty, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.MinimumLevel, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.BlockActivationBelowMinimum, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.AutomaticallyAuditAssistants, this.Id, settingsTable, dryRun); // Handle configured LLM providers: PluginConfigurationObject.TryParse(PluginConfigurationObjectType.LLM_PROVIDER, x => x.Providers, x => x.NextProviderNum, mainTable, this.Id, ref this.configObjects, dryRun); diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md b/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md index a9371b96..7a923be1 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md @@ -7,4 +7,5 @@ - Improved the activity indicators for running chats and assistants so they use a consistent blue highlight. - Improved the chat experience by automatically focusing the message composer again when it becomes available. Thanks, Dominic Neuburg (`donework`), for the contribution. - Improved the chat message formatting so line breaks in responses are preserved more closely, making structured text easier to read. Thanks, Dominic Neuburg (`donework`), for the contribution. +- Fixed configuration plugins so they can configure assistant plugin audit settings, including required audit levels, audit provider selection, and automatic background audits. - Upgraded Rust to v1.96.1 \ No newline at end of file