UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.24 kB
import{C as isRecord}from"./global-singleton-CTnqrmaI.js";import{c as stripRetiredChannelKeys,s as defineChannelAliasMigration}from"./runtime-doctor-migrations-D8alsOFs.js";import"./string-coerce-runtime-DtNToPzY.js"; //!extensions/matrix/src/doctor-contract.ts function parseMatrixStreamingMode(e){if(typeof e!==`string`)return null;const t=e.trim().toLowerCase();return t===`partial`||t===`quiet`||t===`progress`||t===`off`?t:null}const streamingAliasMigration=defineChannelAliasMigration({channelId:`matrix`,streaming:{defaultMode:`off`,resolveMode:e=>{const t=isRecord(e.streaming)?e.streaming:null;const n=parseMatrixStreamingMode(t?t.mode:e.streaming);if(n)return n;return e.streaming===true?`partial`:`off`}},accountStreamingReplacesRoot:true});const legacyConfigRules=streamingAliasMigration.legacyConfigRules;function normalizeCompatibilityConfig({cfg:e}){const t=[];const n=stripRetiredChannelKeys({cfg:e,channelId:`matrix`,keys:/* @__PURE__ */ new Set([`streamMode`]),scope:`root-and-accounts`,onRemove:({key:e,pathPrefix:n})=>t.push(`Removed ${n}.${e} (never read by the Matrix runtime).`)}).config;return streamingAliasMigration.normalizeChannelConfig({cfg:n,changes:t})}export{legacyConfigRules,normalizeCompatibilityConfig};