feat(plugins): seam slash-commands contribuées par plugin via callback — #165 (QA verte)

Permet à un plugin de contribuer des commandes slash adossées à une callback,
transitant par le registry/contrat unifié (#162) :

- sdk/IdeaSDK: manifeste contributes.slashCommands (déclaratif) — pointer bumpé.
- domain: source Plugin étendue + effet PluginCallback (la commande ne
  s'exécute pas directement : elle renvoie une référence à la callback du plugin).
- application: registration des commandes plugin dans le registry + exécution
  renvoyant l'effet PluginCallback ; métadonnées UI suffisantes pour l'autocomplete.
- backend + app-tauri: DTO + commandes Tauri listant/invoquant les commandes plugin.
- frontend (contrat): types adapters/domain/ports/mock pour pluginCallback et
  l'invocation avec arguments.

L'exécution effective de la callback côté runtime UI est livrée par #166.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-06 15:46:52 +02:00
parent ff7696b724
commit fbaca9d5cc
17 changed files with 514 additions and 34 deletions

View File

@ -110,8 +110,8 @@ pub use chat_attachment::{
pub use skill::{Skill, SkillKind, SkillRef, SkillScope};
pub use slash_command::{
filter_slash_commands, native_slash_commands, NativeSlashCommand, SlashCommand,
SlashCommandAvailability, SlashCommandSource,
filter_slash_commands, native_slash_commands, plugin_slash_command, NativeSlashCommand,
PluginSlashCommandCallback, SlashCommand, SlashCommandAvailability, SlashCommandSource,
};
pub use template::{AgentTemplate, TemplateVersion};
@ -234,8 +234,9 @@ pub use plugin::{
PluginInstallSource, PluginLayoutContribution, PluginLayoutType, PluginLifecycleState,
PluginManifest, PluginMcpServerContribution, PluginMcpServerId, PluginMcpServerSpec,
PluginMcpStatus, PluginMcpStatusSet, PluginMenuItemContribution, PluginPackageRef,
PluginRegistry, PluginRegistryEntry, PluginTopLevelMenuContribution, PluginTrustLevel,
PluginVersion, RelativePath, RemovalOutcome, StagedPluginPackage,
PluginRegistry, PluginRegistryEntry, PluginSlashCommandContribution,
PluginTopLevelMenuContribution, PluginTrustLevel, PluginVersion, RelativePath, RemovalOutcome,
StagedPluginPackage,
};
pub use sandbox::{