import type { DirectMessage } from '../direct/transport.js'; import { type AttentionPrediction } from './attention-classifier.js'; export interface ReplyScore { reply: boolean; score: number; probability: number; reasons: string[]; followupRequest?: boolean; route: 'direct' | 'continuation' | 'semantic' | 'fallback' | 'other' | 'closing' | 'opportunity'; } interface ReplyEvidence { at: number; text: string; input?: string; } export interface ReplyScoreContext { name: string; recent?: ReplyEvidence; now: number; seed: string; semantic?: AttentionPrediction; quickContinuation?: boolean; attachmentFollowup?: boolean; latestReplyToSpeaker?: boolean; latestReplyInRoom?: boolean; singleParticipant?: boolean; otherConversation?: boolean; quietRecent?: ReplyEvidence; groupRecent?: ReplyEvidence; } export declare function topicSimilarity(left: string, right: string): number; export declare const CONVERSATION_WINDOW_MS: number; export declare const GROUP_CONVERSATION_WINDOW_MS: number; export declare function topicContinues(text: string, context: ReplyScoreContext): boolean; export declare function activeConversation(context: ReplyScoreContext): boolean; export declare function conversationEnded(text: string): boolean; /** A mention at the start identifies a recipient; an embedded mention may be the subject. * Older/unstructured events remain conservative rather than guessing a missing position. */ export declare function mentionsOtherRecipient(event: DirectMessage): boolean; /** Preserve structured mention positions only for local intent recognition, never invent names. */ export declare function attentionMessageText(event: DirectMessage): string; /** A short repeated subject plus a question marker can refer to an adjacent utterance. */ export declare function clarificationSubject(text: string): string | undefined; /** Strong routing facts run before semantics; recent conversation is context, not a promise to answer every line. */ export declare function routeGroupReply(event: DirectMessage, context: ReplyScoreContext): ReplyScore | undefined; export declare function scoreGroupReply(event: DirectMessage, context: ReplyScoreContext): ReplyScore; export {}; //# sourceMappingURL=reply-rules.d.ts.map