mod entity;
mod extract;
mod store;
mod types;
pub use store::Memory;
#[allow(unused_imports)]
pub use types::{
ClaimRelationship, EntityReference, ForgetReport, MatchKind, MatchReason, MemoryError,
MemoryFilter, MemoryListItem, MemoryRecord, MemoryStats, MemoryStatus, MemoryType,
MemoryTypeCounts, ParseMemoryStatusError, ParseMemoryTypeError, ParseRelationshipKindError,
RecallHit, RelationshipDirection, RelationshipKind, RememberInput, RememberReport,
RememberedMemory, SourceReference, SupersededMemory,
};
pub(super) const MAX_MEMORY_CHARS: usize = 2_000;
pub(super) const MAX_KEYWORDS: usize = 16;
pub(super) const MAX_KEYWORD_CHARS: usize = 80;
pub(super) const MAX_PROMPT_SOURCE_CHARS: usize = 3_000;
pub(super) const MAX_PROMPT_BATCH_CHARS: usize = 8_000;
pub(super) const EXTRACTION_MAX_TOKENS: usize = 1_200;
pub(super) const CONSOLIDATION_EVIDENCE_CHARS: usize = 500;
pub(super) const MAX_RELATION_RATIONALE_CHARS: usize = 500;
pub(super) const MAX_ENTITIES_PER_MEMORY: usize = 24;
pub(super) const MAX_ENTITY_CHARS: usize = 160;
pub(super) fn clipped_chars(value: &str, max_chars: usize) -> String {
value.chars().take(max_chars).collect()
}
pub(super) fn external_id(id: &str) -> String {
format!("mem_{id}")
}