import type { Agent, AgentChatMessage, AgentDetails, QueuedPrompt } from "../../services/agentService";
import type { EditOperation } from "../../../types";
import { acceptRunFrame, applyRunStart, applyRunStatus, settleCompletedRun, type AgentSessionToolApprovalResolution, type AgentSessionToolApprovalsRequired, type AgentSessionToolCallMessageUpsert, type AgentSessionToolResultMessageApply, type AgentSessionSnapshot, type AgentSessionAssistantContentChunk, type AgentSessionUserMessageEcho } from "./agentSessionState";
import type { AgentSessionCommands, AgentSessionState } from "./types";
export interface AgentSessionActions {
    startLoading: () => void;
    finishReady: () => void;
    applySnapshot: (snapshot: AgentSessionSnapshot) => void;
    applyError: (error: string) => void;
    replaceError: (error: string | null) => void;
    replaceAgent: (agent: AgentDetails | undefined) => void;
    replaceMetadata: (metadata: AgentSessionState["metadata"]) => void;
    replaceCostLimitExceeded: (costLimitExceeded: AgentSessionState["costLimitExceeded"]) => void;
    replaceContextWindowStatus: (contextWindowStatus: AgentSessionState["contextWindowStatus"]) => void;
    replaceLiveTotals: (liveTotals: AgentSessionState["liveTotals"]) => void;
    setBrowserClaimMutationPending: (isPending: boolean) => void;
    setActiveInlineDialog: (activeInlineDialog: AgentSessionState["activeInlineDialog"]) => void;
    patchRunState: (run: Partial<AgentSessionState["run"]>) => void;
    replaceQueuedPrompts: (queuedPrompts: QueuedPrompt[]) => void;
    addQueuedPrompt: (queuedPrompt: QueuedPrompt) => void;
    processQueuedPrompt: (promptId: string) => void;
    mergeOperationHistory: (operations: EditOperation[]) => void;
    replaceOperationHistory: (operations: EditOperation[]) => void;
    addOptimisticUserMessage: (message: AgentChatMessage) => void;
    removeOptimisticUserMessage: (messageId: string) => void;
    replaceTranscript: (transcript: AgentChatMessage[]) => void;
    assistantContentChunk: (chunk: AgentSessionAssistantContentChunk) => void;
    heartbeatMessage: (message: AgentChatMessage) => void;
    clearHeartbeatMessages: () => void;
    completeOpenAssistantMessages: () => void;
    completeOpenStreamingMessages: () => void;
    toolCall: (input: AgentSessionToolCallMessageUpsert) => void;
    toolResult: (input: AgentSessionToolResultMessageApply) => void;
    reconcileServerUserMessage: (echo: AgentSessionUserMessageEcho) => void;
    runStart: (input: Parameters<typeof applyRunStart>[1]) => void;
    runFrame: (input: Parameters<typeof acceptRunFrame>[1]) => void;
    runStatus: (status: Parameters<typeof applyRunStatus>[1], reason?: string | null) => void;
    armStopGuard: () => void;
    clearStopGuard: () => void;
    settleRun: (input: Parameters<typeof settleCompletedRun>[1]) => void;
    toolApprovalsRequired: (input: AgentSessionToolApprovalsRequired) => void;
    toolApprovalResolved: (resolution: AgentSessionToolApprovalResolution) => void;
}
export declare function useAgentSession(input: {
    agentStub: Agent;
}): {
    state: AgentSessionState;
    commands: AgentSessionCommands;
    bindCommands: (commands: Partial<AgentSessionCommands>) => void;
    actions: AgentSessionActions;
};
