77 lines
4.1 KiB
Markdown
77 lines
4.1 KiB
Markdown
---
|
|
issueRef: "#271"
|
|
version: 8
|
|
updatedBy: {"kind":"agent","agent_id":"1ff94b51-3e17-4a39-8543-7715d1ff0f80"}
|
|
updatedAt: 1788802202168
|
|
---
|
|
## Contrat d'implementation initial (Architect, 2026-09-07)
|
|
|
|
Implementer le backend du hot reload plugin sans relance IdeA.
|
|
|
|
Use case: `ReloadPlugin`.
|
|
Input: `ReloadPluginInput { plugin_id, expected_content_hash?: Option<String> }`.
|
|
Output: `PluginReloadResult { plugin, old_content_hash, new_content_hash, changed, runtime_catalog_entry?: PluginRuntimePlugin, mcp_statuses, warnings }`.
|
|
|
|
Perimetre V1:
|
|
- Supporter d'abord `PluginInstallSource::Directory`.
|
|
- Le tool agent-facing ne doit pas accepter de chemin arbitraire; le chemin relodable vient du registry installe.
|
|
- Refaire `install_from_directory`, valider manifest/id, recalcul hash, commit atomique, upsert registry `restart_required=false`.
|
|
- Publier `PluginReloaded { plugin_id, old_content_hash, new_content_hash, changed }`.
|
|
- Appeler `PluginMcpSupervisor::reconcile` apres reload.
|
|
- Hash identique => `changed=false`, reconcile idempotent.
|
|
- `expected_content_hash` mismatch => erreur `CONFLICT`.
|
|
- Source archive non relodable => erreur explicite `UNSUPPORTED` ou `INVALID`.
|
|
|
|
Agent-facing:
|
|
- Ajouter `idea_plugin_reload({ pluginId, expectedContentHash? })`.
|
|
- Classer en `WriteAction`, permission refusee par defaut.
|
|
- Cabler aussi le schema OpenAI/direct si le catalogue tools est duplique dans `crates/app-tauri/src/openai_tools.rs`.
|
|
|
|
Points code a inspecter:
|
|
- `crates/infrastructure/src/plugin/mod.rs`
|
|
- `crates/application/src/plugin/mod.rs`
|
|
- `crates/infrastructure/src/orchestrator/mcp/tools.rs`
|
|
- `crates/app-tauri/src/openai_tools.rs`
|
|
|
|
Limite a preserver dans le resultat: IdeA garantit registry/serveur/prochains `tools/list`; certains providers peuvent cacher leur introspection interne jusqu'au tour suivant/reconnexion MCP interne.
|
|
|
|
## Verification Main apres timeout DevBackend (2026-09-07)
|
|
|
|
DevBackend a rendu un handoff: implementation partielle, non compilee/testee, non committee.
|
|
|
|
Worktree `feature/269-backend` modifie:
|
|
- `crates/app-tauri/src/lib.rs`
|
|
- `crates/app-tauri/src/plugins.rs`
|
|
- `crates/application/src/lib.rs`
|
|
- `crates/application/src/plugin/mod.rs`
|
|
- `crates/backend/src/dto.rs`
|
|
- `crates/backend/src/events.rs`
|
|
- `crates/backend/src/lib.rs`
|
|
- `crates/backend/src/openai_tools.rs`
|
|
- `crates/domain/src/events.rs`
|
|
- `crates/infrastructure/src/orchestrator/mcp/mod.rs`
|
|
- `crates/infrastructure/src/orchestrator/mcp/server.rs`
|
|
- `crates/infrastructure/src/orchestrator/mcp/tools.rs`
|
|
- `crates/infrastructure/src/orchestrator/mcp/plugins.rs` (nouveau)
|
|
|
|
Commandes Main:
|
|
- `cargo fmt --all -- --check` => KO, formatage requis dans `crates/app-tauri/src/plugins.rs`, `crates/application/src/lib.rs`, `crates/application/src/plugin/mod.rs`, `crates/backend/src/lib.rs`, `crates/infrastructure/src/orchestrator/mcp/mod.rs`, `crates/infrastructure/src/orchestrator/mcp/server.rs`.
|
|
- `cargo check --workspace` => KO. Erreurs principales:
|
|
- `crates/backend/src/lib.rs:107`: unresolved import `infrastructure::PluginToolProvider`; suggestion `infrastructure::orchestrator::mcp::PluginToolProvider`.
|
|
- `crates/backend/src/openai_tools.rs:18`: unresolved import `infrastructure::PluginToolProvider`.
|
|
- `crates/backend/src/lib.rs:166/168/174/183/185`: `infrastructure::PluginToolError` introuvable; importer/referrer `infrastructure::orchestrator::mcp::PluginToolError` ou re-exporter proprement.
|
|
|
|
Retour DevBackend requis: corriger format + compile, ajouter/ajuster tests, executer les commandes pertinentes avant handoff. Pas de commit avant vert.
|
|
|
|
## Verification Main apres second timeout DevBackend (2026-09-07)
|
|
|
|
DevBackend a de nouveau timeout cote rendez-vous mais son workstate est `done` et le worktree a avance.
|
|
|
|
Etat git: toujours non committe sur `feature/269-backend`; ajout de `crates/infrastructure/tests/mcp_server.rs` aux fichiers modifies.
|
|
|
|
Commandes Main:
|
|
- `cargo fmt --all -- --check` => OK.
|
|
- `cargo check --workspace` => OK (`backend`, `web-server`, `app-tauri` check termines).
|
|
|
|
Suite: passage QA #273 sur l'etat non committe de la branche backend. QA doit verifier les tests reels et remonter tout ecart avant commit.
|