import type { ModelImageResizeOptions } from "@bastani/pi-ai/compat"; import type { AgentTool } from "@earendil-works/pi-agent-core"; import { type Static, Type } from "typebox"; import type { ToolDefinition } from "../extensions/types.ts"; import { type DirectoryTreeEntry } from "./directory-tree.ts"; import { type HashlineSnapshotStore } from "./hashline.ts"; import { type TruncationResult } from "./truncate.ts"; declare const readSchema: Type.TObject<{ path: Type.TString; }>; export declare const readToolSystemPromptContribution: Readonly<{ readonly snippet: "Read a path selector."; readonly guidelines: readonly ["Use read to inspect file and resource contents; use path selectors for line ranges, raw output, and conflict views."]; }>; export type ReadToolInput = Static; declare const readOutputSchema: Type.TUnion<[Type.TString, Type.TObject<{ type: Type.TLiteral<"image">; data: Type.TString; mimeType: Type.TString; note: Type.TString; }>]>; export type ReadToolOutput = Static; export interface OversizedReadDetails { blocked: true; path: string; chars: number; maxChars: number; startLine: number; requestedLimit?: number; totalFileLines: number; firstLineBytes: number; byteGuidance: boolean; } export interface ReadToolDetails { isDirectory?: boolean; resolvedPath?: string; truncation?: TruncationResult; oversizedRead?: OversizedReadDetails; meta?: { source?: string; sourcePath?: string; artifactId?: string; truncation?: TruncationResult; limits?: Record; }; } export interface ReadOperations { readFile: (absolutePath: string) => Promise; access: (absolutePath: string) => Promise; stat?: (absolutePath: string) => Promise<{ isFile: boolean; isDirectory: boolean; } | undefined>; listDir?: (absolutePath: string) => Promise; detectImageMimeType?: (absolutePath: string) => Promise; } export interface ReadToolOptions { /** Whether to auto-resize images. Default: true */ autoResizeImages?: boolean; /** Fallback resize profile when the execution context has no model metadata. */ resizeOptions?: ModelImageResizeOptions; operations?: ReadOperations; hashlineStore?: HashlineSnapshotStore; } export declare function createReadToolDefinition(cwd: string, options?: ReadToolOptions): ToolDefinition; export declare function createReadTool(cwd: string, options?: ReadToolOptions): AgentTool; export {}; //# sourceMappingURL=read.d.ts.map