/** * Memory System Core Types * * Type definitions for LLM-native memory system with extraction, * consolidation, and retrieval capabilities. */ /** * Entity extracted from text */ export interface Entity { id?: string; name: string; entityType: string; properties?: Record; confidence?: number; provenance?: string; timestamp?: number; } /** * Relation between two entities */ export interface Relation { id?: string; fromEntity: string; relationType: string; toEntity: string; properties?: Record; confidence?: number; provenance?: string; timestamp?: number; } /** * Assertion (subject-predicate-object triple) */ export interface Assertion { id?: string; subject: string; predicate: string; object: string; confidence?: number; provenance?: string; timestamp?: number; } /** * Raw assertion for consolidation */ export interface RawAssertion { id?: string; fact: Record; source: string; confidence: number; timestamp?: number; } /** * Canonical fact after consolidation */ export interface CanonicalFact { id: string; mergedFact: Record; confidence: number; sources: string[]; validFrom: number; validUntil?: number; } /** * Extraction result from LLM */ export interface ExtractionResult { entities: Entity[]; relations: Relation[]; assertions: Assertion[]; } /** * Extraction schema for validation */ export interface ExtractionSchema { entityTypes?: string[]; relationTypes?: string[]; minConfidence?: number; requireProvenance?: boolean; } /** * Consolidation configuration */ export interface ConsolidationConfig { similarityThreshold?: number; useTemporalUpdates?: boolean; maxConflictAge?: number; } /** * Retrieval configuration */ export interface RetrievalConfig { k?: number; alpha?: number; enableRerank?: boolean; rerankK?: number; } /** * Retrieval result */ export interface RetrievalResult { id: string; score: number; content: string; metadata?: Record; vectorRank?: number; keywordRank?: number; } /** * Retrieval response */ export interface RetrievalResponse { results: RetrievalResult[]; queryTime: number; totalResults: number; } /** * AllowedSet for pre-filtering */ export declare abstract class AllowedSet { abstract contains(id: string, metadata?: Record): boolean; static fromIds(ids: string[]): AllowedSet; static fromNamespace(namespace: string): AllowedSet; static fromFilter(filterFn: (id: string, metadata?: Record) => boolean): AllowedSet; static allowAll(): AllowedSet; } /** * Namespace policy */ export declare enum NamespacePolicy { STRICT = "strict", EXPLICIT = "explicit", PERMISSIVE = "permissive" } /** * Cross-namespace grant */ export interface NamespaceGrant { id: string; fromNamespace: string; toNamespace: string; operations: string[]; expiresAt?: number; reason?: string; } //# sourceMappingURL=types.d.ts.map