Skip to main content

aidens_profile_memory/
lib.rs

1//! Memory-agent profile status.
2//!
3//! This crate is a partial/proof-only surface. Canonical memory truth remains
4//! owned by the memory/runtime crates, not by this profile wrapper.
5
6pub use aidens_memory_kit::SemanticMemoryBackendProfileV1;
7
8pub const PROFILE_ID: &str = "memory-agent";
9pub const SUPPORT_TIER: &str = "partial/proof-only";
10pub const NON_GOAL: &str = "not a canonical memory truth owner";
11
12#[derive(Debug, Clone, PartialEq, Eq)]
13pub struct ProfileMemoryStatus {
14    pub enabled: bool,
15    pub note: String,
16}
17
18impl Default for ProfileMemoryStatus {
19    fn default() -> Self {
20        Self {
21            enabled: false,
22            note: format!("{PROFILE_ID}: {SUPPORT_TIER}; {NON_GOAL}"),
23        }
24    }
25}
26
27#[cfg(test)]
28mod tests {
29    use super::*;
30
31    #[test]
32    fn semantic_memory_backend_profile_locks_provekv_candidate_boundary() {
33        let profile = SemanticMemoryBackendProfileV1::provekv_derived_candidate();
34        assert!(profile.validate().is_ok());
35        assert_eq!(profile.owner, "semantic-memory");
36        assert_eq!(
37            profile.derived_candidate_backend,
38            "provekv_pool_candidate_then_exact_f32"
39        );
40        assert!(profile.exact_f32_rerank_required);
41        assert!(!profile.direct_provekv_dependency_allowed);
42        assert!(!profile.recall_integration_allowed);
43    }
44
45    #[test]
46    fn memory_profile_discloses_partial_non_owner_status() {
47        let status = ProfileMemoryStatus::default();
48        assert!(!status.enabled);
49        assert!(status.note.contains(SUPPORT_TIER));
50        assert!(status.note.contains("not a canonical memory truth owner"));
51    }
52}