Skip to main content

set_plugin_enabled_op

Function set_plugin_enabled_op 

Source
pub async fn set_plugin_enabled_op(
    plugin: &str,
    enabled: bool,
    scope: Option<InstallableScope>,
) -> PluginOperationResult
Expand description

Set plugin enabled/disabled status (settings-first).

Resolves the plugin ID and scope from settings – does NOT pre-gate on installed_plugins.json. Settings declares intent; if the plugin isn’t cached yet, the next load will cache it.

§Arguments

  • plugin - Plugin name or plugin@marketplace identifier
  • enabled - true to enable, false to disable
  • scope - Optional scope. If not provided, auto-detects the most specific scope where the plugin is mentioned in settings.

§Returns

Result indicating success/failure