feat(plugins): load activation scope from plugin manifest

Plugins can now declare activationScope ("app" | "project") in their
manifest; loader/runtime honor it to defer activation of project-scoped
plugins until a project is focused instead of activating everything at
app bootstrap. Bumps sdk/IdeaSDK to the commit that adds the field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 14:44:08 +02:00
parent 863d9b7277
commit e2da2d911e
16 changed files with 513 additions and 34 deletions

View File

@ -153,6 +153,8 @@ pub struct PluginRuntimePlugin {
pub content_hash: String,
/// Public manifest capabilities.
pub capabilities: Vec<domain::PluginCapability>,
/// Manifest-declared activation scope.
pub activation_scope: domain::PluginActivationScope,
/// Contributions.
pub contributes: PluginContributionSet,
}
@ -2207,6 +2209,7 @@ impl ListPlugins {
icon: None,
trust_level: PluginTrustLevel::Full,
capabilities: Vec::new(),
activation_scope: domain::PluginActivationScope::default(),
contributes: PluginContributionSet::default(),
};
out.push(admin_from_descriptor(
@ -2793,6 +2796,7 @@ async fn runtime_plugin_from_entry(
icon_url,
content_hash: descriptor.registry.content_hash.as_str().to_owned(),
capabilities: descriptor.manifest.capabilities,
activation_scope: descriptor.manifest.activation_scope,
contributes: descriptor.manifest.contributes,
})
}
@ -3006,6 +3010,8 @@ struct RawManifest {
trust_level: String,
#[serde(default)]
capabilities: Vec<String>,
#[serde(default)]
activation_scope: domain::PluginActivationScope,
contributes: RawContributes,
}
@ -3158,6 +3164,7 @@ impl PluginManifestValidator for JsonPluginManifestValidator {
icon,
trust_level: PluginTrustLevel::Full,
capabilities,
activation_scope: raw.activation_scope,
contributes,
})
}