import type { AgentTool } from "../types.js";
import { type TruncationResult } from "./truncate.js";
declare const grepSchema: import("@sinclair/typebox").TObject<{
    pattern: import("@sinclair/typebox").TString;
    path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
    literal: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
    context: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    before: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    after: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    output_mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"content">, import("@sinclair/typebox").TLiteral<"files_with_matches">, import("@sinclair/typebox").TLiteral<"count">]>>;
    glob: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>;
export interface GrepToolDetails {
    truncation?: TruncationResult;
    matchLimitReached?: number;
    linesTruncated?: boolean;
}
/**
 * Pluggable I/O backend for the grep tool. Pass a custom implementation to make
 * the search read from a target other than the local filesystem, such as a
 * remote machine reached through a transport layer.
 */
export interface GrepOperations {
    /** Return true when the path points at a directory. Throws if it does not exist. */
    isDirectory: (absolutePath: string) => Promise<boolean> | boolean;
    /** Load a file's contents as text so neighboring context lines can be rendered. */
    readFile: (absolutePath: string) => Promise<string> | string;
    /** List the immediate child names of a directory. */
    readdir: (absolutePath: string) => Promise<string[]> | string[];
}
export interface GrepToolOptions {
    /** Backend hooks to use. When omitted, the local filesystem is searched. */
    operations?: GrepOperations;
}
export declare function createGrepTool(cwd: string, options?: GrepToolOptions): AgentTool<typeof grepSchema>;
/** Ready-made grep tool bound to the process working directory. */
export declare const grepTool: AgentTool<import("@sinclair/typebox").TObject<{
    pattern: import("@sinclair/typebox").TString;
    path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
    literal: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
    context: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    before: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    after: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    output_mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"content">, import("@sinclair/typebox").TLiteral<"files_with_matches">, import("@sinclair/typebox").TLiteral<"count">]>>;
    glob: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
}>, any>;
export {};
