/** * Command discovery utilities - handles command file discovery and listing */ /** * Default commands directory */ export declare const DEFAULT_COMMANDS_DIR: string; /** * Command file extension */ export declare const COMMAND_FILE_EXTENSION = ".md"; /** * Maximum allowed length for command names */ export declare const MAX_COMMAND_NAME_LENGTH = 50; /** * Maximum allowed size for command files (in bytes) */ export declare const MAX_COMMAND_FILE_SIZE: number; /** * Validate command name for security * Prevents path traversal and injection attacks */ export declare function validateCommandName(commandName: string): void; /** * Validate commands directory path */ export declare function validateCommandsDirectory(commandsDir: string): void; /** * Discover all available command files */ export declare function discoverCommandFiles(commandsDir?: string): Promise; /** * Filter out template and meta files from command list */ export declare function filterCommandFiles(files: string[]): string[]; /** * Extract command name from file name with validation */ export declare function extractCommandName(fileName: string): string; /** * Convert command files to command names */ export declare function filesToCommandNames(files: string[]): string[]; /** * Get all available command names */ export declare function listAvailableCommands(commandsDir?: string): Promise; /** * Check if a command file exists */ export declare function commandFileExists(commandName: string, commandsDir?: string): Promise; /** * Get the full path to a command file * Validates inputs to prevent path traversal attacks */ export declare function getCommandFilePath(commandName: string, commandsDir?: string): string; /** * Validate command file size and accessibility */ export declare function validateCommandFile(filePath: string, commandName: string): Promise; /** * Load all command files with error handling */ export declare function loadAllCommandFiles(commandsDir?: string): Promise<{ invalid: Array<{ error: string; name: string; }>; valid: string[]; }>; //# sourceMappingURL=command-discovery.d.ts.map