@xynehq/jaf
Version:
Juspay Agent Framework - A purely functional agent framework with immutable state and composable tools
27 lines • 2.12 kB
TypeScript
/**
* JAF ADK Layer - Tool System
*
* Functional tool creation, execution, and integration utilities
*/
import { Tool, ToolParameter, ToolContext, ToolResult, ToolMetadata, OpenAPISpec, ValidationResult, createToolError, FunctionToolConfig } from '../types';
export declare const createFunctionTool: (config: FunctionToolConfig) => Tool;
export declare const createFunctionToolLegacy: (name: string, description: string, func: (params: Record<string, unknown>, context: ToolContext) => unknown | Promise<unknown>, parameters?: ToolParameter[], metadata?: Partial<ToolMetadata>) => Tool;
export declare const createAsyncFunctionTool: (config: FunctionToolConfig) => Tool;
export declare const createOpenAPIToolset: (spec: OpenAPISpec) => Promise<Tool[]>;
export declare const createCrewAIAdapter: (crewAITool: any) => Tool;
export declare const createLangChainAdapter: (langChainTool: any) => Tool;
export declare const validateTool: (tool: Tool) => ValidationResult<Tool>;
export declare const validateToolParameter: (param: ToolParameter) => ValidationResult<ToolParameter>;
export declare const validateToolParameters: (params: Record<string, unknown>, paramSchema: ToolParameter[]) => ValidationResult<Record<string, unknown>>;
export declare const executeTool: (tool: Tool, params: Record<string, unknown>, context: ToolContext) => Promise<ToolResult>;
export declare const executeTools: (tools: Tool[], params: Record<string, Record<string, unknown>>, context: ToolContext) => Promise<Record<string, ToolResult>>;
export declare const getToolByName: (tools: Tool[], name: string) => Tool | null;
export declare const hasToolByName: (tools: Tool[], name: string) => boolean;
export declare const filterToolsBySource: (tools: Tool[], source: ToolMetadata["source"]) => Tool[];
export declare const getToolNames: (tools: Tool[]) => string[];
export declare const cloneTool: (tool: Tool) => Tool;
export { createToolError };
export declare const createEchoTool: () => Tool;
export declare const createCalculatorTool: () => Tool;
export declare const createTimestampTool: () => Tool;
//# sourceMappingURL=index.d.ts.map