feat(memory): config embedders (LOT C2) + suggestion contextuelle (LOT C3) + contexte projet partagé

- LOT C2 (§14.5.3) : use cases de configuration des embedders déclaratifs
  (List/Save/Delete + DescribeEmbedderEngines : modèles ONNX recommandés,
  environnement local détecté, stratégies compilées). UI EmbedderSettings.
- LOT C3 (§14.5.5) : suggestion contextuelle best-effort à l'activation quand la
  mémoire dépasse le budget de recall sans embedder configuré (event
  EmbedderSuggested, anti-spam 1×/session, « ne plus demander »).
- Contexte projet partagé .ideai/CONTEXT.md (model-agnostic) injecté à tous les
  agents/profils au lancement, avant la persona. UI ProjectContextPanel.

Tests : backend workspace vert (0 échec) ; frontend 306/306.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 09:24:51 +02:00
parent 32398827fb
commit 785e9935fd
118 changed files with 5793 additions and 866 deletions

View File

@ -92,9 +92,7 @@ impl AgentRuntime for StubRuntime {
match self.by_command.get(&profile.command) {
Some(DetectResult::Available) => Ok(true),
Some(DetectResult::Missing) | None => Ok(false),
Some(DetectResult::Error) => {
Err(RuntimeError::Detection("boom".to_owned()))
}
Some(DetectResult::Error) => Err(RuntimeError::Detection("boom".to_owned())),
}
}
@ -163,7 +161,10 @@ async fn detect_error_degrades_to_unavailable_not_hard_failure() {
.await
.expect("detection error must not fail the use case");
assert!(!out.results[0].available, "errored detection ⇒ available:false");
assert!(
!out.results[0].available,
"errored detection ⇒ available:false"
);
}
// ---------------------------------------------------------------------------
@ -248,7 +249,10 @@ async fn save_then_list_then_delete() {
assert_eq!(list.execute().await.unwrap().profiles, vec![p.clone()]);
delete.execute(DeleteProfileInput { id: p.id }).await.unwrap();
delete
.execute(DeleteProfileInput { id: p.id })
.await
.unwrap();
assert!(list.execute().await.unwrap().profiles.is_empty());
}