/** * Copyright 2025 Vybestack LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { IProvider, GenerateChatOptions } from '../IProvider.js'; import type { IModel } from '../IModel.js'; import type { IContent } from '../../services/history/IContent.js'; /** * Each line in a .responses file is a JSON object representing one model turn. * The `chunks` array contains the IContent objects that generateChatCompletion * will yield for that turn. */ export interface FakeResponseTurn { chunks: IContent[]; } /** * A provider that replays canned responses from a JSONL file. * * Intended for deterministic integration tests — the CLI runs tools for real * but model responses come from a golden file instead of a live LLM. * * The file format is newline-delimited JSON (JSONL). Each line is a * {@link FakeResponseTurn} object. * * Paths inside tool-call parameters often need to match the ephemeral test * directory. Use the literal string `{{CWD}}` in the golden file; the * provider replaces it with `cwd` at load time. */ export declare class FakeProvider implements IProvider { name: string; isDefault: boolean; baseProviderConfig: { baseURL: string; }; private turns; private callCounter; constructor(filePath: string, cwd?: string); generateChatCompletion(_optionsOrContent: GenerateChatOptions | IContent[]): AsyncIterableIterator; getAuthToken(): Promise; getModels(): Promise; getDefaultModel(): string; getCurrentModel(): string; getServerTools(): string[]; invokeServerTool(): Promise; }