import type { InferUIMessageChunk, ObjectStreamPart, TextStreamPart, ToolSet, UIMessage, FinishReason } from './_types/@internal_ai-sdk-v5/dist/index.d.ts';
import type { FinishReason as FinishReasonV6, InferUIMessageChunk as InferUIMessageChunkV6, ToolApprovalRequest, UIMessage as UIMessageV6 } from './_types/@internal_ai-v6/dist/index.d.ts';
import type { DataChunkType, ChunkType, MastraFinishReason } from '@mastra/core/stream';
/**
 * Separator used to encode both runId and toolCallId into a single approvalId string.
 * Chosen because neither runId nor toolCallId can contain ":" in normal usage
 * (UUIDs are hex + hyphens; provider tool call IDs are alphanumeric + underscores).
 * The server splits on this separator to recover the runId for resumeStream.
 */
export declare const APPROVAL_ID_SEPARATOR = "::";
/**
 * Maps Mastra's extended finish reasons to AI SDK-compatible values.
 * 'tripwire' and 'retry' are Mastra-specific reasons for processor scenarios,
 * which are mapped to 'other' for AI SDK compatibility.
 */
export declare function toAISDKFinishReason(reason: MastraFinishReason): FinishReason;
export type OutputChunkType<OUTPUT = undefined> = TextStreamPart<ToolSet> | ObjectStreamPart<Partial<OUTPUT>> | ToolApprovalRequest | DataChunkType | undefined;
export type ToolAgentChunkType = {
    type: 'tool-agent';
    toolCallId: string;
    payload: any;
};
export type ToolWorkflowChunkType = {
    type: 'tool-workflow';
    toolCallId: string;
    payload: any;
};
export type ToolNetworkChunkType = {
    type: 'tool-network';
    toolCallId: string;
    payload: any;
};
type ConvertMastraChunkToAISDKOptions<OUTPUT> = {
    chunk: ChunkType<OUTPUT>;
    mode?: 'generate' | 'stream';
    normalizeWarnings: (warnings: any[] | undefined) => any[];
    normalizeUsage: (usage: any) => any;
    normalizeFinishReason: (reason: MastraFinishReason) => string;
    includeRawFinishReason?: boolean;
};
export declare function convertMastraChunkToAISDKBase<OUTPUT = undefined>({ chunk, mode, normalizeWarnings, normalizeUsage, normalizeFinishReason, includeRawFinishReason, }: ConvertMastraChunkToAISDKOptions<OUTPUT>): OutputChunkType<OUTPUT>;
export declare function convertMastraChunkToAISDKv5<OUTPUT = undefined>({ chunk, mode, }: {
    chunk: ChunkType<OUTPUT>;
    mode?: 'generate' | 'stream';
}): OutputChunkType<OUTPUT>;
export declare function toAISDKFinishReasonV6(reason: MastraFinishReason): FinishReasonV6;
export declare function convertMastraChunkToAISDKv6<OUTPUT = undefined>({ chunk, mode, }: {
    chunk: ChunkType<OUTPUT>;
    mode?: 'generate' | 'stream';
}): OutputChunkType<OUTPUT> | OutputChunkType<OUTPUT>[];
export declare function convertFullStreamChunkToUIMessageStream<UI_MESSAGE extends UIMessage>({ part, messageMetadataValue, sendReasoning, sendSources, onError, sendStart, sendFinish, responseMessageId, }: {
    part: TextStreamPart<ToolSet> | DataChunkType | ToolApprovalRequest | {
        type: 'tool-output';
        toolCallId: string;
        output: any;
    };
    messageMetadataValue?: unknown;
    sendReasoning?: boolean;
    sendSources?: boolean;
    onError: (error: unknown) => string;
    sendStart?: boolean;
    sendFinish?: boolean;
    responseMessageId?: string;
}): InferUIMessageChunk<UI_MESSAGE> | InferUIMessageChunkV6<UIMessageV6> | ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | undefined;
export {};
//# sourceMappingURL=helpers.d.ts.map