UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.33 kB
import{C as hasLegacyAccountStreamingAliases,T as normalizeChannelConfigEntries,n as defineKeyMoveMigration}from"./runtime-doctor-migrations-D8alsOFs.js"; //!extensions/zalouser/src/doctor-contract.ts const groupAllowMigration=defineKeyMoveMigration({scope:[`groups`,`*`],from:[`allow`],to:[`enabled`],sourceOwn:false,match:e=>typeof e===`boolean`,targetIsSet:e=>typeof e===`boolean`,movedMessage:({sourcePath:e,targetPath:t,mappedValue:n})=>`Moved ${e} → ${t} (${String(n)}).`,existingMessage:({sourcePath:e,targetPath:t,targetValue:n})=>`Moved ${e} → ${t} (${String(n)}).`});const legacyConfigRules=[{path:[`channels`,`zalouser`,`groups`],message:`channels.zalouser.groups.<id>.allow is legacy; use channels.zalouser.groups.<id>.enabled instead. Run "openclaw doctor --fix".`,match:e=>groupAllowMigration.hasLegacy({groups:e})},{path:[`channels`,`zalouser`,`accounts`],message:`channels.zalouser.accounts.<id>.groups.<id>.allow is legacy; use channels.zalouser.accounts.<id>.groups.<id>.enabled instead. Run "openclaw doctor --fix".`,match:e=>hasLegacyAccountStreamingAliases(e,groupAllowMigration.hasLegacy)}];function normalizeCompatibilityConfig(e){return normalizeChannelConfigEntries({cfg:e.cfg,channelId:`zalouser`,normalizeEntry:groupAllowMigration.normalize})}export{legacyConfigRules,normalizeCompatibilityConfig};