/** * Anthropic provider expressed as a declarative `WireFormatConfig`. * * The existing `AnthropicProvider` class stays as the production path until * the rest of the registry switches over — both produce the same canonical * StreamEvent[]. The per-message logic here is extracted verbatim from * `parseAnthropicStream` in `../anthropic.ts`, just split into a stateful * `parseStreamEvent` call instead of an async generator loop. */ import type { StopReason, Usage } from '@wrongstack/core/types'; type BlockKind = 'text' | 'tool_use' | 'thinking' | 'unknown'; export interface AnthropicStreamState { model: string; usage: Usage; stopReason: StopReason; started: boolean; stopped: boolean; /** * Provenance: true once any event supplied an explicit * `cache_creation_input_tokens` aggregate. While true, the TTL-split * derivation in `mergeAnthropicUsage` must not overwrite * `usage.cacheWrite` — the gateway's authoritative aggregate outranks any * sum derived from the (possibly partial) ephemeral buckets on later * events. Optional so external constructors of this state stay valid; * undefined behaves as false. */ cacheWriteFromAggregate?: boolean | undefined; blocks: Map; } export declare const anthropicWireFormat: import("../wire-format.js").WireFormatConfig; export {}; //# sourceMappingURL=anthropic.d.ts.map