import type { AgentTool } from "@kolisachint/hoocode-agent-core"; import { type Static, Type } from "typebox"; import type { ToolDefinition } from "../extensions/types.js"; import { type TruncationResult } from "./truncate.js"; declare const readSchema: Type.TObject<{ path: Type.TString; offset: Type.TOptional; limit: Type.TOptional; }>; export type ReadToolInput = Static; export interface ReadToolDetails { truncation?: TruncationResult; } /** * Pluggable operations for the read tool. * Override these to delegate file reading to remote systems (for example SSH). */ export interface ReadOperations { /** Read file contents as a Buffer */ readFile: (absolutePath: string) => Promise; /** Check if file is readable (throw if not) */ access: (absolutePath: string) => Promise; /** Detect image MIME type, return null or undefined for non-images */ detectImageMimeType?: (absolutePath: string) => Promise; } export interface ReadToolOptions { /** Whether to auto-resize images to 2000x2000 max. Default: true */ autoResizeImages?: boolean; /** Custom operations for file reading. Default: local filesystem */ operations?: ReadOperations; /** Byte cap on the returned text before truncation. Default: DEFAULT_MAX_BYTES. */ maxOutputBytes?: number; /** Line cap on the returned text before truncation. Default: DEFAULT_MAX_LINES. */ maxOutputLines?: number; /** * When true, a text read whose requested line range is already fully covered * by an earlier, still-live read in the current session short-circuits with a * pointer instead of re-fetching the file. Complements the post-hoc context * GC; gated on the same setting. Default: false. */ dedupReads?: boolean; } export declare function createReadToolDefinition(cwd: string, options?: ReadToolOptions): ToolDefinition; export declare function createReadTool(cwd: string, options?: ReadToolOptions): AgentTool; export {}; //# sourceMappingURL=read.d.ts.map