/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { ToolCallConfirmationDetails, ToolInvocation, ToolResult } from '../tools/tools.js'; import { BaseDeclarativeTool } from '../tools/tools.js'; import { vi } from 'vitest'; interface MockToolOptions { name: string; displayName?: string; description?: string; canUpdateOutput?: boolean; isOutputMarkdown?: boolean; shouldConfirmExecute?: (params: { [key: string]: unknown; }, signal: AbortSignal) => Promise; execute?: (params: { [key: string]: unknown; }, signal: AbortSignal, updateOutput?: (output: string) => void) => Promise; params?: object; } /** * A highly configurable mock tool for testing purposes. */ type ExecuteFn = (params: { [key: string]: unknown; }, signal: AbortSignal, updateOutput?: (output: string) => void) => Promise; type ExecuteMock = ReturnType>; export declare class MockTool extends BaseDeclarativeTool<{ [key: string]: unknown; }, ToolResult> { shouldConfirm: boolean; executeFn: ExecuteMock; shouldConfirmExecute: (params: { [key: string]: unknown; }, signal: AbortSignal) => Promise; constructor(optionsOrName?: MockToolOptions | string); protected createInvocation(params: { [key: string]: unknown; }): ToolInvocation<{ [key: string]: unknown; }, ToolResult>; } export {};