import { type MutableRefObject, type SetStateAction } from "react";
import type { Agent, AgentChatMessage, AgentDetails, AgentMetadata } from "../../services/agentService";
import type { useAgentSession } from "./useAgentSession";
type AgentSessionActions = ReturnType<typeof useAgentSession>["actions"];
type StateSetter<T> = (next: SetStateAction<T>) => void;
export declare function useAgentLoader(input: {
    agentStub: Agent;
    initialMetadata: AgentMetadata | undefined;
    actions: AgentSessionActions;
    messagesRef: MutableRefObject<AgentChatMessage[]>;
    seenMessageIdsRef: MutableRefObject<Set<string>>;
    isStoppingRef: MutableRefObject<boolean>;
    initializeDraftAgent: () => boolean;
    syncLoadedRunState: (status: {
        isRunning: boolean;
        waitingForApproval: boolean;
        waitingForInput: boolean;
        hasStreaming: boolean;
    }) => void;
    sanitizeAgentMetadata: (metadata: AgentMetadata | null) => AgentMetadata | null;
    handleLoadError: (error: any) => void;
    setAgent: StateSetter<AgentDetails | undefined>;
    setAgentMetadata: StateSetter<AgentMetadata | null>;
    setError: StateSetter<string | null>;
}): ({ silent }?: {
    silent?: boolean;
}) => Promise<void>;
export {};
