UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

16 lines (15 loc) • 862 B
import { l as isRecord } from "./record-coerce-CVPuDqcc.mjs"; import { i as listAgentIds } from "./agent-roster-t1ooUdXp.mjs"; //#region src/commands/doctor/shared/legacy-config-binding-repair-input.ts /** Decide whether ownership repair applies before loading channel and routing machinery. */ function resolveChannelAccountBindingRepairInput(e) { const t = new Set(listAgentIds(e)); const n = e.bindings === void 0 ? [] : e.bindings; if (t.size < 2 || e.plugins?.enabled === false || !Array.isArray(n) || !n.every((e) => isRecord(e) && isRecord(e.match) && typeof e.agentId === "string" && e.agentId.trim().length > 0 && typeof e.match.channel === "string" && (e.match.accountId === void 0 || typeof e.match.accountId === "string"))) return; return { agentIds: t, bindings: n }; } //#endregion export { resolveChannelAccountBindingRepairInput as t };