UNPKG

tinyagent-ts

Version:

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

41 lines (40 loc) 1.04 kB
import { z } from 'zod'; import { BaseTool } from './types'; /** * Schema for grep operations */ export declare const GrepToolSchema: z.ZodObject<{ pattern: z.ZodString; file: z.ZodString; flags: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { file: string; pattern: string; flags?: string | undefined; }, { file: string; pattern: string; flags?: string | undefined; }>; export type GrepToolArgs = z.infer<typeof GrepToolSchema>; /** * Grep tool for searching patterns in files */ export declare class GrepTool extends BaseTool { name: string; description: string; schema: z.ZodObject<{ pattern: z.ZodString; file: z.ZodString; flags: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { file: string; pattern: string; flags?: string | undefined; }, { file: string; pattern: string; flags?: string | undefined; }>; execute(args: GrepToolArgs, abortSignal?: AbortSignal): Promise<string>; }