UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.07 kB
import{r as asNullableRecord}from"../../record-coerce-BTbqdJ3-.mjs";import"../../runtime-doctor-migrations-DjW1C-6Q.mjs"; //!extensions/knowledge/doctor-contract-api.ts const REVIEW_JOB_PATH=`plugins.entries.knowledge.config.maintenance.reviewJobId`;const legacyConfigRules=[{path:[`plugins`,`entries`,`knowledge`,`config`,`maintenance`],message:`${REVIEW_JOB_PATH} is retired: maintenance no longer queues the review, which runs on its own schedule. Run "openclaw doctor --fix" to remove it.`,match:e=>asNullableRecord(e)?.reviewJobId!==void 0}];function normalizeCompatibilityConfig({cfg:e}){const t=e.plugins?.entries?.knowledge;const n=asNullableRecord(t?.config);const r=asNullableRecord(n?.maintenance);if(!t||!n||r?.reviewJobId===void 0)return{config:e,changes:[]};const i={...r};delete i.reviewJobId;return{config:{...e,plugins:{...e.plugins,entries:{...e.plugins?.entries,knowledge:{...t,config:{...n,maintenance:i}}}}},changes:[`Removed ${REVIEW_JOB_PATH}; the review scribe runs on its own schedule.`]}}export{legacyConfigRules,normalizeCompatibilityConfig};