feat(plugins): paramètres projet plugins + attribution skills/tools aux agents — #282 (manifeste accepte contributes.skills IdeA-native multi-harness; store .ideai/project-plugins.json v1: enable plugin par projet + assignments skills/tools par agent; refs + use cases settings/assign/unassign; resolver skills pour idea_skill_read et injection catalogue lancement agent; permissions MCP dynamiques projetées par harness Claude Code/Codex/OpenCode; tombstones uninstall, hot reload recalcule catalogue et marque assignments cassés; frontend: Settings projet Plugins, détail capabilities, attribution agent, catalogue permissions; bump pointeur IdeaSDK 6eb8db3; QA verte: cargo test -p application, project_plugin_settings 3/3, dto_plugins 2/2, structured_launch_d3 26/26, catalogue mcp 7/7, frontend 5 tests ProjectPluginSettings/plugin, npm build frontend)
This commit is contained in:
@ -446,6 +446,19 @@ pub trait PluginPackageStore: Send + Sync {
|
||||
package: &PluginPackageRef,
|
||||
) -> Result<PluginManifestBytes, PluginStoreError>;
|
||||
|
||||
/// Reads a package-relative file from an installed plugin, confined to its
|
||||
/// canonical package root.
|
||||
async fn read_installed_file(
|
||||
&self,
|
||||
plugin_id: &crate::PluginId,
|
||||
path: &crate::RelativePath,
|
||||
) -> Result<Vec<u8>, PluginStoreError> {
|
||||
let _ = (plugin_id, path);
|
||||
Err(PluginStoreError::Invalid(
|
||||
"installed package file reads are not supported by this adapter".to_owned(),
|
||||
))
|
||||
}
|
||||
|
||||
/// Stages an archive for validation.
|
||||
async fn install_from_archive(
|
||||
&self,
|
||||
@ -496,6 +509,23 @@ pub trait PluginRegistryStore: Send + Sync {
|
||||
async fn save_registry(&self, registry: &PluginRegistry) -> Result<(), PluginRegistryError>;
|
||||
}
|
||||
|
||||
/// Store for one project's plugin activation and agent assignments.
|
||||
#[async_trait]
|
||||
pub trait ProjectPluginSettingsStore: Send + Sync {
|
||||
/// Loads settings, returning an empty version-1 document when missing.
|
||||
async fn load(
|
||||
&self,
|
||||
project_root: &crate::ProjectPath,
|
||||
) -> Result<crate::ProjectPluginSettings, StoreError>;
|
||||
|
||||
/// Atomically persists the complete document.
|
||||
async fn save(
|
||||
&self,
|
||||
project_root: &crate::ProjectPath,
|
||||
settings: &crate::ProjectPluginSettings,
|
||||
) -> Result<(), StoreError>;
|
||||
}
|
||||
|
||||
/// Manifest parser and validator.
|
||||
pub trait PluginManifestValidator: Send + Sync {
|
||||
/// Validates raw manifest bytes.
|
||||
|
||||
Reference in New Issue
Block a user