/** * Built-in Tools - Common utility tools * * Provides file, search, and web scraping tools. */ /** * Tool result */ export interface ToolResult { success: boolean; data?: T; error?: string; } /** * Read file tool */ export declare function readFile(path: string): Promise>; /** * Write file tool */ export declare function writeFile(path: string, content: string): Promise>; /** * List directory tool */ export declare function listDir(path: string): Promise>; /** * File exists tool */ export declare function fileExists(path: string): Promise>; /** * Get file stats */ export declare function fileStats(path: string): Promise>; /** * Simple text search in content */ export declare function searchText(content: string, query: string, options?: { caseSensitive?: boolean; }): ToolResult<{ matches: number; lines: number[]; }>; /** * Grep-like search in files */ export declare function grepFiles(pattern: string, paths: string[], options?: { caseSensitive?: boolean; }): Promise>>; /** * Fetch URL content */ export declare function fetchUrl(url: string, options?: { headers?: Record; }): Promise>; /** * Simple HTML to text converter */ export declare function htmlToText(html: string): string; /** * Scrape webpage */ export declare function scrapeUrl(url: string): Promise>; /** * Execute shell command (safe version - read-only commands) */ export declare function shell(command: string): Promise>; /** * JSON parse tool */ export declare function parseJson(text: string): ToolResult; /** * Current time tool */ export declare function getCurrentTime(): ToolResult<{ iso: string; unix: number; formatted: string; }>; /** * Built-in tools registry */ export declare const builtinTools: { readFile: typeof readFile; writeFile: typeof writeFile; listDir: typeof listDir; fileExists: typeof fileExists; fileStats: typeof fileStats; searchText: typeof searchText; grepFiles: typeof grepFiles; fetchUrl: typeof fetchUrl; scrapeUrl: typeof scrapeUrl; htmlToText: typeof htmlToText; shell: typeof shell; parseJson: typeof parseJson; getCurrentTime: typeof getCurrentTime; }; export default builtinTools;