```ts
/**
 * Finds the best rate path for currency conversion based on given quotes.
 * @param quotes - An array of quotes, each being a three-element array [base, counter, micro].
 * @param amount - The initial amount to convert.
 * @param source - The source currency code.
 * @param destination - The destination currency code.
 * @returns A mapping with "amount" and "path".
 */
export function bestRatePath(quotes: unknown[][], amount: number, source: string, destination: string): Record<string, unknown> {
    if (!Array.isArray(quotes) || quotes.length === 0) {
        throw new Error("Quotes list is empty.");
    }

    const parsedQuotes = quotes.map((quote) => {
        if (!Array.isArray(quote) || quote.length !== 3) {
            throw new Error("Each quote must be a three-element array.");
        }
        const [base, counter, micro] = quote;
        if (typeof base !== 'string' || typeof counter !== 'string' || typeof micro !== 'number') {
            throw new Error("Invalid quote format.");
        }
        if (base.trim() === '' || counter.trim() === '') {
            throw new Error("Currency codes must be non-empty strings.");
        }
        if (base === counter) {
            throw new Error("Base and counter currency codes must be different.");
        }
        if (!Number.isSafeInteger(micro) || micro <= 0) {
            throw new Error("Micro value must be a positive whole number.");
        }
        return { base, counter, micro };
    });

    const codeSet = new Set<string>();
    parsedQuotes.forEach(({ base, counter }) => {
        codeSet.add(base);
        codeSet.add(counter);
    });

    if (!codeSet.has(source) || !codeSet.has(destination)) {
        throw new Error("Source or destination currency is not named by any quote.");
    }

    if (source === destination) {
        throw new Error("Source and destination cannot be the same code.");
    }

    const graph: Record<string, { counter: string, micro: number }[]> = {};
    parsedQuotes.forEach(({ base, counter, micro }) => {
        if (!graph[base]) {
            graph[base] = [];
        }
        graph[base].push({ counter, micro });
    });

    let bestPath: string[] | null = null;
    let bestAmount = 0;

    function dfs(currentCode: string, currentPath: string[], remainingAmount: number) {
        if (currentCode === destination) {
            if (!bestPath || currentPath.length < bestPath.length || 
                (currentPath.length === bestPath.length && currentPath.join(',') < bestPath.join(','))) {
                bestPath = [...currentPath];
                bestAmount = remainingAmount;
            }
            return;
        }

        if (graph[currentCode]) {
            for (const { counter, micro } of graph[currentCode]) {
                if (!currentPath.includes(counter)) {
                    const newAmount = Math.floor(remainingAmount * micro / 1_000_000);
                    dfs(counter, [...currentPath, counter], newAmount);
                }
            }
        }
    }

    dfs(source, [source], amount);

    if (!bestPath) {
        throw new Error("No run connects the source and destination.");
    }

    return { amount: bestAmount, path: bestPath };
}
```