UNPKG

@mastra/core

Version:
43 lines • 1.71 kB
/** * Options for {@link createGrepTool}. */ export interface GrepToolOptions { /** * When true, any filesystem read failure (missing target path, unreadable * directory, or unreadable file) throws instead of being silently skipped. * Use this when a partial search must not be mistaken for a complete one. * * This is a construction-time option (not an LLM-visible tool input) so the * search contract is fixed by the caller rather than chosen per invocation. * * @default false */ strict?: boolean; } /** * Create a grep tool bound to the given options. * * By default read failures are reported honestly in the summary (skip counts) * rather than throwing. Pass `strict: true` to make any read failure throw. */ export declare function createGrepTool(options?: GrepToolOptions): import("../../tools").Tool<{ pattern: string; path: string; contextLines: number; maxCount?: number | undefined; caseSensitive: boolean; includeHidden: boolean; }, string, unknown, unknown, import("../../tools").ToolExecutionContext<unknown, unknown, unknown>, "mastra_workspace_grep", unknown>; /** * Default grep tool (non-strict: read failures are reported in the summary * rather than thrown). Use {@link createGrepTool} to opt into strict mode. */ export declare const grepTool: import("../../tools").Tool<{ pattern: string; path: string; contextLines: number; maxCount?: number | undefined; caseSensitive: boolean; includeHidden: boolean; }, string, unknown, unknown, import("../../tools").ToolExecutionContext<unknown, unknown, unknown>, "mastra_workspace_grep", unknown>; //# sourceMappingURL=grep.d.ts.map