import type { ToolSet } from "../types/index.js"; /** * Result type for toolset name validation */ interface ToolsetNameValidationResult { isValid: boolean; sanitized?: ToolSet; error?: string; } /** * Result type for tool sets array validation */ interface ToolSetsValidationResult { valid: ToolSet[]; invalid: unknown[]; errors: string[]; } /** * Validates and sanitizes a single toolset name * @param toolsetName - The toolset name to validate * @param availableToolsets - Optional array of available toolsets for validation * @returns Validation result with sanitized name if valid * * @example * ```typescript * const result = validateAndSanitizeToolsetName(" search "); * if (result.isValid) { * console.log(result.sanitized); // "search" * } else { * console.error(result.error); * } * ``` */ export declare function validateAndSanitizeToolsetName(toolsetName: unknown, availableToolsets?: ToolSet[]): ToolsetNameValidationResult; /** * Validates an array of toolset names * @param toolSets - Array of toolset names to validate * @returns Validation result with separated valid and invalid entries * * @example * ```typescript * const result = validateToolSets(["search", "", "invalid", "quotes"]); * console.log(result.valid); // ["search", "quotes"] * console.log(result.invalid); // ["", "invalid"] * console.log(result.errors); // ["Empty tool set found", "Toolset 'invalid' not found..."] * ``` */ export declare function validateToolSets(toolSets: unknown[]): ToolSetsValidationResult; /** * Validates a dynamic tool discovery configuration value * @param value - The configuration value to validate * @returns True if the value represents enabled dynamic tool discovery * * @example * ```typescript * validateDynamicToolDiscoveryConfig("true"); // true * validateDynamicToolDiscoveryConfig("TRUE"); // true * validateDynamicToolDiscoveryConfig("false"); // false * validateDynamicToolDiscoveryConfig("invalid"); // false (logs warning) * ``` */ export declare function validateDynamicToolDiscoveryConfig(value: unknown): boolean; /** * Parses a comma-separated string of toolset names with validation * @param input - Comma-separated string of toolset names * @returns Array of valid toolset names (invalid ones are filtered out with warnings) * * @example * ```typescript * const toolsets = parseCommaSeparatedToolSets("search, company, invalid, quotes"); * console.log(toolsets); // ["search", "company", "quotes"] (invalid is filtered out) * ``` */ export declare function parseCommaSeparatedToolSets(input: string): ToolSet[]; /** * Validates that modules exist for given toolset names * @param toolsetNames - Array of toolset names to check * @param getModulesForToolSets - Function to get modules for toolsets * @returns Validation result indicating if modules were found * * @example * ```typescript * const result = validateToolsetModules(["search"], getModulesForToolSets); * if (!result.isValid) { * console.error(result.error); * } * ``` */ export declare function validateToolsetModules(toolsetNames: ToolSet[], getModulesForToolSets: (toolsets: ToolSet[]) => string[]): { isValid: boolean; modules?: string[]; error?: string; }; /** * Compares two arrays of strings for order-insensitive equality. * Treats inputs as multisets: element counts must match. */ export declare function areStringSetsEqual(a: string[], b: string[]): boolean; export {};