import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@pk-nerdsaver-ai/pi-agent-core";
import type { ToolExample } from "@pk-nerdsaver-ai/pi-ai";
import type { Component } from "@pk-nerdsaver-ai/pi-tui";
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
import type { Theme } from "../modes/theme/theme";
import { type TruncationResult } from "../session/streaming-output";
import type { ToolSession } from ".";
import { type OutputMeta } from "./output-meta";
declare const findSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    paths: string[];
    hidden?: boolean | undefined;
    gitignore?: boolean | undefined;
    limit?: number | undefined;
    timeout?: number | undefined;
}, {}>;
export type FindToolInput = typeof findSchema.infer;
export interface FindToolDetails {
    truncation?: TruncationResult;
    resultLimitReached?: number;
    meta?: OutputMeta;
    scopePath?: string;
    fileCount?: number;
    files?: string[];
    truncated?: boolean;
    error?: string;
    /** Working directory at search time. Used by the renderer to resolve relative
     * file paths to absolute paths for OSC 8 hyperlinks. */
    cwd?: string;
    /** User-supplied paths whose base directory was missing on disk. The tool
     * skipped these and continued with the surviving entries; surfaced as a
     * non-fatal warning in the renderer and in the model-facing text. */
    missingPaths?: string[];
}
/**
 * Pluggable operations for the find tool.
 * Override these to delegate file search to remote systems (e.g., SSH).
 */
export interface FindOperations {
    /** Check if path exists */
    exists: (absolutePath: string) => Promise<boolean> | boolean;
    /** Optional stat for distinguishing files vs directories. */
    stat?: (absolutePath: string) => Promise<{
        isFile(): boolean;
        isDirectory(): boolean;
    }> | {
        isFile(): boolean;
        isDirectory(): boolean;
    };
    /** Find files matching glob pattern. Returns relative paths. */
    glob: (pattern: string, cwd: string, options: {
        ignore: string[];
        limit: number;
    }) => Promise<string[]> | string[];
}
export interface FindToolOptions {
    /** Custom operations for find. Default: local filesystem + rg */
    operations?: FindOperations;
}
export declare class FindTool implements AgentTool<typeof findSchema, FindToolDetails> {
    #private;
    private readonly session;
    readonly name = "find";
    readonly approval: "read";
    readonly summary = "Find files and directories matching a glob pattern";
    readonly loadMode = "discoverable";
    readonly label = "Find";
    readonly description: string;
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        paths: string[];
        hidden?: boolean | undefined;
        gitignore?: boolean | undefined;
        limit?: number | undefined;
        timeout?: number | undefined;
    }, {}>;
    readonly examples: readonly ToolExample<typeof findSchema.infer>[];
    readonly strict = true;
    constructor(session: ToolSession, options?: FindToolOptions);
    execute(_toolCallId: string, params: typeof findSchema.infer, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<FindToolDetails>, _context?: AgentToolContext): Promise<AgentToolResult<FindToolDetails>>;
}
interface FindRenderArgs {
    paths?: string | string[];
    limit?: number;
}
export declare const findToolRenderer: {
    inline: boolean;
    renderCall(args: FindRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: FindToolDetails;
        isError?: boolean;
    }, options: RenderResultOptions, uiTheme: Theme, args?: FindRenderArgs): Component;
    mergeCallAndResult: boolean;
};
export {};
