pub async fn install_plugin_op(
plugin: &str,
scope: InstallableScope,
) -> PluginOperationResultExpand description
Install a plugin (settings-first).
Order of operations:
- Search materialized marketplaces for the plugin
- Write settings (THE ACTION – declares intent)
- Cache plugin + record version hint (materialization)
Marketplace reconciliation is NOT this function’s responsibility – startup reconcile handles declared-but-not-materialized marketplaces. If the marketplace isn’t found, “not found” is the correct error.
§Arguments
plugin- Plugin identifier (name or plugin@marketplace)scope- Installation scope: user, project, or local (defaults to ‘user’)
§Returns
Result indicating success/failure