/** * Operation Router for MCP-AQL * * Maps MCP operations to CRUD endpoints (CREATE, READ, UPDATE, DELETE) * and their corresponding handler implementations. * * This routing table enables the unified MCP-AQL endpoint to dispatch * operations to the appropriate handlers based on their semantic meaning. */ export type CRUDEndpoint = 'CREATE' | 'READ' | 'UPDATE' | 'DELETE' | 'EXECUTE'; /** * Handler reference in dot notation format: "Module.method" * Examples: "ElementCRUD.create", "Memory.addEntry", "Agent.execute" * * The format is resolved by MCPAQLHandler to actual manager method calls. * @see src/handlers/mcp-aql/MCPAQLHandler.ts for resolution logic */ export type HandlerReference = `${string}.${string}`; /** * Route definition for an MCP operation */ export interface OperationRoute { /** CRUD endpoint this operation maps to */ endpoint: CRUDEndpoint; /** Handler method responsible for executing this operation (format: "Module.method") */ handler: HandlerReference; /** Optional description of what this operation does */ description?: string; /** Alternative names that resolve to this operation */ aliases?: string[]; /** Parameters automatically injected when this operation is dispatched (merged under user params) */ implicitParams?: Record; } /** * Complete mapping of MCP operations to their CRUDE endpoints and handlers. * * Endpoint semantics (CRUDE = CRUD + Execute): * - CREATE: Operations that create new state (readOnly: false, destructive: false) * - READ: Operations that only read existing state (readOnly: true, destructive: false) * - UPDATE: Operations that modify existing state (readOnly: false, destructive: true) * - DELETE: Operations that remove state (readOnly: false, destructive: true) * - EXECUTE: Operations for runtime execution lifecycle (readOnly: false, destructive: false, stateful: true) */ export declare const OPERATION_ROUTES: Record; /** * Get the route definition for a given operation name. * * @param operation - The operation name (e.g., 'create_element', 'list_elements') * @returns The route definition, or undefined if the operation is not found * * @example * ```typescript * const route = getRoute('create_element'); * // { endpoint: 'CREATE', handler: 'ElementCRUD.create', description: '...' } * ``` */ /** * Resolve an operation name to its canonical form, checking aliases. * Returns the canonical operation name, or the input if no alias matches. */ export declare function resolveOperationName(operation: string): string; export declare function getRoute(operation: string): OperationRoute | undefined; /** * Get all operations that map to a specific CRUD endpoint. * * @param endpoint - The CRUD endpoint ('CREATE', 'READ', 'UPDATE', 'DELETE') * @returns Array of operation names that map to this endpoint * * @example * ```typescript * const createOps = getOperationsForEndpoint('CREATE'); * // ['create_element', 'import_element', 'addEntry'] * ``` */ export declare function getOperationsForEndpoint(endpoint: CRUDEndpoint): string[]; //# sourceMappingURL=OperationRouter.d.ts.map