function isHostConfigLoader(value) {
    return (!!value &&
        typeof value === "object" &&
        typeof value.loadConfig === "function");
}
export function getHostOpenClawConfigSnapshot(config) {
    if (!isHostConfigLoader(config))
        return {};
    try {
        return config.loadConfig();
    }
    catch {
        return {};
    }
}
