/**
 * Represents a user-defined custom command loaded from a file.
 */
export interface CustomCommand {
    /** The command name (without slash). */
    name: string;
    /** Optional description of the command. */
    description?: string;
    /** The command prompt content. */
    prompt: string;
    /** Path to the defining file. */
    filePath: string;
}
/**
 * Loads and manages custom commands from .codebuddy/commands directories.
 * Scans both project-specific and global (user home) directories.
 */
export declare class CustomCommandLoader {
    private projectCommandsDir;
    private globalCommandsDir;
    private commandCache;
    private lastScanTime;
    private scanInterval;
    constructor();
    /**
     * Scans directories for command files if the cache is stale.
     */
    private scanCommands;
    /**
     * Scans a specific directory for .md command files.
     *
     * @param dir - Directory path to scan.
     */
    private scanDirectory;
    /**
     * Parses the content of a command file.
     *
     * @param name - Command name.
     * @param content - File content.
     * @param filePath - Path to file.
     * @returns Parsed CustomCommand object.
     */
    private parseCommandFile;
    /**
     * Retrieves a command by name.
     *
     * @param name - Command name.
     * @returns The custom command or null if not found.
     */
    getCommand(name: string): Promise<CustomCommand | null>;
    /**
     * Retrieves all available custom commands.
     *
     * @returns Array of custom commands.
     */
    getAllCommands(): Promise<CustomCommand[]>;
    /**
     * Expands a command prompt with provided arguments and environment variables.
     *
     * @param name - Command name.
     * @param args - Arguments string.
     * @returns The expanded prompt string or null if command not found.
     */
    expandCommand(name: string, args?: string): Promise<string | null>;
    /**
     * Creates a new custom command file.
     *
     * @param name - Command name.
     * @param prompt - Command prompt content.
     * @param description - Optional description.
     * @param global - Whether to create in global directory (default: false).
     * @returns Path to the created file.
     */
    createCommand(name: string, prompt: string, description?: string, global?: boolean): Promise<string>;
    /**
     * Deletes a custom command.
     *
     * @param name - Command name.
     * @returns True if deleted, false if not found.
     */
    deleteCommand(name: string): Promise<boolean>;
    /**
     * Formats a list of commands for display.
     *
     * @returns Formatted string.
     */
    formatCommandList(): string;
    /**
     * Returns help text explaining the custom command system.
     *
     * @returns Help text string.
     */
    formatHelp(): string;
}
/**
 * Gets the singleton instance of CustomCommandLoader.
 *
 * @returns The singleton instance.
 */
export declare function getCustomCommandLoader(): CustomCommandLoader;
