/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi } from 'vitest'; import { BaseDeclarativeTool, BaseToolInvocation, type ToolCallConfirmationDetails, type ToolInvocation, type ToolResult } from '../tools/tools.js'; import { type ModifiableDeclarativeTool, type ModifyContext } from '../tools/modifiable-tool.js'; type ToolSpy = ReturnType<(typeof vi)['fn']>; export declare class MockTool extends BaseDeclarativeTool<{ [key: string]: unknown; }, ToolResult> { executeFn: ToolSpy; shouldConfirm: boolean; constructor(name?: string, displayName?: string, description?: string, params?: { type: string; properties: { param: { type: string; }; }; }); protected createInvocation(params: { [key: string]: unknown; }): ToolInvocation<{ [key: string]: unknown; }, ToolResult>; } export declare class MockModifiableToolInvocation extends BaseToolInvocation, ToolResult> { private readonly tool; constructor(tool: MockModifiableTool, params: Record); execute(abortSignal: AbortSignal, updateOutput?: (output: string) => void): Promise; shouldConfirmExecute(_abortSignal: AbortSignal): Promise; getDescription(): string; } /** * Configurable mock modifiable tool for testing. */ export declare class MockModifiableTool extends MockTool implements ModifiableDeclarativeTool> { constructor(name?: string); getModifyContext(_abortSignal: AbortSignal): ModifyContext>; protected createInvocation(params: Record): ToolInvocation, ToolResult>; } export {};