import { Ai } from './ai.ts'; import { LLMRequest } from './llm.ts'; export type AiToolArg = { [key: string]: { /** Argument type */ type: 'array' | 'boolean' | 'number' | 'object' | 'string'; /** Argument description */ description: string; /** Required argument */ required?: boolean; /** Default value */ default?: any; /** Options */ enum?: string[]; /** Minimum value or length */ min?: number; /** Maximum value or length */ max?: number; /** Match pattern */ pattern?: string; /** Child arguments */ items?: { [key: string]: AiToolArg; }; }; }; export type AiTool = { /** Tool ID / Name - Must be snail_case */ name: string; /** Tool description / prompt */ description: string; /** Tool arguments */ args?: AiToolArg; /** Callback function */ fn: (args: any, stream: LLMRequest['stream'], ai: Ai, toolId?: string) => any | Promise; }; export declare function convertSchema(schema: any): any; export declare const ExecCliTool: AiTool; export declare const ExecJSTool: AiTool; export declare const ExecPythonTool: AiTool; export declare const ExecTool: AiTool; export declare const FsDeleteTool: (whitelist?: null | string[]) => AiTool; export declare const FsMoveTool: (whitelist?: null | string[]) => AiTool; export declare const FsReadTool: (whitelist?: null | string[]) => AiTool; export declare const FsSearchTool: (whitelist?: null | string[]) => AiTool; export declare const FsWriteTool: (whitelist?: null | string[]) => AiTool; export declare const GetPathsTool: AiTool; export declare const GetDatetimeTool: AiTool; export declare const GetDevice: AiTool; export declare const GetWikipediaTool: AiTool; export declare const GeoCodeTool: AiTool; export declare const GeoWeatherTool: AiTool; export declare const WebFetchTool: AiTool; export declare const WebFlareSolverTool: (host: string) => { name: string; description: string; args: { url: { type: string; description: string; required: boolean; }; cmd: { type: string; description: string; enum: string[]; default: string; }; maxTimeout: { type: string; description: string; default: number; }; postData: { type: string; description: string; }; }; fn: ({ url, cmd, maxTimeout, postData }: { url: any; cmd: any; maxTimeout: any; postData: any; }) => Promise; }; export declare const WebReadTool: AiTool; export declare const WebSearchTool: AiTool;