/**
 * 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 { JsonObject } from "../types/common.js";
import type { NeuroLinkExecutionContext } from "../types/mcpTypes.js";
import type { MCPServerTool, MCPToolAnnotations } from "./toolAnnotations.js";
/**
 * Agent definition for MCP exposure
 */
export type ExposableAgent = {
    /**
     * Unique agent identifier
     */
    id: string;
    /**
     * Human-readable agent name
     */
    name: string;
    /**
     * Agent description for AI models
     */
    description: string;
    /**
     * Input schema for the agent
     */
    inputSchema?: JsonObject;
    /**
     * Output schema for the agent
     */
    outputSchema?: JsonObject;
    /**
     * Agent execution function
     */
    execute: (input: unknown, context?: NeuroLinkExecutionContext) => Promise<unknown>;
    /**
     * Additional agent metadata
     */
    metadata?: {
        version?: string;
        author?: string;
        category?: string;
        tags?: string[];
        estimatedDuration?: number;
        costHint?: number;
    };
};
/**
 * Workflow definition for MCP exposure
 */
export type ExposableWorkflow = {
    /**
     * Unique workflow identifier
     */
    id: string;
    /**
     * Human-readable workflow name
     */
    name: string;
    /**
     * Workflow description
     */
    description: string;
    /**
     * Workflow steps (for documentation)
     */
    steps?: Array<{
        id: string;
        name: string;
        description?: string;
    }>;
    /**
     * Input schema for the workflow
     */
    inputSchema?: JsonObject;
    /**
     * Output schema for the workflow
     */
    outputSchema?: JsonObject;
    /**
     * Workflow execution function
     */
    execute: (input: unknown, context?: NeuroLinkExecutionContext) => Promise<unknown>;
    /**
     * Workflow metadata
     */
    metadata?: {
        version?: string;
        author?: string;
        category?: string;
        tags?: string[];
        estimatedDuration?: number;
        retriable?: boolean;
        idempotent?: boolean;
    };
};
/**
 * Options for exposing agents/workflows as MCP tools
 */
export type ExposureOptions = {
    /**
     * Prefix for tool names
     */
    prefix?: string;
    /**
     * Default annotations for all exposed tools
     */
    defaultAnnotations?: MCPToolAnnotations;
    /**
     * Whether to include metadata in tool description
     */
    includeMetadataInDescription?: boolean;
    /**
     * Custom name transformer
     */
    nameTransformer?: (name: string) => string;
    /**
     * Add execution context wrapper
     */
    wrapWithContext?: boolean;
    /**
     * Timeout for agent/workflow execution (ms)
     */
    executionTimeout?: number;
    /**
     * Enable execution logging
     */
    enableLogging?: boolean;
};
/**
 * Exposure result
 */
export type ExposureResult = {
    /**
     * Generated MCP tool
     */
    tool: MCPServerTool;
    /**
     * Original source type
     */
    sourceType: "agent" | "workflow";
    /**
     * Original source ID
     */
    sourceId: string;
    /**
     * Generated tool name
     */
    toolName: string;
};
/**
 * 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;
