///
type SafeParseSuccess = {
success: true;
data: T;
};
type SafeParseFailure = {
success: false;
error: {
issues: unknown[];
};
};
type SafeSchema = {
safeParse(value: unknown): SafeParseSuccess | SafeParseFailure;
};
type FakeAgentCall = {
readonly args: Record;
readonly prompt: unknown;
readonly rootDir?: string;
readonly taskContext?: unknown;
};
type FakeAgentFiles = Record;
type FakeAgentResult = {
output?: T;
text?: string;
files?: FakeAgentFiles;
};
type FakeAgentScriptFn = (args: Record) => FakeAgentResult | T | AutoMock | Promise | T | AutoMock>;
type FakeAgentScript = AutoMock | FakeAgentResult | T | FakeAgentScriptFn;
type FakeAgentOptions = {
id?: string;
model?: string;
supportsNativeStructuredOutput?: boolean;
};
type FakeAgent = {
id: string;
model: string;
tools: Record;
supportsNativeStructuredOutput: boolean;
calls: FakeAgentCall[];
generate(args?: Record): Promise>;
lastPrompt(): unknown;
reset(): void;
};
declare const autoMarker: unique symbol;
type AutoMock = {
readonly [autoMarker]: true;
};
declare const auto: AutoMock;
declare function isAuto(value: unknown): value is AutoMock;
declare function buildFakeAgent(schema: SafeSchema, script: FakeAgentScript, options?: FakeAgentOptions): FakeAgent;
declare function buildSequenceAgent(schema: SafeSchema, entries: readonly (FakeAgentResult | T | AutoMock)[], options?: FakeAgentOptions): FakeAgent;
declare const fakeAgent: typeof buildFakeAgent & {
sequence: typeof buildSequenceAgent;
};
export { type AutoMock, type FakeAgent, type FakeAgentCall, type FakeAgentFiles, type FakeAgentOptions, type FakeAgentResult, type FakeAgentScript, type SafeSchema, auto, fakeAgent, isAuto };