import { AIMessage, Message } from '@langchain/langgraph-sdk';
import { RemoveUIMessage, UIMessage } from '@langchain/langgraph-sdk/react-ui';
import { ReactNode } from 'react';
type ToolCall = NonNullable<AIMessage["tool_calls"]>[number];
type InvalidToolCall = NonNullable<AIMessage["invalid_tool_calls"]>[number];
export type TodoItem = {
    id: string;
    content: string;
    status: "pending" | "in_progress" | "completed";
    updatedAt?: string | number | Date;
    run_id?: string;
    runId?: string;
    messageId?: string;
    checkpoint?: string;
};
export type StateType = {
    messages: Message[];
    ui?: UIMessage[];
    suggestions?: string[];
    todos?: TodoItem[];
};
declare const useTypedStream: {
    (options: import('@langchain/langgraph-sdk/react').UseStreamOptions<StateType, {
        UpdateType: {
            messages?: Message[] | Message | string;
            ui?: (UIMessage | RemoveUIMessage)[] | UIMessage | RemoveUIMessage;
        };
        CustomEventType: UIMessage | RemoveUIMessage;
    }>): import('@langchain/langgraph-sdk').BaseStream<StateType, import('@langchain/langgraph-sdk').DefaultToolCall, {
        UpdateType: {
            messages?: Message[] | Message | string;
            ui?: (UIMessage | RemoveUIMessage)[] | UIMessage | RemoveUIMessage;
        };
        CustomEventType: UIMessage | RemoveUIMessage;
    }>;
    (options: import('@langchain/langgraph-sdk/react').UseStreamCustomOptions<StateType, {
        UpdateType: {
            messages?: Message[] | Message | string;
            ui?: (UIMessage | RemoveUIMessage)[] | UIMessage | RemoveUIMessage;
        };
        CustomEventType: UIMessage | RemoveUIMessage;
    }>): import('@langchain/langgraph-sdk').BaseStream<StateType, import('@langchain/langgraph-sdk').DefaultToolCall, {
        UpdateType: {
            messages?: Message[] | Message | string;
            ui?: (UIMessage | RemoveUIMessage)[] | UIMessage | RemoveUIMessage;
        };
        CustomEventType: UIMessage | RemoveUIMessage;
    }>;
};
type StreamContextType = ReturnType<typeof useTypedStream> & {
    sendMessage: (message: Message | string, options?: {
        /** If true, message is meant for agent only (not user-visible) */
        type?: Message["type"];
        /** Name field required for function/tool messages */
        name?: string;
        /** If true, message is hidden from user UI */
        hidden?: boolean;
        /** Tool calls associated with this message */
        tool_calls?: ToolCall[];
        /** Invalid tool calls associated with this message */
        invalid_tool_calls?: InvalidToolCall[];
        /** If provided, use this ID for the message instead of generating one */
        tool_call_id?: string;
        /** Additional kwargs to attach to the message */
        additional_kwargs?: Record<string, unknown>;
        /** UI components to display alongside the message */
        ui?: UIMessage[];
        /** Custom ID for the message (will also be used for UI components) */
        id?: string;
        /** Custom context to override/merge with identity */
        context?: Record<string, unknown>;
    }) => Promise<void>;
    submitMessage: (message: Message, options?: {
        streamMode?: ("values" | "updates" | "messages" | "custom" | "debug")[];
        streamSubgraphs?: boolean;
        streamResumable?: boolean;
        contextValues?: Record<string, unknown>;
    }) => Promise<void>;
    regenerateMessage: (messageId: string) => Promise<void>;
    fetchCatalog: () => Promise<unknown>;
};
/**
 * Provides streaming message functionality for real-time AI responses.
 * Manages message state, handles streaming updates, and provides submit/sendMessage functions.
 *
 * @example
 * ```tsx
 * <StreamProvider>
 *   <ChatInterface />
 * </StreamProvider>
 * ```
 */
export declare function StreamProvider({ children }: {
    children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
/**
 * Hook to access the streaming context.
 * Provides access to messages, loading state, and functions to submit messages.
 *
 * @throws {Error} If used outside of StreamProvider
 *
 * @example
 * ```tsx
 * const { messages, isLoading, submit, sendMessage } = useStreamContext();
 * ```
 */
export declare function useStreamContext(): StreamContextType;
export {};
//# sourceMappingURL=Stream.d.ts.map