import type { ResolvedConversation } from "../core/config-types.js"; import type { InboundMessageInput } from "../core/runtime-types.js"; export interface LiveConnectionHandlers { onMessage(input: InboundMessageInput, checkpoint?: { cursor?: string; messageId?: string }): Promise; onCaughtUp(): Promise; onError(error: Error): Promise; onDisconnect?(): Promise; } export interface ResumeState { cursor?: string; messageId?: string; } export interface LiveConnection { conversation: ResolvedConversation; disconnect(): Promise; sendImmediate(text: string, replyToMessageId?: string): Promise; send( text: string, attachmentPaths?: string[], signal?: AbortSignal, replyToMessageId?: string, ): Promise; startTyping(status?: string): Promise; stopTyping(): Promise; syncPreview(markdown: string, done?: boolean): Promise; clearPreview(): Promise; setReplyTo(messageId: string | undefined): void; }