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

@ -106,12 +106,17 @@ async fn save_writes_md_and_index_line() {
let fs = MemFs::arc();
let store = FsMemoryStore::new(fs.clone());
store
.save(&root(), &note("alpha", "the hook", MemoryType::Project, "# Body"))
.save(
&root(),
&note("alpha", "the hook", MemoryType::Project, "# Body"),
)
.await
.unwrap();
// The note `.md` exists with frontmatter + body.
let md = fs.raw("/proj/.ideai/memory/alpha.md").expect("note written");
let md = fs
.raw("/proj/.ideai/memory/alpha.md")
.expect("note written");
assert!(md.starts_with("---\n"));
assert!(md.contains("name: alpha"));
assert!(md.contains("description: the hook"));
@ -119,7 +124,9 @@ async fn save_writes_md_and_index_line() {
assert!(md.contains("# Body"));
// The index has the header + the line.
let index = fs.raw("/proj/.ideai/memory/MEMORY.md").expect("index written");
let index = fs
.raw("/proj/.ideai/memory/MEMORY.md")
.expect("index written");
assert!(index.starts_with("# Memory Index"));
assert!(index.contains("- [alpha](alpha.md) — the hook"));
}
@ -272,7 +279,10 @@ async fn resolve_links_ignores_broken_links() {
async fn resolve_links_missing_source_is_not_found() {
let store = FsMemoryStore::new(MemFs::arc());
assert!(matches!(
store.resolve_links(&root(), &slug("nope")).await.unwrap_err(),
store
.resolve_links(&root(), &slug("nope"))
.await
.unwrap_err(),
MemoryError::NotFound
));
}