clawdb 0.1.2

The cognitive database for AI agents — unified memory, semantic retrieval, branching, sync, and governance.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Plugin interface.

use async_trait::async_trait;

use crate::{error::ClawDBResult, plugins::events::ClawEvent};

/// Trait implemented by dynamic ClawDB plugins.
#[async_trait]
pub trait ClawPlugin: Send + Sync {
    /// Returns the plugin name.
    fn name(&self) -> &str;

    /// Handles an emitted wrapper event.
    async fn on_event(&mut self, _event: &ClawEvent) -> ClawDBResult<()> {
        Ok(())
    }
}