import type { MessagingBot, ConversationContext, ConversationEvent, MessagingEventHandler } from "../adapter.js"; export type ChatResponseErrorOperation = "respond" | "replace_response" | "respond_diagnostic" | "set_working"; export interface ChatResponseErrorContext { platform: string; conversationId: string; messageId: string; sessionKey: string; conversationKind: string; operation: ChatResponseErrorOperation; channelId?: string; chatId?: number; responseMessageId?: string | number | null; threadTs?: string; replyTargetId?: string; replyToId?: number | null; isThreaded?: boolean; extra?: Record; } export type ChatResponseErrorReporter = (err: unknown, operation: ChatResponseErrorOperation, extra?: Record) => void; export interface RetryOptions { /** Predicate that returns true when an error is worth retrying (rate limit, transient 5xx, etc.). */ isRateLimited: (err: Error) => boolean; /** Total attempts including the first call. */ maxAttempts?: number; baseDelayMs?: number; } export interface ResolveStopTargetInput { handler: MessagingEventHandler; conversationId: string; /** Session key derived from the current message; checked first when present. */ sessionKey?: string; } export interface BufferedResponseStreamOptions { minFlushIntervalMs?: number; minFlushChars?: number; now?: () => number; } export interface BufferedResponseStreamSink { flush(text: string): Promise; finish(text: string): Promise; } export interface MessageIntakeOptions { eventBase: TEvent; workingDir: string | undefined; isAutoReplyCandidate: boolean; logEntryBase: Record; log?: (entry: Record) => void; processAttachments: () => Promise; queueKey: string; enqueue: (queueKey: string, work: () => Promise) => void; handler: MessagingEventHandler; bot: MessagingBot; createContext: (event: TEvent) => ConversationContext; beforeEnqueue?: (event: TEvent) => Promise | boolean; onNotTriggered?: () => void; deferAttachmentsUntilRun?: boolean; } //# sourceMappingURL=types.d.ts.map