import { ReadableStream, WritableStream } from 'node:stream/web'; import type { ReadableStreamGetReaderOptions, ReadableWritablePair, StreamPipeOptions } from 'node:stream/web'; import type { WorkflowResult, WorkflowRunStatus } from '../workflows/index.js'; import type { MastraBaseStream } from './base/base.js'; import { consumeStream } from './base/consume-stream.js'; import type { WorkflowStreamEvent } from './types.js'; export declare class WorkflowRunOutput = WorkflowResult> implements MastraBaseStream { #private; /** * Unique identifier for this workflow run */ runId: string; /** * Unique identifier for this workflow */ workflowId: string; constructor({ runId, workflowId, stream, }: { runId: string; workflowId: string; stream: ReadableStream; }); /** * @internal */ updateResults(results: TResult): void; /** * @internal */ rejectResults(error: Error): void; /** * @internal */ resume(stream: ReadableStream): void; consumeStream(options?: Parameters[0]): Promise; get fullStream(): ReadableStream; get status(): WorkflowRunStatus; get result(): Promise; get usage(): Promise; /** * @deprecated Use `fullStream.locked` instead */ get locked(): boolean; /** * @deprecated Use `fullStream.cancel()` instead */ cancel(reason?: any): Promise; /** * @deprecated Use `fullStream.getReader()` instead */ getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamDefaultReader | ReadableStreamBYOBReader; /** * @deprecated Use `fullStream.pipeThrough()` instead */ pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; /** * @deprecated Use `fullStream.pipeTo()` instead */ pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; /** * @deprecated Use `fullStream.tee()` instead */ tee(): [ReadableStream, ReadableStream]; /** * @deprecated Use `fullStream[Symbol.asyncIterator]()` instead */ [Symbol.asyncIterator](): AsyncIterableIterator; /** * Helper method to treat this object as a ReadableStream * @deprecated Use `fullStream` directly instead */ toReadableStream(): ReadableStream; } //# sourceMappingURL=RunOutput.d.ts.map