UNPKG

tinyagent-ts

Version:

Modern TypeScript framework for building AI agents with pluggable tools and ReAct reasoning

29 lines (28 loc) 801 B
import { z } from 'zod'; import { Tool } from '../final-answer.tool'; export declare const GrepToolSchema: z.ZodObject<{ pattern: z.ZodString; file: z.ZodString; }, "strip", z.ZodTypeAny, { file: string; pattern: string; }, { file: string; pattern: string; }>; export type GrepToolArgs = z.infer<typeof GrepToolSchema>; export declare class GrepTool implements Tool<GrepToolArgs, string> { readonly name = "grep"; readonly description = "Search for a pattern in a file using grep"; readonly schema: z.ZodObject<{ pattern: z.ZodString; file: z.ZodString; }, "strip", z.ZodTypeAny, { file: string; pattern: string; }, { file: string; pattern: string; }>; forward(args: GrepToolArgs): Promise<string>; }