UNPKG

@dev-fastn-ai/ucl-sdk

Version:

Fastn UCL SDK - A robust TypeScript SDK for integrating AI agents with Fastn UCL

110 lines 2.67 kB
export interface UCLConfig { authToken: string; spaceId: string; environment?: 'DRAFT' | 'LIVE'; baseUrl?: string; llmConfig?: LLMConfig; } export interface ToolParameter { type: string; title?: string; description?: string; required?: string[]; properties?: Record<string, any>; } export interface ToolFunction { name: string; parameters: ToolParameter; description: string; } export interface Tool { type: 'function'; actionId: string; function: ToolFunction; } export interface Connector { id: string; name: string; description: string; status: 'ACTIVE' | 'INACTIVE'; } export interface GetToolsResponse { success: boolean; data: Tool[]; error?: string; } export interface ExecuteToolRequest { actionId: string; parameters: Record<string, any>; } export interface ExecuteToolResponse { success: boolean; data: any; error?: string; } export interface GetConnectorsResponse { success: boolean; data: Connector[]; error?: string; } export interface ToolAnalysisResult { requiresTool: boolean; requiresConnection?: boolean; connector?: Connector; tool?: Tool; parameters?: Record<string, any>; missingParameters?: string[]; executionResult?: any; llmResponse?: string; llmPrompt?: string; message?: string; executeToolResponse?: any; executeToolError?: string; executeToolMessage?: string; } export interface UserMessageAnalysis { originalMessage: string; analysis: ToolAnalysisResult; processedMessage?: string; shouldProcessWithCustomLogic?: boolean; } export interface UCLCoreError extends Error { code: string; statusCode?: number; details?: any; } export interface LLMConfig { provider: 'openai' | 'claude' | 'gemini'; apiKey: string; model?: string; temperature?: number; maxTokens?: number; } export interface MessageProcessingOptions { autoExecute?: boolean; tenantId: string; } export interface ProcessMessageResult { success: boolean; analysis: ToolAnalysisResult; } export interface FrontendMessageRequest { message: string; sessionId?: string; userId?: string; options?: MessageProcessingOptions; } export interface FrontendMessageResponse { success: boolean; data?: any; toolExecuted?: boolean; toolName?: string; missingParameters?: string[]; connectorStatus?: 'ACTIVE' | 'INACTIVE' | 'NOT_FOUND'; shouldProcessWithCustomLogic?: boolean; requiresAuthentication?: boolean; authUrl?: string; error?: string; message?: string; } //# sourceMappingURL=index.d.ts.map