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

84 lines (83 loc) 2.48 kB
/** * Agent and Workflow Exposure as MCP Tools * * Enables exposing NeuroLink agents and workflows as MCP tools, * allowing external MCP clients to invoke complex AI operations * through the standardized MCP protocol. * * @module mcp/agentExposure * @since 8.39.0 */ import type { MCPServerTool, ExposableAgent, ExposableWorkflow, ExposureOptions, ExposureResult } from "../types/index.js"; /** * Expose an agent as an MCP tool */ export declare function exposeAgentAsTool(agent: ExposableAgent, options?: ExposureOptions): ExposureResult; /** * Expose a workflow as an MCP tool */ export declare function exposeWorkflowAsTool(workflow: ExposableWorkflow, options?: ExposureOptions): ExposureResult; /** * Batch expose agents as MCP tools */ export declare function exposeAgentsAsTools(agents: ExposableAgent[], options?: ExposureOptions): ExposureResult[]; /** * Batch expose workflows as MCP tools */ export declare function exposeWorkflowsAsTools(workflows: ExposableWorkflow[], options?: ExposureOptions): ExposureResult[]; /** * Agent Exposure Manager * * Manages the lifecycle of exposed agents and workflows, * providing registration, lookup, and invocation capabilities. */ export declare class AgentExposureManager { private exposedTools; private options; constructor(options?: ExposureOptions); /** * Expose an agent and register it */ exposeAgent(agent: ExposableAgent): MCPServerTool; /** * Expose a workflow and register it */ exposeWorkflow(workflow: ExposableWorkflow): MCPServerTool; /** * Get all exposed tools */ getExposedTools(): MCPServerTool[]; /** * Get exposed tool by name */ getExposedTool(toolName: string): MCPServerTool | undefined; /** * Get exposure result by tool name */ getExposureResult(toolName: string): ExposureResult | undefined; /** * Get tools by source type */ getToolsBySourceType(sourceType: "agent" | "workflow"): MCPServerTool[]; /** * Remove exposed tool */ unexpose(toolName: string): boolean; /** * Clear all exposed tools */ clear(): void; /** * Get statistics */ getStatistics(): { totalExposed: number; exposedAgents: number; exposedWorkflows: number; toolNames: string[]; }; } /** * Global agent exposure manager instance */ export declare const globalAgentExposureManager: AgentExposureManager;