import type { InferUIMessageChunk as InferUIMessageChunkV5, UIMessage as UIMessageV5, UIMessageStreamOptions as UIMessageStreamOptionsV5 } from './_types/@internal_ai-sdk-v5/dist/index.d.ts';
import type { UIMessage as UIMessageV6, UIMessageStreamOptions as UIMessageStreamOptionsV6 } from './_types/@internal_ai-v6/dist/index.d.ts';
import type { MastraModelOutput, MastraAgentNetworkStream, WorkflowRunOutput } from '@mastra/core/stream';
import type { MastraWorkflowStream, Step, WorkflowResult } from '@mastra/core/workflows';
import type { ZodObject, ZodType } from 'zod/v4';
import type { V6UIMessageStream } from './public-types.js';
type WorkflowStreamOptionsBase = {
    from: 'workflow';
    includeTextStreamParts?: boolean;
    sendReasoning?: boolean;
    sendSources?: boolean;
};
type WorkflowStreamOptionsV5 = WorkflowStreamOptionsBase & {
    version?: 'v5';
};
type WorkflowStreamOptionsV6 = WorkflowStreamOptionsBase & {
    version: 'v6';
};
type NetworkStreamOptionsBase = {
    from: 'network';
};
type NetworkStreamOptionsV5 = NetworkStreamOptionsBase & {
    version?: 'v5';
};
type NetworkStreamOptionsV6 = NetworkStreamOptionsBase & {
    version: 'v6';
};
type AgentStreamOptionsBase = {
    from: 'agent';
    lastMessageId?: string;
    sendStart?: boolean;
    sendFinish?: boolean;
    sendReasoning?: boolean;
    sendSources?: boolean;
};
type AgentStreamOptionsV5 = AgentStreamOptionsBase & {
    version?: 'v5';
    messageMetadata?: UIMessageStreamOptionsV5<UIMessageV5>['messageMetadata'];
    onError?: UIMessageStreamOptionsV5<UIMessageV5>['onError'];
};
type AgentStreamOptionsV6 = AgentStreamOptionsBase & {
    version: 'v6';
    messageMetadata?: UIMessageStreamOptionsV6<UIMessageV6>['messageMetadata'];
    onError?: UIMessageStreamOptionsV6<UIMessageV6>['onError'];
};
export declare function toAISdkV5Stream<TOutput extends ZodType<any>, TInput extends ZodType<any>, TSteps extends Step<string, any, any, any, any, any>[], TState extends ZodObject<any>>(stream: MastraWorkflowStream<TState, TInput, TOutput, TSteps>, options: WorkflowStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkV5Stream<TOutput extends ZodType<any>, TInput extends ZodType<any>, TSteps extends Step<string, any, any, any, any, any>[], TState extends ZodObject<any>>(stream: WorkflowRunOutput<WorkflowResult<TState, TInput, TOutput, TSteps>>, options: WorkflowStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkV5Stream<OUTPUT = undefined>(stream: MastraAgentNetworkStream<OUTPUT>, options: NetworkStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkV5Stream<TOutput>(stream: MastraModelOutput<TOutput>, options: AgentStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkStream<TOutput extends ZodType<any>, TInput extends ZodType<any>, TSteps extends Step<string, any, any, any, any, any>[], TState extends ZodObject<any>>(stream: MastraWorkflowStream<TState, TInput, TOutput, TSteps>, options: WorkflowStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkStream<TOutput extends ZodType<any>, TInput extends ZodType<any>, TSteps extends Step<string, any, any, any, any, any>[], TState extends ZodObject<any>>(stream: WorkflowRunOutput<WorkflowResult<TState, TInput, TOutput, TSteps>>, options: WorkflowStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkStream<OUTPUT = undefined>(stream: MastraAgentNetworkStream<OUTPUT>, options: NetworkStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkStream<TOutput>(stream: MastraModelOutput<TOutput>, options: AgentStreamOptionsV5): ReadableStream<InferUIMessageChunkV5<UIMessageV5>>;
export declare function toAISdkStream<TOutput extends ZodType<any>, TInput extends ZodType<any>, TSteps extends Step<string, any, any, any, any, any>[], TState extends ZodObject<any>>(stream: MastraWorkflowStream<TState, TInput, TOutput, TSteps>, options: WorkflowStreamOptionsV6): V6UIMessageStream;
export declare function toAISdkStream<TOutput extends ZodType<any>, TInput extends ZodType<any>, TSteps extends Step<string, any, any, any, any, any>[], TState extends ZodObject<any>>(stream: WorkflowRunOutput<WorkflowResult<TState, TInput, TOutput, TSteps>>, options: WorkflowStreamOptionsV6): V6UIMessageStream;
export declare function toAISdkStream<OUTPUT = undefined>(stream: MastraAgentNetworkStream<OUTPUT>, options: NetworkStreamOptionsV6): V6UIMessageStream;
export declare function toAISdkStream<TOutput>(stream: MastraModelOutput<TOutput>, options: AgentStreamOptionsV6): V6UIMessageStream;
export {};
//# sourceMappingURL=convert-streams.d.ts.map