import type { ContextOperationRequest, StoredStreamChunk, StreamReference } from '../context.ts'; import type { EngineInternals } from './internals.ts'; type StreamOperation = Extract; export type StreamOperationCallbacks = { runOperationWithResult: (workflowId: string, operation: StreamOperation, execute: () => Promise) => Promise; handleCleanupError: (source: string, error: unknown, workflowId?: string) => void; }; export declare function getStreamChunksFromInternals(internals: EngineInternals, workflowId: string, key: string, options?: { after?: number; }): Promise; export declare function processStreamOperation(internals: EngineInternals, workflowId: string, operation: StreamOperation, callbacks: StreamOperationCallbacks): Promise; export declare function createStreamReferenceFromInternals(internals: EngineInternals, workflowId: string, operation: StreamOperation, callbacks: Pick): Promise; export declare function writeStreamChunksFromInternals(internals: EngineInternals, workflowId: string, operation: StreamOperation, asyncGenerator: AsyncGenerator, writtenKeys: string[]): Promise<{ chunkCount: number; totalSizeBytes: number; }>; export declare function cleanupStreamChunksFromInternals(internals: EngineInternals, workflowId: string, key: string, writtenKeys: string[], callbacks: Pick): Promise; export {};