import { type MutableRefObject, type SetStateAction } from "react";
import type { AgentDetails } from "../../services/agentService";
import type { AgentSessionActions } from "./useAgentSession";
type StateSetter<T> = (next: SetStateAction<T>) => void;
export declare function useAgentRunCompletionSocketHandler(input: {
    actions: AgentSessionActions;
    currentRunIdRef: MutableRefObject<string | null>;
    lastSettledRunIdRef: MutableRefObject<string | null>;
    lastNonHeartbeatUpdateAtRef: MutableRefObject<number>;
    isWaitingRef: MutableRefObject<boolean>;
    normalizeRunId: (value: unknown) => string | null;
    noteMissingRunId: (source: string) => void;
    settleCompletedRun: (finalStatus?: "completed" | "cancelled", runId?: string | null) => void;
    clearHeartbeatMessages: () => void;
    setError: StateSetter<string | null>;
    setAgent: StateSetter<AgentDetails | undefined>;
    setLastRunStatusReason: (reason: string | null) => void;
    setIsWaitingForResponse: (isWaitingForResponse: boolean) => void;
    setIsConnecting: (isConnecting: boolean) => void;
    setIsAgentThinking: (isAgentThinking: boolean) => void;
}): (messageType: string, payload: any) => boolean;
export {};
