import { type MutableRefObject, type SetStateAction } from "react";
import type { AgentDetails, AgentMetadata } from "../../services/agentService";
import type { AgentSessionActions } from "./useAgentSession";
type StateSetter<T> = (next: SetStateAction<T>) => void;
export declare function useAgentRunStatusSocketHandler(input: {
    agent: AgentDetails | undefined;
    agentStubId: string;
    actions: AgentSessionActions;
    currentRunIdRef: MutableRefObject<string | null>;
    isStoppingRef: MutableRefObject<boolean>;
    isWaitingRef: MutableRefObject<boolean>;
    messagesRef: MutableRefObject<any[]>;
    shouldCreateNewMessageRef: MutableRefObject<boolean>;
    lastNonHeartbeatUpdateAtRef: MutableRefObject<number>;
    reconcileServerStateRef: MutableRefObject<(() => Promise<void>) | null>;
    normalizeRunId: (value: unknown) => string | null;
    noteMissingRunId: (source: string) => void;
    appendToolUiEvent: (type: string, detail?: string | null, seq?: number | null) => void;
    acceptRunSequenceFrame: (input: {
        eventName: "agent:run:delta" | "agent:run:status";
        runId: string | undefined;
        seq: number | undefined;
    }) => boolean;
    clearStopGuard: () => void;
    clearHeartbeatMessages: () => void;
    clearPendingBrowserCaptureWait: () => void;
    setPendingBrowserCaptureWait: (dialogType: string | null, callbackId: string | null) => void;
    schedulePendingDialogReplay: (targetAgentId: string, callbackId: string, dialogType?: string | null) => void;
    settleCompletedRun: (finalStatus?: "completed" | "cancelled", runId?: string | null) => void;
    setAgent: StateSetter<AgentDetails | undefined>;
    setAgentMetadata: StateSetter<AgentMetadata | null>;
    setError: StateSetter<string | null>;
    setLastRunStatusReason: (reason: string | null) => void;
    setIsConnecting: (isConnecting: boolean) => void;
    setIsWaitingForResponse: (isWaitingForResponse: boolean) => void;
    setIsAgentThinking: (isAgentThinking: boolean) => void;
}): (messageType: string, payload: any) => boolean;
export {};
