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:
@ -36,6 +36,8 @@ pub use crate::ticket_dto::*;
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PluginContributionSummaryDto {
|
||||
/// Agent skills count.
|
||||
pub skills: usize,
|
||||
/// Top-level menus count.
|
||||
pub top_level_menus: usize,
|
||||
/// Menu items count.
|
||||
@ -51,6 +53,7 @@ pub struct PluginContributionSummaryDto {
|
||||
impl From<application::PluginContributionSummary> for PluginContributionSummaryDto {
|
||||
fn from(value: application::PluginContributionSummary) -> Self {
|
||||
Self {
|
||||
skills: value.skills,
|
||||
top_level_menus: value.top_level_menus,
|
||||
menu_items: value.menu_items,
|
||||
slash_commands: value.slash_commands,
|
||||
@ -60,6 +63,89 @@ impl From<application::PluginContributionSummary> for PluginContributionSummaryD
|
||||
}
|
||||
}
|
||||
|
||||
/// Project-scoped plugin activation and assignment settings returned to clients.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ProjectPluginSettingsDto {
|
||||
/// Schema version.
|
||||
pub version: u32,
|
||||
/// Per-project plugin activation choices.
|
||||
pub plugins: Vec<domain::ProjectPluginActivation>,
|
||||
/// Per-agent plugin capability assignments.
|
||||
pub agents: Vec<domain::AgentPluginAssignments>,
|
||||
}
|
||||
|
||||
impl From<domain::ProjectPluginSettings> for ProjectPluginSettingsDto {
|
||||
fn from(value: domain::ProjectPluginSettings) -> Self {
|
||||
Self {
|
||||
version: value.version,
|
||||
plugins: value.plugins,
|
||||
agents: value.agents,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Project plugin settings plus the globally installed manifest catalogue.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ProjectPluginSettingsViewDto {
|
||||
/// Persisted project settings.
|
||||
pub settings: ProjectPluginSettingsDto,
|
||||
/// Currently installed and valid plugin manifests.
|
||||
pub installed: Vec<domain::PluginManifest>,
|
||||
}
|
||||
|
||||
impl From<application::ProjectPluginSettingsView> for ProjectPluginSettingsViewDto {
|
||||
fn from(value: application::ProjectPluginSettingsView) -> Self {
|
||||
Self {
|
||||
settings: value.settings.into(),
|
||||
installed: value.installed,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Request to toggle a globally installed plugin for one project.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SetProjectPluginEnabledRequestDto {
|
||||
/// Owning project id.
|
||||
pub project_id: String,
|
||||
/// Globally installed plugin id.
|
||||
pub plugin_id: String,
|
||||
/// Desired project activation state.
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
/// Request to assign or unassign a plugin skill for an agent.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MutateAgentPluginSkillRequestDto {
|
||||
/// Owning project id.
|
||||
pub project_id: String,
|
||||
/// Target agent id.
|
||||
pub agent_id: String,
|
||||
/// Owning plugin id.
|
||||
pub plugin_id: String,
|
||||
/// Manifest-local skill id.
|
||||
pub skill_id: String,
|
||||
}
|
||||
|
||||
/// Request to assign or unassign a plugin MCP tool for an agent.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MutateAgentPluginToolRequestDto {
|
||||
/// Owning project id.
|
||||
pub project_id: String,
|
||||
/// Target agent id.
|
||||
pub agent_id: String,
|
||||
/// Owning plugin id.
|
||||
pub plugin_id: String,
|
||||
/// Manifest-local MCP server id.
|
||||
pub server_id: String,
|
||||
/// Tool name advertised by that server.
|
||||
pub tool_name: String,
|
||||
}
|
||||
|
||||
/// Admin plugin DTO.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
Reference in New Issue
Block a user