/** * @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 ReadFile tool */ export interface ReadFileToolParams { /** * The absolute path to the file to read */ absolute_path?: string; /** * Alternative parameter name for absolute_path (for compatibility) * Not shown in schema - internal use only */ file_path?: string; /** * The line number to start reading from (optional) */ offset?: number; /** * The number of lines to read (optional) */ limit?: number; /** * When true, prefixes each text line with a virtual line number. */ showLineNumbers?: boolean; /** * When true, prefixes each text line with a git-change marker column. */ showGitChanges?: boolean; } /** * Implementation of the ReadFile tool logic */ export declare class ReadFileTool extends BaseDeclarativeTool { private config; static readonly Name: string; constructor(config: Config, _messageBus?: MessageBus); protected validateToolParamValues(params: ReadFileToolParams): string | null; protected createInvocation(params: ReadFileToolParams, _messageBus?: MessageBus): ToolInvocation; }