use std::collections::HashMap;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
pub type MemoryRecord = claw_core::MemoryRecord;
pub type MergeResult = claw_branch::MergeResult;
pub type BranchDiff = claw_branch::DiffResult;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RememberResult {
pub memory_id: Uuid,
pub indexed: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SearchHit {
pub id: Uuid,
pub score: f32,
pub content: String,
pub memory_type: String,
pub tags: Vec<String>,
pub metadata: serde_json::Value,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SyncSummary {
pub pushed: u32,
pub pulled: u32,
pub conflicts: u32,
pub duration_ms: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReflectSummary {
pub job_id: Option<String>,
pub status: String,
pub message: String,
pub skipped: bool,
}
impl ReflectSummary {
pub fn skipped() -> Self {
Self {
job_id: None,
status: "skipped".to_string(),
message: "reflect client not configured".to_string(),
skipped: true,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HealthStatus {
pub ok: bool,
pub components: HashMap<String, bool>,
}
pub struct ClawTransaction<'a> {
pub(crate) inner: claw_core::ClawTransaction<'a>,
pub(crate) vector: Option<std::sync::Arc<claw_vector::VectorEngine>>,
pub(crate) workspace_id: String,
pub(crate) pending_vector_upserts: Vec<(String, serde_json::Value)>,
}