import type { ReasoningPart } from '@ai-sdk/provider-utils-v5';
import type { LanguageModelV2FinishReason, LanguageModelV2CallWarning, SharedV2ProviderMetadata, LanguageModelV2Source } from '@ai-sdk/provider-v5';
import type { LanguageModelRequestMetadata, LogProbs as LanguageModelV1LogProbs } from '../../_types/@internal_ai-sdk-v4/dist/index.js';
import type { StepResult, ModelMessage, LanguageModelUsage, ToolSet, TypedToolCall, TypedToolResult, StaticToolCall, StaticToolResult, DynamicToolCall, DynamicToolResult, GeneratedFile } from '../../_types/@internal_ai-sdk-v5/dist/index.js';
import { z } from 'zod/v4';
export interface LLMIterationStepResult {
    /** Includes 'tripwire' and 'retry' for processor scenarios */
    reason: LanguageModelV2FinishReason | 'tripwire' | 'retry';
    warnings: LanguageModelV2CallWarning[];
    isContinued: boolean;
    logprobs?: LanguageModelV1LogProbs;
    totalUsage: LanguageModelUsage;
    headers?: Record<string, string>;
    messageId?: string;
    request?: LanguageModelRequestMetadata;
}
export interface LLMIterationOutput<Tools extends ToolSet = ToolSet, OUTPUT = undefined> {
    text?: string;
    reasoning?: ReasoningPart[];
    reasoningText?: string;
    files?: GeneratedFile[];
    toolCalls?: TypedToolCall<Tools>[];
    toolResults?: TypedToolResult<Tools>[];
    sources?: LanguageModelV2Source[];
    staticToolCalls?: StaticToolCall<Tools>[];
    dynamicToolCalls?: DynamicToolCall[];
    staticToolResults?: StaticToolResult<Tools>[];
    dynamicToolResults?: DynamicToolResult[];
    usage: LanguageModelUsage;
    steps: StepResult<Tools>[];
    object?: OUTPUT;
}
export interface LLMIterationMetadata {
    id?: string;
    model?: string;
    modelId?: string;
    modelMetadata?: {
        modelId: string;
        modelVersion: string;
        modelProvider: string;
    };
    timestamp?: Date;
    providerMetadata?: SharedV2ProviderMetadata;
    headers?: Record<string, string>;
    request?: LanguageModelRequestMetadata;
}
export interface LLMIterationData<Tools extends ToolSet = ToolSet, OUTPUT = undefined> {
    messageId: string;
    messages: {
        all: ModelMessage[];
        user: ModelMessage[];
        nonUser: ModelMessage[];
    };
    output: LLMIterationOutput<Tools, OUTPUT>;
    metadata: LLMIterationMetadata;
    stepResult: LLMIterationStepResult;
    /**
     * Number of consecutive processor-triggered retries for the current generation.
     * Used to enforce the processor retry safety cap.
     */
    processorRetryCount?: number;
    /**
     * Current fallback model index for the active generation.
     * Preserved across processor-triggered retries so retries resume on the same fallback model.
     */
    fallbackModelIndex?: number;
    processorRetryFeedback?: string;
    /**
     * True when a background task result was injected and the LLM needs another
     * iteration to process it. When set, isTaskCompleteStep is skipped.
     */
    backgroundTaskPending?: boolean;
}
export declare const llmIterationStepResultSchema: z.ZodObject<{
    reason: z.ZodString;
    warnings: z.ZodArray<z.ZodAny>;
    isContinued: z.ZodBoolean;
    logprobs: z.ZodOptional<z.ZodAny>;
    totalUsage: z.ZodOptional<z.ZodObject<{
        inputTokens: z.ZodOptional<z.ZodNumber>;
        outputTokens: z.ZodOptional<z.ZodNumber>;
        totalTokens: z.ZodOptional<z.ZodNumber>;
        reasoningTokens: z.ZodOptional<z.ZodNumber>;
        cachedInputTokens: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    messageId: z.ZodOptional<z.ZodString>;
    request: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$strip>;
export declare const llmIterationOutputSchema: z.ZodObject<{
    messageId: z.ZodString;
    messages: z.ZodObject<{
        all: z.ZodArray<z.ZodAny>;
        user: z.ZodArray<z.ZodAny>;
        nonUser: z.ZodArray<z.ZodAny>;
    }, z.core.$strip>;
    output: z.ZodObject<{
        text: z.ZodOptional<z.ZodString>;
        reasoning: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        reasoningText: z.ZodOptional<z.ZodString>;
        files: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        toolCalls: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        toolResults: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        sources: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        staticToolCalls: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        dynamicToolCalls: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        staticToolResults: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        dynamicToolResults: z.ZodOptional<z.ZodArray<z.ZodAny>>;
        usage: z.ZodObject<{
            inputTokens: z.ZodOptional<z.ZodNumber>;
            outputTokens: z.ZodOptional<z.ZodNumber>;
            totalTokens: z.ZodOptional<z.ZodNumber>;
            reasoningTokens: z.ZodOptional<z.ZodNumber>;
            cachedInputTokens: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>;
        steps: z.ZodArray<z.ZodAny>;
    }, z.core.$strip>;
    metadata: z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        model: z.ZodOptional<z.ZodString>;
        modelId: z.ZodOptional<z.ZodString>;
        modelMetadata: z.ZodOptional<z.ZodObject<{
            modelId: z.ZodString;
            modelVersion: z.ZodString;
            modelProvider: z.ZodString;
        }, z.core.$strip>>;
        timestamp: z.ZodOptional<z.ZodDate>;
        providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        request: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    }, z.core.$strip>;
    stepResult: z.ZodObject<{
        reason: z.ZodString;
        warnings: z.ZodArray<z.ZodAny>;
        isContinued: z.ZodBoolean;
        logprobs: z.ZodOptional<z.ZodAny>;
        totalUsage: z.ZodOptional<z.ZodObject<{
            inputTokens: z.ZodOptional<z.ZodNumber>;
            outputTokens: z.ZodOptional<z.ZodNumber>;
            totalTokens: z.ZodOptional<z.ZodNumber>;
            reasoningTokens: z.ZodOptional<z.ZodNumber>;
            cachedInputTokens: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        messageId: z.ZodOptional<z.ZodString>;
        request: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    }, z.core.$strip>;
    processorRetryCount: z.ZodOptional<z.ZodNumber>;
    fallbackModelIndex: z.ZodOptional<z.ZodNumber>;
    processorRetryFeedback: z.ZodOptional<z.ZodString>;
    isTaskCompleteCheckFailed: z.ZodOptional<z.ZodBoolean>;
    backgroundTaskPending: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const toolCallInputSchema: z.ZodObject<{
    toolCallId: z.ZodString;
    toolName: z.ZodString;
    args: z.ZodRecord<z.ZodString, z.ZodAny>;
    providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    providerExecuted: z.ZodOptional<z.ZodBoolean>;
    output: z.ZodOptional<z.ZodAny>;
}, z.core.$strip>;
export declare const toolCallOutputSchema: z.ZodObject<{
    toolCallId: z.ZodString;
    toolName: z.ZodString;
    args: z.ZodRecord<z.ZodString, z.ZodAny>;
    providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    providerExecuted: z.ZodOptional<z.ZodBoolean>;
    output: z.ZodOptional<z.ZodAny>;
    result: z.ZodOptional<z.ZodAny>;
    error: z.ZodOptional<z.ZodAny>;
}, z.core.$strip>;
//# sourceMappingURL=schema.d.ts.map