import { Qa as IAIProvider, cs as TUniversalMessage } from "../index-BKIUt9pk.js"; //#region src/testing/scripted-provider.d.ts /** ANALYTICS-001: optional token usage a scripted turn reports, so usage-based tests are possible. */ interface IScriptedTurnUsage { inputTokens: number; outputTokens: number; } /** One scripted assistant turn: plain text or tool invocations, optionally reporting token usage. */ type TScriptedTurn = { text: string; usage?: IScriptedTurnUsage; } | { toolCalls: ReadonlyArray<{ name: string; args: Record; }>; usage?: IScriptedTurnUsage; }; interface IScriptedProvider { provider: IAIProvider; /** Message arrays of every chat() call, in order, for request assertions. */ requests: TUniversalMessage[][]; } declare function createScriptedProvider(turns: readonly TScriptedTurn[]): IScriptedProvider; //#endregion //#region src/testing/cassette-provider.d.ts /** One recorded request→response interaction. */ interface ICassetteInteraction { requestHash: string; requestPreview: string; response: TUniversalMessage; } /** A recorded session: an ordered list of interactions plus metadata. */ interface ICassette { version: 1; provider: string; model?: string; /** Recorded workspace path, stored as a placeholder so replay can rewrite it. */ recordCwd?: string; interactions: ICassetteInteraction[]; } interface IRecordingProviderOptions { provider: IAIProvider; cassettePath: string; /** Volatile substrings normalized out of the staleness hash (e.g. the workspace path). */ scrub?: readonly string[]; /** Recorded workspace path; replay rewrites it into the replay workspace. */ recordCwd?: string; model?: string; } /** Wrap a real provider, recording every interaction to the cassette file as it runs. */ declare function createRecordingProvider(options: IRecordingProviderOptions): IAIProvider; interface IReplayProviderOptions { cassettePath: string; /** Volatile substrings normalized out of the staleness hash (must match the record-time scrub). */ scrub?: readonly string[]; /** Replay workspace path; the recorded workspace path in responses is rewritten to it. */ rewriteCwd?: string; } /** Replay a recorded cassette deterministically, failing clearly on staleness or exhaustion. */ declare function createReplayProvider(options: IReplayProviderOptions): IAIProvider; //#endregion export { type ICassette, type ICassetteInteraction, type IRecordingProviderOptions, type IReplayProviderOptions, type IScriptedProvider, type TScriptedTurn, createRecordingProvider, createReplayProvider, createScriptedProvider }; //# sourceMappingURL=index.d.ts.map