import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback, ToolTier } from "@oh-my-pi/pi-agent-core";
import type { Component } from "@oh-my-pi/pi-tui";
import type { RenderResultOptions } from "../extensibility/custom-tools/types.js";
import { type Theme } from "../modes/theme/theme.js";
import type { ToolSession } from "../sdk.js";
import { type TruncationResult } from "../session/streaming-output.js";
import { type OutputMeta } from "./output-meta.js";
declare const readSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    path: string;
    selector?: string | undefined;
}, {}>;
export type ReadToolInput = typeof readSchema.infer;
export interface ReadToolDetails {
    kind?: "file" | "url";
    truncation?: TruncationResult;
    isDirectory?: boolean;
    resolvedPath?: string;
    suffixResolution?: {
        from: string;
        to: string;
    };
    url?: string;
    finalUrl?: string;
    contentType?: string;
    method?: string;
    notes?: string[];
    meta?: OutputMeta;
    /** Raw text + start line for user-visible TUI rendering, set when content is text-like.
     * Mirrors the same lines the model receives but without hashline/line-number prefixes,
     * so the TUI can render the file content with its own gutter without re-parsing the formatted text. */
    displayContent?: {
        text: string;
        startLine: number;
        lineNumbers?: Array<number | null>;
    };
    summary?: {
        lines: number;
        elidedSpans: number;
        elidedLines: number;
    };
    /** Number of unresolved git conflicts surfaced by this read (TUI uses for inline `⚠ N` badge). */
    conflictCount?: number;
    /** Paths recovered from a delimited read argument; used only by the TUI to render one call as multiple read rows. */
    displayReadTargets?: string[];
}
type ReadParams = ReadToolInput;
/**
 * Read tool implementation.
 *
 * Reads files with support for images, converted documents (via markit), and text.
 * Directories return a formatted listing with modification times.
 */
export declare class ReadTool implements AgentTool<typeof readSchema, ReadToolDetails> {
    #private;
    private readonly session;
    readonly name = "read";
    readonly approval: (args: unknown) => ToolTier;
    readonly label = "Read";
    readonly loadMode = "essential";
    readonly description: string;
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        path: string;
        selector?: string | undefined;
    }, {}>;
    readonly strict = true;
    constructor(session: ToolSession);
    execute(_toolCallId: string, params: ReadParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<ReadToolDetails>, _toolContext?: AgentToolContext): Promise<AgentToolResult<ReadToolDetails>>;
}
interface ReadRenderArgs {
    path?: unknown;
    file_path?: unknown;
    selector?: unknown;
    sel?: string;
    offset?: number;
    limit?: number;
    raw?: boolean;
}
export declare const readToolRenderer: {
    renderCall(args: ReadRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: ReadToolDetails;
        isError?: boolean;
    }, options: RenderResultOptions, uiTheme: Theme, args?: ReadRenderArgs): Component;
    mergeCallAndResult: boolean;
};
export {};
