import type { TChatMessage, TMessageContent } from "../types/messages.js";
import { type ToolExecutionStatus } from "../utils/toolset/index.js";
export type ToolSettledEvent<TCustom extends TMessageContent = never> = {
    toolCallId: string;
    toolName: string;
    status: ToolExecutionStatus;
    messages: TChatMessage<TCustom>[];
};
export type UseToolResultContinuationOptions<TCustom extends TMessageContent = never> = {
    messages: TChatMessage<TCustom>[];
    /**
     * Called once per tool that transitioned from a pending status
     * (`waitingConfirmation`, `waitingSubmission`, `loading`) to a terminal
     * one (`success`, `error`, `cancelled`). Typical use: forward the
     * updated transcript to the model.
     */
    onSettled: (event: ToolSettledEvent<TCustom>) => void;
};
/**
 * Pure: returns events for every tool whose status was pending in `prev`
 * and is terminal in `next`. Tools that are already terminal in `prev`
 * (replay/restore) do not produce events.
 */
export declare function findNewlySettledTools<TCustom extends TMessageContent = never>(prev: TChatMessage<TCustom>[], next: TChatMessage<TCustom>[]): ToolSettledEvent<TCustom>[];
/**
 * Observe `messages` and fire `onSettled` once whenever a tool part
 * transitions from pending to terminal. Tools already terminal on the
 * first observed snapshot do not fire — replay/restore is intentionally
 * silent. Pair with `useToolset` to forward results to the model.
 */
export declare function useToolResultContinuation<TCustom extends TMessageContent = never>(options: UseToolResultContinuationOptions<TCustom>): void;
