UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

37 lines (36 loc) • 1.07 kB
//#region extensions/workboard/doctor-contract-api.ts const RECOVERY = "Workboard has retired pre-July 2026 plugin-state KV data. Install OpenClaw 2026.9.7 and run openclaw doctor --fix before upgrading; the retained legacy rows have not been changed."; async function detectRetiredState(e) { const t = { ...e.env, OPENCLAW_STATE_DIR: e.stateDir }; for (const [n, r] of [ ["workboard.cards", 2e3], ["workboard.boards", 200], ["workboard.notify", 2e3], ["workboard.attachments", 42e3] ]) { const i = e.context.openPluginStateKeyedStore({ namespace: n, maxEntries: r, env: t }); if ((i.count ? await i.count() : (await i.entries()).length) > 0) return { preview: [RECOVERY] }; } return null; } const stateMigrations = [{ id: "workboard-28-kv-to-sqlite", label: "Workboard .28 plugin-state KV", collectBackupResources: () => [], detectLegacyState: detectRetiredState, async migrateLegacyState(e) { return { changes: [], warnings: (await detectRetiredState(e))?.preview ?? [] }; } }]; //#endregion export { stateMigrations };