openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
15 lines (14 loc) • 826 B
JavaScript
import { _ as resolveOfficialExternalChannelCompatibilityMigration } from "./official-external-plugin-catalog-Dzu7dwBN.js";
import { n as LEGACY_CONFIG_MIGRATIONS } from "./legacy-D15RYgFr.js";
//#region src/commands/channel-setup/config-compatibility.ts
function normalizeExternalChannelSetupConfig(params) {
const migrationId = resolveOfficialExternalChannelCompatibilityMigration(params.channel);
if (!migrationId) return params.cfg;
const migration = LEGACY_CONFIG_MIGRATIONS.find((candidate) => candidate.id === migrationId);
if (!migration) throw new Error(`Official external channel ${params.channel} references unknown compatibility migration ${migrationId}`);
const next = structuredClone(params.cfg);
migration.apply(next, []);
return next;
}
//#endregion
export { normalizeExternalChannelSetupConfig as t };