/** * UnifiedEndpoint - Single unified MCP-AQL endpoint handler (Issue #196) * * This handler provides a single `mcp_aql` endpoint as an alternative to the * 4 CRUD endpoints for users who want minimal token footprint (~300-400 tokens * vs ~943 tokens for 4 endpoints). * * ARCHITECTURE: * - Single entry point for all MCP-AQL operations * - Routes internally to appropriate MCPAQLHandler methods * - Uses Gatekeeper (PermissionGuard) for all permission checks * - Maintains full security with minimal client-side footprint * * USE CASES: * - Multi-server deployments where token budget is constrained * - Clients that prefer simpler tool interfaces * - Integration scenarios where 4 endpoints create complexity * * SECURITY: * - All operations pass through PermissionGuard.validate() * - Operation routing is determined server-side, not client-side * - Full audit logging for all operations */ import { MCPAQLHandler } from './MCPAQLHandler.js'; import { OperationResult, BatchResult } from './types.js'; /** * UnifiedEndpoint - Single entry point for all MCP-AQL operations * * This class wraps MCPAQLHandler to provide a unified endpoint that * automatically routes operations to the correct CRUD handler based * on the operation name. * * SECURITY NOTE: * Unlike the 4-endpoint mode where the client chooses which endpoint to call, * in single-endpoint mode the server determines the appropriate handler * based on the operation name. This means: * 1. The client cannot bypass security by calling the wrong endpoint * 2. All routing is enforced server-side via PermissionGuard * 3. The operation-to-endpoint mapping is authoritative */ export declare class UnifiedEndpoint { private readonly mcpAqlHandler; constructor(mcpAqlHandler: MCPAQLHandler); /** * Handle any MCP-AQL operation through the unified endpoint. * * This method: * 1. Validates input structure * 2. Determines the correct CRUD endpoint for the operation * 3. Routes to the appropriate handler method * 4. Returns standardized OperationResult or BatchResult * * @param input - Operation input with operation name and params, or BatchRequest * @returns OperationResult or BatchResult with success/failure status */ handle(input: unknown): Promise; /** * Route input to the appropriate CRUD handler based on endpoint type. * * @param endpoint - The CRUD endpoint determined from operation routing * @param input - The validated operation input * @returns OperationResult or BatchResult from the handler */ private routeToHandler; /** * Build response metadata with correlation ID and timing. * Issue #301: Request correlation support. */ private buildMeta; /** * Create a failed operation result */ private failure; } /** * Get all available operations with their endpoint mappings. * This is useful for documentation and help text. * * @returns Map of operation names to their CRUDE endpoints */ export declare function getOperationHelp(): string; //# sourceMappingURL=UnifiedEndpoint.d.ts.map