import type { AgentTool } from "@earendil-works/pi-agent-core";
import { type Static, Type } from "typebox";
import type { ToolDefinition } from "../extensions/types.ts";
import { type HashlineSnapshotStore } from "./hashline.ts";
import { type TruncationResult } from "./truncate.ts";
declare const readSchema: Type.TObject<{
    path: Type.TString;
}>;
export type ReadToolInput = Static<typeof readSchema>;
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<string, number>;
    };
}
export interface ReadOperations {
    readFile: (absolutePath: string) => Promise<Buffer>;
    access: (absolutePath: string) => Promise<void>;
    detectImageMimeType?: (absolutePath: string) => Promise<string | null | undefined>;
}
export interface ReadToolOptions {
    autoResizeImages?: boolean;
    operations?: ReadOperations;
    hashlineStore?: HashlineSnapshotStore;
}
export declare function createReadToolDefinition(cwd: string, options?: ReadToolOptions): ToolDefinition<typeof readSchema, ReadToolDetails | undefined>;
export declare function createReadTool(cwd: string, options?: ReadToolOptions): AgentTool<typeof readSchema>;
export {};
//# sourceMappingURL=read.d.ts.map