import { WordPressClient } from "../client/api.js"; import type { MCPToolSchema } from "../types/mcp.js"; /** * Provides authentication-related tools for WordPress sites. * This class encapsulates tool definitions and their corresponding handlers. */ export declare class AuthTools { /** * Retrieves the list of authentication tools. * @returns An array of MCPTool definitions. */ getTools(): Array<{ name: string; description: string; inputSchema?: MCPToolSchema; handler: (client: WordPressClient, params: Record) => Promise; }>; /** * Handles the 'wp_test_auth' tool request. * It tests the connection and fetches user details upon success. * @param client - The WordPressClient instance for the target site. * @param params - The parameters for the tool request. * @returns A promise that resolves to an MCPToolResponse. */ handleTestAuth(client: WordPressClient, params: Record): Promise>; /** * Handles the 'wp_get_auth_status' tool request. * Reports whether the client is currently authenticated. * @param client - The WordPressClient instance for the target site. * @param params - The parameters for the tool request. * @returns A promise that resolves to an MCPToolResponse. */ handleGetAuthStatus(client: WordPressClient, params: Record): Promise>; /** * Handles the 'wp_switch_auth_method' tool request. * Verifies the requested method's credentials with an isolated client so * the shared per-site client used by other tool invocations is never * mutated in place. * @param client - The WordPressClient instance for the target site. * @param params - The parameters for the tool request, including the new auth details. * @returns A promise that resolves to an MCPToolResponse. */ handleSwitchAuthMethod(client: WordPressClient, params: Record): Promise; private verifyAuthConfig; /** * Builds a client AuthConfig for the requested method, validating that * its required fields were provided. Mirrors ConfigurationSchema's * per-method requirements so this tool and startup configuration agree * on what each method actually needs. */ private buildAuthConfig; } export default AuthTools; //# sourceMappingURL=auth.d.ts.map