UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

244 lines (243 loc) 6.98 kB
/** * Direct Tool Definitions for NeuroLink CLI Agent * Simple, reliable tools that work immediately with Vercel AI SDK */ import type { AllToolsMap, BasicToolsMap, FilesystemToolsMap, UtilityToolsMap } from "../types/index.js"; /** * Direct tool definitions that work immediately with Gemini/AI SDK * These bypass MCP complexity and provide reliable agent functionality */ export declare const directAgentTools: { getCurrentTime: import("ai").Tool<{ timezone?: string | undefined; }, { success: boolean; time: string; timezone: string; iso: string; timestamp?: undefined; error?: undefined; } | { success: boolean; time: string; iso: string; timestamp: number; timezone?: undefined; error?: undefined; } | { success: boolean; error: string; time?: undefined; timezone?: undefined; iso?: undefined; timestamp?: undefined; }>; readFile: import("ai").Tool<{ path: string; }, { success: boolean; error: string; content?: undefined; size?: undefined; path?: undefined; lastModified?: undefined; } | { success: boolean; content: string; size: number; path: string; lastModified: string; error?: undefined; } | { success: boolean; error: string; path: string; content?: undefined; size?: undefined; lastModified?: undefined; }>; listDirectory: import("ai").Tool<{ path: string; includeHidden: boolean; }, { success: boolean; path: string; items: { name: string; type: string; size: number | undefined; lastModified: string; }[]; count: number; error?: undefined; } | { success: boolean; error: string; path: string; items?: undefined; count?: undefined; }>; calculateMath: import("ai").Tool<{ expression: string; precision: number; }, { success: boolean; error: string; expression?: undefined; result?: undefined; type?: undefined; } | { success: boolean; expression: string; result: any; type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; error?: undefined; } | { success: boolean; error: string; expression: string; result?: undefined; type?: undefined; }>; writeFile: import("ai").Tool<{ path: string; content: string; mode: "append" | "create" | "overwrite"; }, { success: boolean; error: string; path?: undefined; mode?: undefined; size?: undefined; written?: undefined; } | { success: boolean; path: string; mode: "append" | "create" | "overwrite"; size: number; written: number; error?: undefined; } | { success: boolean; error: string; path: string; mode?: undefined; size?: undefined; written?: undefined; }>; analyzeCSV: import("ai").Tool<{ filePath: string; operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe"; column: string; maxRows: number; }, { success: boolean; operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe"; column: string; result: string; rowCount: number; } | { success: boolean; error: string; operation?: undefined; column?: undefined; } | { success: boolean; error: string; operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe"; column: string; }>; websearchGrounding: import("ai").Tool<{ query: string; maxResults: number; maxWords: number; }, { success: boolean; error: string; requiredEnvVars: string[]; query?: undefined; searchResults?: undefined; rawContent?: undefined; totalResults?: undefined; provider?: undefined; model?: undefined; responseTime?: undefined; timestamp?: undefined; grounded?: undefined; } | { success: boolean; error: string; query: string; requiredEnvVars?: undefined; searchResults?: undefined; rawContent?: undefined; totalResults?: undefined; provider?: undefined; model?: undefined; responseTime?: undefined; timestamp?: undefined; grounded?: undefined; } | { success: boolean; query: string; searchResults: { title: string; url: string; snippet: string; domain: string; }[]; rawContent: string; totalResults: number; provider: string; model: string; responseTime: number; timestamp: number; grounded: boolean; error?: undefined; requiredEnvVars?: undefined; } | { success: boolean; error: string; query: string; provider: string; requiredEnvVars?: undefined; searchResults?: undefined; rawContent?: undefined; totalResults?: undefined; model?: undefined; responseTime?: undefined; timestamp?: undefined; grounded?: undefined; }>; }; /** * Bash command execution tool - exported separately for opt-in use. * * SECURITY: This tool is NOT included in directAgentTools by default. * It must be explicitly enabled via: * - Environment variable: NEUROLINK_ENABLE_BASH_TOOL=true * - Config: toolConfig.enableBashTool = true * * Import this directly when you need bash execution capabilities: * import { bashTool } from '../agent/directTools.js'; */ export declare const bashTool: import("ai").Tool<{ command: string; timeout: number; cwd?: string | undefined; }, unknown>; /** * Get a subset of tools for specific use cases with improved type safety */ export declare function getToolsForCategory(category: "basic"): BasicToolsMap; export declare function getToolsForCategory(category: "filesystem"): FilesystemToolsMap; export declare function getToolsForCategory(category: "utility"): UtilityToolsMap; export declare function getToolsForCategory(category: "all"): AllToolsMap; /** * Get tool names for validation */ export declare function getAvailableToolNames(): string[]; /** * Validate that all tools have proper structure */ export declare function validateToolStructure(): boolean;