import { type PlatformPath } from "node:path"; 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; hidden: Type.TOptional; gitignore: Type.TOptional; limit: Type.TOptional; timeout: Type.TOptional; }>; export declare const findToolSystemPromptContribution: Readonly<{ readonly snippet: "Find filesystem paths by glob."; readonly guidelines: readonly []; }>; export type FindToolInput = Static; /** Relativize a find result against the search root and normalize it to POSIX separators. */ export declare function relativizeFindResultPath(resultPath: string, searchPath: string, pathModule?: PlatformPath): string; 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; } | undefined> | { isFile: boolean; isDirectory: boolean; } | undefined; exists: (path: string) => Promise | boolean; glob: (pattern: string, cwd: string, options: { ignore: string[]; limit: number; hidden: boolean; }) => Promise | string[]; } export interface FindToolOptions { /** Custom operations for find. Default: local filesystem plus fd */ operations?: FindOperations; } export declare function createFindToolDefinition(cwd: string, options?: FindToolOptions): ToolDefinition; export declare function createFindTool(cwd: string, options?: FindToolOptions): AgentTool; export {}; //# sourceMappingURL=find.d.ts.map