export type FakeBlock = Record & { type: string }; export type FakeTurn = { content: FakeBlock[]; stop_reason: string; usage?: Record }; export type FakeError = { __error: { status: number; type: string; message: string; headers: Record } }; export type FakeScripted = | FakeTurn | FakeError | ((body: any, ctx: { requests: any[] }) => FakeTurn | FakeError | Promise); export const FAKE_KEY: string; export const DEFAULT_STRICT_MODELS: string[]; export function textBlock(text: string): FakeBlock; export function toolUseBlock(name: string, input: unknown, id?: string): FakeBlock; export function thinkingBlock(thinking: string): FakeBlock; export function webSearchBlocks( query: string, results: { url: string; title: string; text?: string; page_age?: string | null }[], ): FakeBlock[]; export function turn(content: FakeBlock | FakeBlock[], opts?: { stop_reason?: string; usage?: Record }): FakeTurn; export function textTurn(text: string, opts?: { stop_reason?: string; usage?: Record }): FakeTurn; export function toolTurn(name: string, input: unknown, opts?: { stop_reason?: string; usage?: Record }): FakeTurn; export function pauseTurn(content: FakeBlock[]): FakeTurn; export function errorTurn(status: number, type: string, message: string, headers?: Record): FakeError; export function strictModelProblem(body: any, strictModels?: string[]): string | null; export function signatureProblem(body: any): string | null; export type FakeAnthropic = { url: string; key: string; requests: any[]; requestHeaders: Record[]; push(...turns: FakeScripted[]): void; remaining(): number; close(): Promise; }; export function startFakeAnthropic(opts?: { key?: string; strictModels?: string[]; turns?: FakeScripted[] }): Promise; export function imageSize(buf: Buffer): { width: number; height: number } | null; export function imageTokens(width: number, height: number): number; export function imagesOf(body: any): { mediaType: string; bytes: Buffer; width: number; height: number }[]; export function imageProblem(body: any): string | null;