/** * Topic-Shift Detector * * Detects when conversation drifts to a new topic by comparing * the semantic embedding of the latest message against the * centroid of recent conversation context. * * When a significant shift is detected, suggests creating a * scoped worker thread so the main thread stays focused. */ import type { Database } from "./schema.js"; interface TopicShiftResult { shifted: boolean; similarity: number; suggestedTopic: string; recentTopicSummary: string; } /** * Detect if a new message represents a topic shift from recent conversation. * * Returns null if detection can't run (too few messages, no API key, etc.) */ export declare function detectTopicShift(db: Database, threadId: number, newMessage: string): Promise; export {}; //# sourceMappingURL=topic-shift.d.ts.map