openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
39 lines (38 loc) • 1.25 kB
JavaScript
import { r as asNullableRecord } from "../../record-coerce-CVPuDqcc.mjs";
import "../../runtime-doctor-migrations-YTlcIEpR.mjs";
//#region extensions/active-memory/doctor-contract-api.ts
const RETIRED_QMD_CONFIG_PATH = [
"plugins",
"entries",
"active-memory",
"config",
"qmd"
];
/** Retired Active Memory QMD override detected before strict manifest validation. */
const legacyConfigRules = [{
path: RETIRED_QMD_CONFIG_PATH,
message: "plugins.entries.active-memory.config.qmd is retired because the QMD memory backend was removed. Run \"openclaw doctor --fix\"."
}];
/** Removes the retired plugin-owned QMD override. */
function normalizeCompatibilityConfig({ cfg: e }) {
const t = asNullableRecord(e.plugins?.entries?.["active-memory"]);
const n = asNullableRecord(t?.config);
if (!n || !Object.hasOwn(n, "qmd")) return {
config: e,
changes: []
};
const r = structuredClone(e);
const i = asNullableRecord(r.plugins?.entries?.["active-memory"]);
const a = asNullableRecord(i?.config);
if (!a) return {
config: e,
changes: []
};
delete a.qmd;
return {
config: r,
changes: ["Removed retired Active Memory QMD search-mode configuration."]
};
}
//#endregion
export { legacyConfigRules, normalizeCompatibilityConfig };