import type { SendMessageResponse } from '../../types/schemas/chat/messages.js'; export type DirectStreamActivity = 'idle' | 'connected' | 'active'; export type DirectStreamResultStatus = 'completed' | 'waiting_messages'; export type DirectStreamResult = { status: DirectStreamResultStatus; text: string; }; export type SseFrame = { event?: string; data: string; }; export type MessagePartsEvent = { kind: 'message-parts'; runId: string; deltaSeq: number; parentToolUseId?: string | null; event: Record; }; export type MessagePartsAccumulator = { runId: string | null; lastDeltaSeq: number; textByIndex: Record; thinkingByIndex: Record; }; export declare function parseSseFrames(source: string): { frames: SseFrame[]; rest: string; }; export declare function createMessagePartsAccumulator(runId?: string | null): MessagePartsAccumulator; export declare function applyMessagePartsEvent(accumulator: MessagePartsAccumulator, input: MessagePartsEvent): { text: string; thinking: string; changed: boolean; }; export declare function useDirectStream(options?: { onOptimisticResult?: (result: DirectStreamResult) => void; onResult?: (result: DirectStreamResult) => void; onTerminal?: () => void; onDisconnect?: () => void; }): { activity: any; streamingText: any; streamingThinking: any; activeRunId: any; connectMessage: (url: string, init: RequestInit, onAccepted: (response: SendMessageResponse) => void) => Promise; connectConversation: (url: string, init: RequestInit, expectedAssistantMessageId?: string) => Promise; beginMessage: () => void; disconnect: (reset?: boolean) => void; };