/**
 * Plugin loading options.
 */
export interface LoadPluginOptions {
  /**
   * Whether to auto-discover file-based plugins from disk.
   * Defaults to true.
   */
  useDirectory?: boolean;

  /**
   * If true, caches the result of the first successful load and reuses it for all future calls.
   * Later calls with different options will return the original cached result.
   * Defaults to false.
   */
  cache?: boolean;
}

/**
 * Loads and merges built-in plugins with custom plugin names or discovered plugins.
 *
 * @param names - Optional list of plugin names to define manually.
 * @param options - Plugin loading options.
 * @returns A merged plugin map (e.g., { PLUGIN_NAME: "PLUGIN_NAME" }).
 */
export function loadPlugins(
  names?: string[],
  options?: LoadPluginOptions
): Record<string, string>;
