/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
import { join } from 'node:path';
function resolveAutomationStoreRootDir(config) {
    const controlPlaneDir = config.controlPlaneDir ?? (typeof config.getControlPlaneConfigDir === 'function'
        ? config.getControlPlaneConfigDir()
        : undefined);
    if (!controlPlaneDir) {
        throw new Error('Automation stores require an explicit controlPlaneDir or configManager.getControlPlaneConfigDir().');
    }
    return controlPlaneDir;
}
export function resolveAutomationStorePath(filename, config) {
    return join(resolveAutomationStoreRootDir(config), filename);
}
