import type { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common'; import { Observable } from '../_types/rxjs/dist/types/index.js'; import type { MastraModuleOptions } from '../mastra.module.js'; import { ShutdownService } from '../services/shutdown.service.js'; /** * Interceptor that handles streaming responses and MCP transports. * Converts ReadableStream results to chunked HTTP responses. */ export declare class StreamingInterceptor implements NestInterceptor { private readonly options; private readonly shutdownService; private readonly logger; private readonly normalizedPrefix; private readonly heartbeatMs; constructor(options: MastraModuleOptions, shutdownService: ShutdownService); intercept(context: ExecutionContext, next: CallHandler): Observable; /** * Determine the response type of a handler result, or null if it's not * a recognized RouteHandlerResult. */ private getResultType; private handleJsonNull; /** * Handle streaming response - write chunks to response. */ private handleStreaming; /** * Handle datastream response (AI SDK Response). */ private handleDatastream; /** * Handle MCP HTTP transport response. */ private handleMcpHttp; /** * Handle MCP SSE transport response. */ private handleMcpSse; } //# sourceMappingURL=streaming.interceptor.d.ts.map