import Database from 'better-sqlite3'; import { V as VectorStore } from '../types-CRqwkJoZ.js'; import { EmbeddingProvider } from '../embeddings/types.js'; import { Contradiction } from '../types.js'; interface ClaimGateContext { /** ISO timestamp the NEW memory is/was recorded at. */ readonly newRecordedAt?: string; /** ISO timestamp the EXISTING memory was recorded at (memories.created_at). */ readonly existingRecordedAt?: string; } declare function predicatesAllowSupersede(newContent: string, existingContent: string, ctx?: ClaimGateContext): boolean; /** * Detect potential contradictions between new content and existing memories. * * Strategy: * 1. Find semantically similar memories (same topic area) * 2. Check for signals that suggest contradiction: * - High semantic similarity but different factual content * - Negation patterns ("not", "no longer", "instead", "but") * - Temporal supersession ("now", "updated", "changed", "was X, now Y") * * This is a heuristic approach — no LLM calls. It flags candidates for review * rather than making definitive judgments. */ declare function detectContradictions(content: string, namespace: string, db: Database.Database, vecStore: VectorStore, embedder: EmbeddingProvider, threshold: number): Promise; /** * Apply contradiction resolution: invalidate the old memory by setting valid_to. */ declare function supersedMemory(db: Database.Database, oldMemoryId: string, newMemoryId: string): void; export { type ClaimGateContext, detectContradictions, predicatesAllowSupersede, supersedMemory };