diff --git a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs b/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs index bc306978..e116a134 100644 --- a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs +++ b/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs @@ -117,10 +117,14 @@ public sealed class AssistantAuditAgent(ILogger logger, ILo /// /// Resolves and stores the provider configuration used for assistant plugin audits. /// + /// The provider to use when no provider is configured for the audit agent. /// The configured provider, or when no audit provider is configured. - public AIStudio.Settings.Provider ResolveProvider() + public AIStudio.Settings.Provider ResolveProvider(AIStudio.Settings.Provider? fallbackProvider = null) { var provider = this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); + if (provider == AIStudio.Settings.Provider.NONE && fallbackProvider is not null) + provider = fallbackProvider; + this.ProviderSettings = provider; return provider; } @@ -130,12 +134,13 @@ public sealed class AssistantAuditAgent(ILogger logger, ILo /// /// The assistant plugin to audit. /// A cancellation token for prompt generation and the audit request. + /// The provider to use when no provider is configured for the audit agent. /// /// The parsed audit result, or an UNKNOWN result when no provider is configured or the model response cannot be used. /// - public async Task AuditAsync(PluginAssistants plugin, CancellationToken token = default) + public async Task AuditAsync(PluginAssistants plugin, CancellationToken token = default, AIStudio.Settings.Provider? fallbackProvider = null) { - var provider = this.ResolveProvider(); + var provider = this.ResolveProvider(fallbackProvider); if (provider == AIStudio.Settings.Provider.NONE) { await MessageBus.INSTANCE.SendError(new (Icons.Material.Filled.SettingsSuggest, string.Format(TB("No provider is configured for the Security Audit Agent.")))); diff --git a/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs b/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs index 24cb7296..ce97c548 100644 --- a/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs +++ b/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs @@ -570,7 +570,7 @@ public partial class AssistantBuilder : AssistantBaseCore this.isAuditingPlugin = true; try { - this.pluginAudit = await this.AssistantPluginAuditService.RunAuditAsync(this.installedAssistantPlugin); + this.pluginAudit = await this.AssistantPluginAuditService.RunAuditAsync(this.installedAssistantPlugin, fallbackProvider: this.ProviderSettings); if (this.pluginAudit.Level is AssistantAuditLevel.UNKNOWN) { this.FailInstallStep(BuilderInstallStep.SECURITY_CHECK, T("The security check could not determine a result.")); diff --git a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs index 3bd282dd..0ede62d6 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs @@ -7,9 +7,12 @@ namespace AIStudio.Tools.PluginSystem.Assistants; /// public sealed class AssistantPluginAuditService(AssistantAuditAgent auditAgent) { - public async Task RunAuditAsync(PluginAssistants plugin, CancellationToken token = default) + /// + /// Runs an assistant plugin audit, optionally falling back to the supplied provider when no audit provider is configured. + /// + public async Task RunAuditAsync(PluginAssistants plugin, CancellationToken token = default, Settings.Provider? fallbackProvider = null) { - var result = await auditAgent.AuditAsync(plugin, token); + var result = await auditAgent.AuditAsync(plugin, token, fallbackProvider); var provider = auditAgent.ProviderSettings; var promptPreview = await plugin.BuildAuditPromptPreviewAsync(token); diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.7.3.md b/app/MindWork AI Studio/wwwroot/changelog/v26.7.3.md index d1be164e..64581b68 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.7.3.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.7.3.md @@ -9,6 +9,7 @@ - Improved update guidance for Flatpak installations and added an enterprise option that lets organizations manage updates entirely through their IT department. - Improved secure API-key storage diagnostics on Linux. AI Studio now provides specific guidance when the default password collection is missing or locked, a password-manager prompt is dismissed, or no compatible Secret Service is available. - Improved the file dialogs to prevent opening multiple times when you click "Open" or "Save" multiple times in a row. +- Improved the Assistant Builder security check so it can use the selected provider when no dedicated security audit agent provider is configured. - Fixed an issue that could leave AI Studio unresponsive after waking the computer from sleep. Yes, we know this was an annoying bug, and we apologize for the inconvenience. - Fixed connections to internal HTTPS services and enterprise configuration servers that use organization-provided root certificates on Linux. - Fixed enterprise configuration plugins from Windows-created ZIP files may not load correctly on Linux when the ZIP contained plugin files inside a folder.