//#region src/utils/streaming.d.ts
interface StreamingAccumulatorState {
  content: string;
  inputTokens: number | null;
  outputTokens: number | null;
  totalTokens: number | null;
  reasoningTokens: number | null;
  cacheReadTokens: number | null;
  cacheCreationTokens: number | null;
  finishReason: string | null;
  toolCalls: Array<Record<string, unknown>>;
  model: string | null;
  ttfbMs: number | null;
  isError: boolean;
  errorMessage: string | null;
}
declare class StreamingAccumulator {
  content: string;
  inputTokens: number | null;
  outputTokens: number | null;
  totalTokens: number | null;
  reasoningTokens: number | null;
  cacheReadTokens: number | null;
  cacheCreationTokens: number | null;
  finishReason: string | null;
  toolCalls: Array<Record<string, unknown>>;
  model: string | null;
  ttfbMs: number | null;
  isError: boolean;
  errorMessage: string | null;
  private _startTime;
  private _firstChunkReceived;
  constructor();
  addContent(chunk: string): void;
  /**
   * Set (overwrite) token usage fields. Only non-null values are written,
   * allowing incremental updates where different streaming events provide
   * different fields (e.g. Anthropic message_start vs message_delta).
   */
  setUsage(usage: {
    inputTokens?: number;
    outputTokens?: number;
    totalTokens?: number;
    reasoningTokens?: number;
    cacheReadTokens?: number;
    cacheCreationTokens?: number;
  }): void;
  addToolCall(toolCall: Record<string, unknown>): void;
  setToolCallAt(index: number, toolCall: Record<string, unknown>): void;
  appendToolCallArgs(index: number, args: string): void;
  setError(message: string): void;
  getState(): StreamingAccumulatorState;
  get elapsedMs(): number;
}
//#endregion
export { StreamingAccumulator, StreamingAccumulatorState };
//# sourceMappingURL=streaming.d.ts.map