import type { AgentTool } from "@earendil-works/pi-agent-core"; import { type Static, Type } from "typebox"; import type { ToolDefinition } from "../extensions/types.js"; import { type TruncationResult } from "./truncate.js"; declare const grepSchema: Type.TObject<{ pattern: Type.TString; path: Type.TOptional; glob: Type.TOptional; ignoreCase: Type.TOptional; literal: Type.TOptional; context: Type.TOptional; limit: Type.TOptional; }>; export type GrepToolInput = Static; export interface GrepToolDetails { truncation?: TruncationResult; matchLimitReached?: number; linesTruncated?: boolean; } /** * Pluggable operations for the grep tool. * Override these to delegate search to remote systems (for example SSH). */ export interface GrepOperations { /** Check if path is a directory. Throws if path does not exist. */ isDirectory: (absolutePath: string) => Promise | boolean; /** Read file contents for context lines */ readFile: (absolutePath: string) => Promise | string; } export interface GrepToolOptions { /** Custom operations for grep. Default: local filesystem plus ripgrep */ operations?: GrepOperations; } export declare function createGrepToolDefinition(cwd: string, options?: GrepToolOptions): ToolDefinition; export declare function createGrepTool(cwd: string, options?: GrepToolOptions): AgentTool; export {}; //# sourceMappingURL=grep.d.ts.map