import type { AgentTool } from "@earendil-works/pi-agent-core";
import { type Static, Type } from "typebox";
import type { ToolDefinition } from "../extensions/types.ts";
import { type TruncationResult } from "./truncate.ts";
declare const findSchema: Type.TObject<{
    paths: Type.TArray<Type.TString>;
    hidden: Type.TOptional<Type.TBoolean>;
    gitignore: Type.TOptional<Type.TBoolean>;
    limit: Type.TOptional<Type.TNumber>;
    timeout: Type.TOptional<Type.TNumber>;
}>;
export type FindToolInput = Static<typeof findSchema>;
export interface FindToolDetails {
    truncation?: TruncationResult;
    resultLimitReached?: number;
    timedOut?: boolean;
    truncated?: boolean;
    skippedMissingPaths?: string[];
    missingPaths?: string[];
    scopePath?: string;
    fileCount?: number;
    files?: string[];
    meta?: {
        limits?: {
            resultLimit?: number;
        };
        truncation?: TruncationResult;
    };
}
/** Pluggable operations for remote/container find backends. */
export interface FindOperations {
    stat?: (path: string) => Promise<{
        isFile: boolean;
        isDirectory: boolean;
    }> | {
        isFile: boolean;
        isDirectory: boolean;
    } | undefined;
    exists: (path: string) => Promise<boolean> | boolean;
    glob: (pattern: string, cwd: string, options: {
        ignore: string[];
        limit: number;
        hidden: boolean;
    }) => Promise<string[]> | string[];
}
export interface FindToolOptions {
    /** Custom operations for find. Default: local filesystem plus fd */
    operations?: FindOperations;
}
export declare function createFindToolDefinition(cwd: string, options?: FindToolOptions): ToolDefinition<typeof findSchema, FindToolDetails | undefined>;
export declare function createFindTool(cwd: string, options?: FindToolOptions): AgentTool<typeof findSchema>;
export {};
//# sourceMappingURL=find.d.ts.map