import type { ProviderEvent } from '../../../provider.js'; import type { AnthropicMessagesCreateParams, AnthropicToolDef, RunTurnInput, WireToolDef } from '../types.js'; import { type FirstByteTimeoutHandle } from '../../shared/first-byte-timeout.js'; import { type StreamStallHandle } from '../../shared/stream-stall-timeout.js'; import { type RoundRetryBudget } from './retry-budget.js'; import type { TurnAccumulator } from './turn-accumulator.js'; export declare function toWireTool(tool: AnthropicToolDef): WireToolDef; export interface OpenRoundTransport { kind: 'opened'; events: AsyncIterable; ttfb: FirstByteTimeoutHandle; stall: StreamStallHandle; requestStartedAt: number; } export type OpenRoundResult = OpenRoundTransport | { kind: 'retry-ttfb'; requestStartedAt: number; } | { kind: 'overload-exhausted'; } | { kind: 'terminated'; }; export interface OpenRoundContext { input: RunTurnInput; turn: TurnAccumulator; retry: RoundRetryBudget; ttfbTimeoutMs: number; stallTimeoutMs: number; } export declare function buildRoundParams(input: Pick): AnthropicMessagesCreateParams; export declare function openRound({ input, turn, retry, ttfbTimeoutMs, stallTimeoutMs, }: OpenRoundContext): AsyncGenerator;