import type { ChatAgent } from '../../lib/chatAgent';
import type { ProviderId, ProviderRunState } from '../../lib/providers';
import type { MessageEventDetails, ReasoningEventDetails, SerializedPendingRunData, ToolCallProgress } from './useChatAgent.types';
import { type InternalToolApprovalInterruption } from './interruptions';
/**
 * Generates a unique id for tracking pending agent runs across reloads.
 */
export declare const createRunId: () => string;
export interface PendingRunInternal {
    id: string;
    startedAt: number;
    updatedAt: number;
    state: ProviderRunState;
    interruptions: InternalToolApprovalInterruption[];
    assistantText: string;
    toolCalls: ToolCallProgress[];
    reasoningEvents: ReasoningEventDetails[];
    messageEvents: MessageEventDetails[];
    providerId: ProviderId;
}
/**
 * Converts the in-memory pending run into a persistable snapshot, guarding against serialization failures.
 */
export declare const serializePendingRun: (pending: PendingRunInternal) => SerializedPendingRunData | null;
/**
 * Rehydrates a serialized pending run back into a live RunState with interruption handles.
 */
export declare const restorePendingRun: (serialized: SerializedPendingRunData, agent: ChatAgent, providerId: ProviderId) => Promise<PendingRunInternal>;
//# sourceMappingURL=pendingRun.d.ts.map