import { ModelContract } from "../contracts/model.contract.mjs"; import { VcrModel, VcrOptions } from "./vcr.type.mjs"; //#region ../ai/src/vcr/vcr.d.ts /** * Wrap any `ModelContract` in a record/replay decorator backed by a JSON * cassette on disk. * * **What it does.** Intercepts only `complete()`/`stream()` — the single * seam every agent trip funnels through — and delegates `name`, `provider`, * `capabilities`, and `pricing` to the inner model untouched. On a call it * computes a stable hash over `{ messages, picked options }` and, depending * on `mode`: * * - **`record`** — always calls the inner model and appends a cassette entry. * - **`replay`** — returns the matching entry (or re-yields its chunks / * re-throws its error); a miss throws `VcrCassetteMissError`, never a live * call. * - **`auto`** (default) — replays a hit, records a miss. * * Composes *below* `fallbackModel` and works with any adapter because it * depends only on `ModelContract`. Call `save()` to flush new entries. * * @example * const model = vcr(liveModel, { path: "./cassettes/support.json" }); * const response = await model.complete(messages); * await model.save(); // first run records; later runs replay deterministically. */ declare function vcr(model: ModelContract, options: VcrOptions): VcrModel; //#endregion export { vcr }; //# sourceMappingURL=vcr.d.mts.map