/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { BaseDeclarativeTool, type ToolInvocation, type ToolResult } from './tools.js'; import { Config } from '../config/config.js'; import { MessageBus } from '../confirmation-bus/message-bus.js'; /** * Parameters for the GrepTool */ export interface RipGrepToolParams { /** * The regular expression pattern to search for in file contents */ pattern: string; /** * The directory to search in (optional, defaults to current directory relative to root) */ path?: string; /** * File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}") */ include?: string; } /** * Implementation of the Grep tool logic (moved from CLI) */ export declare class RipGrepTool extends BaseDeclarativeTool { private readonly config; static readonly Name = "search_file_content"; private readonly fileDiscoveryService; constructor(config: Config, _messageBus?: MessageBus); validateToolParams(params: RipGrepToolParams): string | null; protected createInvocation(params: RipGrepToolParams, _messageBus?: MessageBus): ToolInvocation; }