Base de connaissance persistante par projet, indépendante de tout modèle/CLU
et de git. Cadrage archi en §14.5 (ARCHITECTURE.md), cycle Archi→Dev→Test.
LOT A — étage 1 (.md, source de vérité)
- domaine: entité Memory (+ MemorySlug, MemoryType, MemoryFrontmatter,
MemoryLink, MemoryIndexEntry), liens [[slug]], index MEMORY.md dérivé
- port MemoryStore + MemoryError, adapter FsMemoryStore (.ideai/memory/)
- application: 7 use cases (Create/Update/List/Get/Delete/ReadIndex/
ResolveLinks), From<MemoryError> for AppError
- app-tauri: commandes + DTO, events MemorySaved/MemoryDeleted
- suppression de la variante morte DomainError::MalformedFrontmatter
LOT B — rappel adaptatif (étage 1)
- port MemoryRecall + MemoryQuery, adapter NaiveMemoryRecall (troncature
au budget de tokens, court-circuit budget-0), use case RecallMemory
LOT C — étage 2 vectoriel (structure complète, zéro dépendance lourde)
- port Embedder + EmbedderError, profils déclaratifs EmbedderProfile/
EmbedderStrategy (embedder.json)
- VectorMemoryRecall (cosinus, cache .ideai/memory/.index/ gitignoré)
- AdaptiveMemoryRecall (bascule pure should_use_vector), défaut none
- HashEmbedder (déterministe, tests), StubEmbedder (onnx/server/api)
Tests: 57 binaires verts, build + clippy --workspace sans warning.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.6 KiB
Rust
48 lines
1.6 KiB
Rust
//! # IdeA — Infrastructure layer
|
|
//!
|
|
//! Concrete **adapters** implementing the domain ports (ARCHITECTURE §5). All
|
|
//! real-world I/O (`tokio::fs`, broadcast channels, system clock, UUIDs) lives
|
|
//! here, never in `domain` or `application`.
|
|
//!
|
|
//! L1 shipped the DI/event-relay adapters: [`LocalFileSystem`],
|
|
//! [`TokioBroadcastEventBus`], [`SystemClock`], [`UuidGenerator`]. L2 adds the
|
|
//! project persistence adapter [`FsProjectStore`]. L3 adds the local PTY adapter
|
|
//! [`PortablePtyAdapter`]. Git/remote/template adapters arrive in later lots.
|
|
|
|
#![forbid(unsafe_code)]
|
|
#![warn(missing_docs)]
|
|
|
|
pub mod clock;
|
|
pub mod eventbus;
|
|
pub mod fs;
|
|
pub mod git;
|
|
pub mod id;
|
|
pub mod inspector;
|
|
pub mod orchestrator;
|
|
pub mod process;
|
|
pub mod pty;
|
|
pub mod remote;
|
|
pub mod runtime;
|
|
pub mod store;
|
|
|
|
pub use clock::SystemClock;
|
|
pub use eventbus::TokioBroadcastEventBus;
|
|
pub use fs::LocalFileSystem;
|
|
pub use git::Git2Repository;
|
|
pub use id::UuidGenerator;
|
|
pub use inspector::ClaudeTranscriptInspector;
|
|
pub use orchestrator::{
|
|
process_request_file, FsOrchestratorWatcher, OrchestratorResponse, OrchestratorWatchHandle,
|
|
REQUESTS_SUBDIR,
|
|
};
|
|
pub use process::LocalProcessSpawner;
|
|
pub use pty::PortablePtyAdapter;
|
|
pub use remote::{remote_host, LocalHost};
|
|
pub use runtime::CliAgentRuntime;
|
|
pub use store::{
|
|
embedder_from_profile, index_token_size, should_use_vector, AdaptiveMemoryRecall,
|
|
FsEmbedderProfileStore, FsMemoryStore, FsProfileStore, FsProjectStore, FsSkillStore,
|
|
FsTemplateStore, HashEmbedder, IdeaiContextStore, NaiveMemoryRecall, StubEmbedder,
|
|
VectorMemoryRecall,
|
|
};
|