import type { BatchJobRef, BatchJobState, BatchJobStatus, BatchOutputItem, BatchProvider, BatchProviderCallContext, BatchProviderCapabilities, BatchProviderInfo, BatchSubmitRequest } from '../types/batch.js'; /** Options for the mock batch provider. */ export interface MockBatchProviderOptions { /** Provider name. Defaults to `mock`. */ name?: string; /** Capabilities reported, merged over the defaults. */ capabilities?: Partial; /** * Statuses returned by successive `poll()` calls. The last is repeated once exhausted, so * `['in_progress', 'completed']` finishes on the second poll. */ statuses?: readonly BatchJobStatus[]; /** customIds that come back as errors instead of responses. */ failItems?: readonly string[]; /** Tokens reported per successful item. */ tokensPerItem?: { input: number; output: number; }; /** Model reported on responses when an item names none. Defaults to `mock-model`. */ model?: string; } /** * Deterministic, network-free batch provider. * * Lets a test drive a full submit-poll-collect cycle in milliseconds, including a mixed batch where * some items fail, without a provider account or a 24-hour wait. */ export declare class MockBatchProvider implements BatchProvider { private readonly options; /** Provider name and capabilities. */ readonly info: BatchProviderInfo; /** Every submitted batch, keyed by its generated id. */ readonly submitted: Map; private pollCounts; private cancelled; private counter; constructor(options?: MockBatchProviderOptions); /** Number of times `poll()` was called for a batch. */ pollCount(id: string): number; /** Records a batch and returns a generated id. */ submit(request: BatchSubmitRequest, _context: BatchProviderCallContext): Promise; /** Returns the next scripted status. Defaults to `completed` immediately. */ poll(ref: BatchJobRef, _context: BatchProviderCallContext): Promise; /** A response per item, or an error for items in `failItems`. */ results(ref: BatchJobRef, _context: BatchProviderCallContext): Promise; /** Marks a batch cancelled. */ cancel(ref: BatchJobRef, _context: BatchProviderCallContext): Promise; private counts; }