nexo_driver_loop/memory/
trait_def.rs1use async_trait::async_trait;
2use nexo_driver_claude::ClaudeError;
3use nexo_driver_permission::PermissionRequest;
4use nexo_driver_types::{Decision, GoalId};
5
6#[async_trait]
7pub trait DecisionMemory: Send + Sync + 'static {
8 async fn recall(&self, req: &PermissionRequest, k: usize) -> Vec<Decision>;
10
11 async fn record(&self, _decision: &Decision) -> Result<(), ClaudeError> {
15 Ok(())
16 }
17}
18
19#[derive(Clone, Debug, Eq, PartialEq)]
20pub enum Namespace {
21 PerGoal(GoalId),
23 Global,
25}