/**
 * Streaming Module
 *
 * Comprehensive streaming utilities for handling async data streams
 * with support for transformations, backpressure, and error recovery.
 *
 * Key features:
 * - Per-chunk timeout handling for latency control
 * - Adaptive render throttling for smooth UI updates
 * - Detailed latency metrics with percentiles (p50/p95/p99)
 * - Flow hints for consumer feedback
 * - Native Node.js stream integration
 * - Backpressure handling for flow control
 */
export { StreamProcessor, StreamProcessorOptions } from './stream-processor.js';
export * from './types.js';
export { ChunkProcessor, ChunkTimeoutError, StreamingMetrics, OptimizedChunkProcessorOptions, FlowHint, } from './chunk-processor.js';
export { StreamHandler, StreamHandlerOptions, ExtendedStreamStats, } from './stream-handler.js';
export { ChunkHandler } from './chunk-handler.js';
export { StreamTransformer, TransformFunction } from './stream-transformer.js';
export { BackpressureController, BackpressureOptions } from './backpressure.js';
export type { ToolPhase, ToolPhaseEvent, ToolPhaseResult, ToolPhaseEvents, } from './tool-phases.js';
export { ToolPhaseEmitter, ToolPhaseManager, getToolPhaseManager, resetToolPhaseManager, } from './tool-phases.js';
export type { ThrottleConfig } from './tool-throttle.js';
export { DEFAULT_THROTTLE_CONFIG, throttle, ToolPhaseThrottler, getToolPhaseThrottler, resetToolPhaseThrottler, } from './tool-throttle.js';
export type { ProgressStage, ProgressUpdate, ProgressTrackerConfig, } from './progress-tracker.js';
export { ProgressTracker, createSimpleTracker, calculateIterationProgress, } from './progress-tracker.js';
export type { BlockState, ChunkResult, MarkdownChunkerConfig, } from './markdown-chunker.js';
export { DEFAULT_CHUNKER_CONFIG, createBlockState, detectFence, updateBlockState, MarkdownChunker, chunkMarkdown, hasUnclosedCodeBlock, countCodeBlocks, fixUnclosedCodeBlocks, createStreamingChunker, } from './markdown-chunker.js';
export type { RetryConfig, RetryAttempt, RetryResult, CircuitBreakerConfig, CircuitState, CircuitBreakerStats, CircuitBreakerEvents, RetryManagerConfig, } from './retry-policy.js';
export { DEFAULT_RETRY_CONFIG, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_RETRY_MANAGER_CONFIG, calculateDelay, isRetryable, sleep, withTimeout, retry, retryOrThrow, CircuitBreaker, CircuitOpenError, RetryManager, getRetryManager, resetRetryManager, withRetry, withCircuitBreaker, withRetryAndCircuitBreaker, } from './retry-policy.js';
import { ToolPhaseEmitter } from './tool-phases.js';
import type { ToolPhaseEvent } from './tool-phases.js';
/**
 * Create a streaming tool execution helper
 */
export declare function createToolStream(toolCallId: string, toolName: string, onPhase?: (event: ToolPhaseEvent) => void): {
    emitter: ToolPhaseEmitter;
    start: (message?: string) => void;
    update: (progress: number, message?: string) => void;
    success: (output?: string, metadata?: Record<string, unknown>) => void;
    fail: (error: string, metadata?: Record<string, unknown>) => void;
    cleanup: () => void;
};
/**
 * Wrap an async operation with progress streaming
 */
export declare function streamedOperation<T>(toolCallId: string, toolName: string, operation: (updateProgress: (progress: number, message?: string) => void) => Promise<T>, onPhase?: (event: ToolPhaseEvent) => void): Promise<T>;
/**
 * Stream progress for an array operation
 */
export declare function streamedIteration<T, R>(toolCallId: string, toolName: string, items: T[], processor: (item: T, index: number) => Promise<R>, onPhase?: (event: ToolPhaseEvent) => void): Promise<R[]>;
