import type { ModelMessage } from 'ai';
/**
 * Scan a message array for tool-call parts that do not have a corresponding
 * tool-result message. Returns metadata for each unresolved tool call.
 *
 * This is a lower-level utility for inspecting raw message arrays. Most callers
 * should prefer `result.state.pendingToolCalls`, which is set by the agent loop
 * and carries structured `ApprovalRequest` metadata.
 *
 * The function searches the last assistant message that contains tool-call parts,
 * then checks all subsequent messages for matching tool-result parts.
 *
 * @example
 * ```ts
 * // Low-level: scan messages directly
 * const pending = getPendingToolCalls(result.state.messages)
 * // pending = [{ toolCallId, toolName, input }]
 *
 * // Preferred: use structured state (includes approval metadata)
 * const pending = result.state.pendingToolCalls
 * // pending = [{ type: 'approval', toolCallId, toolName, input, approval }]
 *
 * // Resume with approval decision
 * const result2 = await agent.run({
 *   state: withApprovals(result.state, [{ toolCallId, approved: true }]),
 * }).result
 * ```
 */
export declare function getPendingToolCalls(messages: ModelMessage[]): Array<{
    toolCallId: string;
    toolName: string;
    input: Record<string, unknown>;
}>;
//# sourceMappingURL=pending.d.ts.map