/** * Extracted helpers from poll-loop.ts to reduce main file complexity. * * Contains: * - processIncomingMessages(): orchestrates reading, classification, * media processing, episode ingestion, and response assembly for * incoming operator messages. * - handlePollTimeout(): runs post-timeout logic including scheduled-task * checks, auto-consolidation, memory refresh, and drive activation. */ import type { ToolResult } from "../../lib/types.js"; import type { WaitToolContext, WaitToolExtra } from "./context.js"; /** * Consumes queued Telegram messages for a thread, processes all media types, * saves episodes, injects memory context, and returns the assembled ToolResult. * * Called from the poll loop when peekThreadMessages() finds pending messages. * * @param effectiveThreadId - The thread to read messages from. * @param peekedCount - Number of messages found by peek (for logging). * @param ctx - Shared wait-tool context (state, services, config). * @param extra - SSE extras (signal, sendNotification). */ export declare function processIncomingMessages(effectiveThreadId: number, peekedCount: number, ctx: WaitToolContext, extra: WaitToolExtra): Promise; /** * Runs after the poll loop times out with no actionable messages. * Checks for due scheduled tasks, builds schedule hints, runs * auto-consolidation, refreshes memory context, and checks the * autonomous drive activation. */ export declare function handlePollTimeout(effectiveThreadId: number | undefined, callNumber: number, ctx: WaitToolContext): ToolResult; //# sourceMappingURL=message-processing.d.ts.map