--- issueRef: "#270" version: 4 updatedBy: {"kind":"agent","agent_id":"a6c6ea12-bfc6-4bdc-8031-324102dfa34d"} updatedAt: 1788799729583 --- ## Verdict Architect (2026-09-07) Faisable sans relancer IdeA, avec un contrat a expliciter: IdeA garantit le refresh serveur/registry/MCP et les prochains `tools/list`; certains clients CLI actifs peuvent garder un cache interne de tools jusqu'au tour suivant ou une reconnexion MCP interne. Points de chargement actuels: - Backend registry/package: `crates/infrastructure/src/plugin/mod.rs`, `FsPluginPackageStore`, `registry.json`, `bundle_url()` en `idea-plugin:///current//
`. - Runtime catalog: `crates/application/src/plugin/mod.rs`, `ListPluginRuntimeContributions::execute()` relit le registry a chaque appel. - MCP plugin servers: install/enable/uninstall/reconcile appellent deja `PluginMcpSupervisor::reconcile`. - Frontend runtime: `frontend/src/features/plugins/PluginRuntimeProvider.tsx` liste une fois au mount. - Frontend loader: `frontend/src/plugins/runtime/loader.ts` importe les bundles une fois dans un `PluginRuntimeRegistry` neuf. - Tools IdeA agent-facing: `crates/infrastructure/src/orchestrator/mcp/tools.rs` et `crates/app-tauri/src/openai_tools.rs` sont statiques. Design retenu V1: - Use case `ReloadPlugin`. - Input `ReloadPluginInput { plugin_id, expected_content_hash?: Option }`. - Output `PluginReloadResult { plugin, old_content_hash, new_content_hash, changed, runtime_catalog_entry?: PluginRuntimePlugin, mcp_statuses, warnings }`. - Support initial: plugins installes depuis `PluginInstallSource::Directory`; pas de chemin arbitraire agent-facing. - Refaire `install_from_directory`, valider manifest/id, recalculer hash, commit atomique, upsert registry avec `restart_required=false`, publier `PluginReloaded`, puis `reconcile(active_mcp_specs)`. - Hash identique: `changed=false`, reconcile idempotent autorise. - `expected_content_hash` mismatch: erreur `CONFLICT`. - Archive sans chemin relodable: `UNSUPPORTED`/`INVALID` explicite. - Commande agent-facing: `idea_plugin_reload({ pluginId, expectedContentHash? })`, `WriteAction`, permission refusee par defaut. Decoupage: - #271 backend: use case, DTO Tauri, tool MCP, event domaine, reconcile, tests backend/MCP. - #272 frontend: gateway reload + provider reload ciblé + feedback agent/cellule uniquement si necessaire. - #273 QA: unitaires, integration MCP/tools, supervisor, frontend si #272, scenario inter-projets representatif.