solver-sdk
Version:
SDK for WorkAI API - AI-powered code analysis with WorkCoins billing system
61 lines • 2.27 kB
TypeScript
/**
* 🔧 API для работы с инструментами
*/
import { IHttpClient } from '../interfaces/http-client.js';
export interface ToolSchema {
name: string;
description: string;
input_schema: {
type: 'object';
properties: Record<string, any>;
required?: string[];
};
}
export interface ToolsResponse {
tools: ToolSchema[];
version: string;
total: number;
}
/**
* 🔧 API для работы с инструментами ИИ
*/
export declare class ToolsApi {
private readonly httpClient;
constructor(httpClient: IHttpClient);
/**
* 📋 Получает все доступные схемы инструментов
* @returns Список всех инструментов с их схемами
*/
getSchemas(): Promise<ToolsResponse>;
/**
* 🔍 Поиск инструмента по имени
* @param name Имя инструмента
* @returns Схема инструмента или null
*/
findToolByName(name: string): Promise<ToolSchema | null>;
/**
* 📊 Получает статистику доступных инструментов
* @returns Информация о количестве и типах инструментов
*/
getToolsStats(): Promise<{
total: number;
categories: Record<string, number>;
mostUsed?: string[];
}>;
/**
* ✅ Валидирует схему инструмента
* @param tool Схема инструмента для валидации
* @returns true если схема корректна
*/
validateToolSchema(tool: ToolSchema): boolean;
/**
* 🔧 Создает базовую схему инструмента
* @param name Имя инструмента
* @param description Описание
* @param properties Свойства входных параметров
* @param required Обязательные параметры
* @returns Готовая схема инструмента
*/
createToolSchema(name: string, description: string, properties: Record<string, any>, required?: string[]): ToolSchema;
}
//# sourceMappingURL=tools-api.d.ts.map